Improve deletion behavior for resource-group–scoped deployments#6345
Conversation
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
Resource-group–scoped projects have been hitting rough edges during
azd down, mostly around unexpected prompts and inconsistent handling of missing resources (#6295, #2020). This change tightens up that workflow so deletion behaves predictably and doesn't get in the user’s way.Severall small changes are made to accomplish the fix:
Keep
AZURE_RESOURCE_GROUPintact during deletion.Multiple layers may rely on the same group, so removing it during
downcaused unnecessary prompts and confusion. We now keep the value and letazd provisiondecide how to handle it by checking whether the group actually exists before asking anything.Minimize what we prompt for in
azd down.Deletion doesn’t need full parameter resolution. We now validate only the minimal scope (
AZURE_SUBSCRIPTION,AZURE_LOCATION, and/orAZURE_RESOURCE_GROUP) and skip the rest.Handle 404s more gracefully when fetching resources.
A missing resource group shouldn’t break the flow. We now treat it as a normal deletion path instead of an error that triggers prompts.
Also, fix a minor UX bug with resource group deletions not being displayed correctly.
Fixes #6295, #2020.