Output from azd version
Run azd version and copy and paste the output here:
azd version 1.4.3 (commit d165bd2)
Describe the bug
Description of issue you're seeing...
azd down seems to delete resources by deleting entire resource groups.
For resource groups created by azd up, this works, but if your bicep also contains resource creation in an existing rg, then this could lead to unwanted removal of resources.
A solution to prevent unwanted removals, is to lock the existing rg, but then azd down failes.
To Reproduce
Scenario 1:
- create "existing" rg with vnet
- create azd project which creates a new rg and creates a subnet in the existing rg
- azd down
Scenario 2:
- create "existing" rg with vnet
- add lock to rg
- create azd project which creates a new rg and creates a subnet in the existing rg
- azd down
This issue was customer reported, I reproduced with the following azd project: https://github.com/tvriesde/azdstarter
Expected behavior
azd down should not remove entire resource groups which already existed before azd up. Instead it should only remove resources part of the azd up deployment.
Output from
azd versionRun
azd versionand copy and paste the output here:azd version 1.4.3 (commit d165bd2)
Describe the bug
Description of issue you're seeing...
azd down seems to delete resources by deleting entire resource groups.
For resource groups created by azd up, this works, but if your bicep also contains resource creation in an existing rg, then this could lead to unwanted removal of resources.
A solution to prevent unwanted removals, is to lock the existing rg, but then azd down failes.
To Reproduce
Scenario 1:
Scenario 2:
This issue was customer reported, I reproduced with the following azd project: https://github.com/tvriesde/azdstarter
Expected behavior
azd down should not remove entire resource groups which already existed before azd up. Instead it should only remove resources part of the azd up deployment.