Azure / static-web-apps

Azure Static Web Apps. For bugs and feature requests, please create an issue in this repo. For community discussions, latest updates, kindly refer to the Discussions Tab. To know what's new in Static Web Apps, visit https://aka.ms/swa/ThisMonth
https://aka.ms/swa
MIT License
326 stars 56 forks source link

Impossible to delete Static Web Apps by any means #1106

Open nad-au opened 1 year ago

nad-au commented 1 year ago

Describe the bug

It's impossible to delete static web apps

To Reproduce Steps to reproduce the behavior:

  1. Create STWA with Terraform azurerm_static_site
  2. Attempt to destroy infra via Terraform or manually destroy in portal or via az staticwebapp delete
  3. Resources hang around indefinitely

Expected behavior Resources should be deleted by known methods

Additional context One of the web apps had a custom domain, two others do not. Attempting to delete custom domain also fails. Fails as in indefinitely stuck in deleting state.

Tried deleting deployments as suggested inhttps://github.com/Azure/static-web-apps/issues/915

jtrout commented 6 months ago

Odd that it's nearly a year to the day, but I'm now in the exact same boat. Created via azurerm_static_site, attempted to recreate using azurerm_static_web_app, and that operation failed due to the name still being in use. The deleted site still appears in Azure, but can't be deleted via the portal or CLI. az staticwebapp list returns an empty array, and the delete attempt returns Operation returned an invalid status 'Not Found'.

Any ideas welcome!

jtrout commented 6 months ago

Interesting, it appears it finally deleted, and subsequent runs were able to recreate the static web app. This may be an Azure problem, not a Terraform problem.

ygrosu-sd commented 6 months ago

any updates? we are getting this problem as well.
running as docker from: hashicorp/terraform:1.7.5 added azure cli version: 2.58.0 and we cannot destroy static web apps