Using AZD, the command azd down gave this error "ERROR: deleting infrastructure: error deleting Azure resources: no resources found for deployment, 'sbx-1729111021'"
Azure DevTest Labs
-
Sai Krishna Katakam 1,675 Reputation points • Microsoft Vendor
2024-10-17T02:53:48.16+00:00 Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
The error indicates that the azd down command is unable to find resources for the deployment sbx-1729111021. This can happen if the resources were already deleted, or if there’s an issue with the deployment state. Here are a few steps to resolve the issue:
- Verify if the deployment still exists by using the following Azure CLI command:
az group deployment list --resource-group <resource-group-name>
This will list all the active deployments in the specified resource group.
- If the resources were manually deleted, you may need to clean up any remaining resources manually via the Azure portal or CLI.
- Make sure you are using the latest version of the Azure Developer CLI (
azd
). Updating to the latest version can resolve known issues and bugs. You can updateazd
using:
azd upgrade
- Review the logs for any additional error messages or clues. Logs can provide more context about what went wrong during the deletion process.
For more detailed information, you can refer to the documentation: Azure Developer CLI (azd).
If you have any further queries, do let us know. If the comment is helpful, please click "Upvote".
-
Sai Krishna Katakam 1,675 Reputation points • Microsoft Vendor
2024-10-18T01:02:22.98+00:00 Just checking in to see if you had a chance to review my comment on your question. Please let us know if it was helpful and feel free to reach out if you have any further queries.
If you found the information useful, please click "Upvote" on the post to let us know.
Thank You.
-
Pedro Perez Rodriguez 0 Reputation points
2024-10-21T18:29:24.85+00:00 Hi @Sai Krishna Katakam the problem persists. Let's me explain in detail. I have this template created by me. I have all the folder structure like the documentation said. I used it only to use the azd provision. Like 2 months ago the tool work perfectly (azd provision and azd down) but now I use the azd provision but the azd down give me the error that not deployment found. I download the azd bicep starter and work perfectly. Is there any chance that the tool doesn't work anymore with custom templates?
-
Sai Krishna Katakam 1,675 Reputation points • Microsoft Vendor
2024-10-22T07:43:34.16+00:00 Thank you for the additional details. Based on what you’ve shared, it seems like the issue might be specific to how azd is handling your custom template compared to the Bicep starter template. Here are a few things to check and try:
Make sure that your custom template follows the correct structure as outlined in the Azure Developer CLI templates documentation. The structure should include the infra folder with Bicep files, an azure.yaml configuration file and other necessary folders.
azd tracks deployed resources through state files located in the .azure folder within your project directory. If those files were altered or deleted, it could prevent azd down from working correctly. Make sure that your .azure folder is intact and contains the necessary state files to track your deployment.
Use the --debug flag with the azd down command to get more detailed output and identify where the process is failing:
azd down --debug
If azd down fails to delete resources, you might need to manually delete them using the Azure portal or CLI. You can list the resources in the resource group with:
az group list --query "[].name" --output tsv
If azd down continues to fail, as a temporary workaround, you can manually delete the resource group using the Azure CLI or Azure portal:
az group delete --name <resource-group-name> --yes --no-wait
Ensure that your custom template adheres to the current folder structure and requirements of azd. You can compare your custom template with the Bicep starter template to see if there are any differences in how resources are defined or structured.
For more information, you can refer to the official documentation here:
Azure Developer CLI templates overview
Create Azure Developer CLI templates overview.If you have any further queries, do let us know. If the comment is helpful, please click "Upvote".
-
Sai Krishna Katakam 1,675 Reputation points • Microsoft Vendor
2024-10-23T04:15:11.3166667+00:00 Just checking in to see if you had a chance to review my comment on your question. Please let us know if it was helpful and feel free to reach out if you have any further queries.
If you found the information useful, please click "Upvote" on the post to let us know.
Thank You.
Sign in to comment