question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deployment script is not able to create multiple environments with the same name

See original GitHub issue

Describe the bug

If you’d like to deploy two resource groups with the script using the same name, but different environments, the second deployment would fail with and error.

This happens because both runs of the script would try to create a Microsoft.BotService/botServices resource with the same name, which of course would fail for the second try.

To Reproduce

Example

1st deployment

node .\provisionComposer.js `
   --subscriptionId ***** `
   --appId ***** `
   --appPassword ***** `
   --location westeurope `
   --name my-composer `
   --environment dev

2nd deployment

node .\provisionComposer.js `
   --subscriptionId ***** `
   --appId ***** `
   --appPassword ***** `
   --location westeurope `
   --name my-composer `
   --environment test

(Note the only difference is the --environment parameter: dev first, test second.)

The error you would get is:

×
{
  "error": {
    "code": "InvalidBotData",
    "message": "Bot is not valid. Errors: The bot name is already registered to another bot application..  See https://aka.ms/bot-requirements for detailed requirements."
  }
}
** Provision failed **

Expected behavior

The second run should succeed. The resource names in the two environments shouldn’t clash.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
peterbozsocommented, Mar 9, 2021

@EricDahlvang Yes, feedback is totally right, I only lack the free time to actually implement the changes.

0reactions
tdurnfordcommented, May 10, 2021

@pavolum @GeoffCoxMSFT Any updates on this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot register same VM resource into multiple environments
yes this is by design, if you want to use multiple VM agent from same machine, you need to have unique name for...
Read more >
Customizing Database Deployments for Multiple Environments
In Visual Studio 2010, in the Solution Explorer window, right-click your database project, and then click Properties.
Read more >
How to use GitLab CI to deploy to multiple environments
Let's try to automate it using GitLab CI. The first automated deployment. With GitLab, there's no difference on what commands to run. You...
Read more >
Environments · Cloudflare Workers docs
The Workers platform allows you to create and manage different environments ... You cannot specify multiple environments with the same name.
Read more >
Deploying Multiple Environments with Terraform - Medium
Adhering to this meant that I would not have duplicate Terraform code for each environment I wanted to deploy. I would write the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found