Skip to content

'azd down' does not remove deployment state if resources are already gone #6207

@irinasmoke

Description

@irinasmoke

Output from azd version
Run azd version and copy and paste the output here: azd version 1.21.3

Describe the bug
When running azd down, if resources have previously been manually deleted, the deployment state is not removed. This leads to subsequent azd provision calls not working properly.

To Reproduce

  1. azd up a project
  2. Manually delete resource group
  3. Run azd down
  4. Run azd up
  5. Deployment fails because provisioning fails

Expected behavior
azd down should remove deployment state, giving the user a clear path to re-provision, even if resources have already been removed by other means.

Additional context
Actually, the ideal experience would be to have azd provision be able to detect that resources have been manually deleted and be able to re-provision anyway without users needing to know about the --no-state flag, but I have been told this is not so straightforward, so this is my next best proposed solution - at least make azd down behave as expected in this scenario.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions