-
Notifications
You must be signed in to change notification settings - Fork 261
Description
- Make sure you've installed the latest version using instructions
Describe the bug
When running azd up, if the target resource group has been manually deleted by the user (e.g., via Azure Portal or CLI), the command fails with an error like:
(-) Skipped: Didn't find new changes.
Deploying services (azd deploy)
(x) Failed: Deploying service checkout-worker
ERROR: error executing step command 'deploy --all': getting target resource: getting default resource groups for environment: aca-otel-tracing: resource not found: 0 resource groups with prefix or suffix with value: 'aca-otel-tracing'
Currently, the error message does not provide guidance on how to resolve this situation.
In fact, running azd provision --no-state allows the user to ignore the cached state and successfully re-provision the resources. However, this workaround is not obvious to most users.
To Reproduce
- Run
azd upto create an environment. - Delete the resource group manually in the Azure Portal or with
az group delete. - Run
azd upagain. - Observe the
resource not founderror without clear recovery instructions.
Expected behavior
The error message should include a hint such as:
"If the resource group was manually deleted, try running
azd provision --no-stateto re-create the resources."
This would improve the user experience by making the workaround discoverable and reducing friction.
Environment
- Language: Python 3.11.10
- IDE: VS Code 1.103.1
- OS: Windows 11 / WSL2 (Ubuntu 22.04.3)
Additional context
This issue is related to #3559 and #3771, where the inability to detect deleted resources has been discussed.
This proposal does not aim to solve the detection logic itself, but rather to improve the user experience by surfacing the existing workaround (--no-state) in the error message.
I am considering submitting a PR for this change, but I wanted to confirm the team’s direction first.