Skip to content

[Issue] Incorrect Resource Group being picked up by azd down (when manually skipping Azure development tools prompt) #8701

@TheNotary

Description

@TheNotary
  • Make sure you've installed the latest version using instructions

Output from azd version
Run azd version and copy and paste the output here:
azd version 1.25.6 (commit 00425b6) (stable)

Describe the bug
For a while I've been following a pattern of naming my envs dev, stage, prod. To ensure the correct resource group is created, I create a definition in bicep that concatenates the project name with the env.

Today I'm noticing that it's trying to auto-discover the AZURE_RESOURCE_GROUP from my Azure tenant, even though, say, AZURE_RESOURCE_GROUP="rg-az-app-service-dev" is already specified in azd's env config. Instead of using that, it's picking up whatever the most recently created resource group was.

To Reproduce

  1. Create project A
  2. azd up project A, skip the "Would you like to..." prompt via ctrl+c
  3. Create project B
  4. azd up project B, (skip prompt via AZD_SKIP_FIRST_RUN=true possibly)
  5. azd down project A, (skip prompt, ctrl+c)

Expected behavior
The output of the azd down command should show project A's resource group being targeted. Instead it is showing the more recent, project B's resource group being targeted for deletion.

Environment
Information on your environment:
* Bicep
* Windows terminal and WSL

Additional context
Still researching, but thought I'd drop this here while I try to figure out what's wrong.

Oh, it has to do with skipping the "Would you like to check your Azure development tools?" prompt via ctrl + c!

I'm beginning to worry it has to do with my pattern for naming resource groups with azd. For a while I've been following the pattern of naming my envs dev, stage, and prod. To ensure the correct resource group is created, I create a definition in bicep that concatenates the project name with the env. This has worked for something like 6 months. Not sure what's going on, but wanted to add it for extra context.

Metadata

Metadata

Assignees

Labels

area/environmentEnvironment management, .env filesarea/provisioningBicep/Terraform/ADE provisioningblockerBlocks release or critical pathbugSomething isn't workingcustomer-reportedidentify a customer issue

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions