Share via

cannot delete azure static web apps

Jovan Janevski 21 Reputation points
2022-08-02T22:26:54.897+00:00

Deletion of azure static web apps stops the actual static web app service from working, however the web apps remain within the azure portal and i cannot add new ones serving the same domain names. Thus rendering me web-less.

Tried with the cloud console as well, same result.
Remove-AzureRmWebApp -ResourceGroupName "resource-group" -Name "web-app-name"

Azure Static Web Apps
Azure Static Web Apps

An Azure service that provides streamlined full-stack web app development.

0 comments No comments

Answer accepted by question author

VenkateshDodda-MSFT 25,251 Reputation points Microsoft Employee Moderator
2022-08-03T08:10:19.243+00:00

@Jovan Janevski Thank you for reaching out to Microsoft Q&A. Apologize for the inconvenience caused on this.

Based on the issue description, I understand that you are trying to delete the static web app using the Remove-AzureRmWebApp cmdlet. Post running the cmdlet also you are seeing the static web app still on the portal

  • The cmdlet Remove-AzWebApp will deletes the web App. We have a separate PowerShell cmdlet under (Az.Website module) to delete static web app. Currently AzureRM modules are going to be retried and I would recommend you to switch to Az module and use Remove-AzStaticWebapp .
  • Alternatively, you can use either Azure CLI cmdlet az staticwebapp delete --resource-group <resourcegroupname> --name <staticwebappName> --yes or this Rest API Static Sites-Delete Static Site to delete the static web app.

Try using any of the cmdlets that i have recommended above and see if the deletion succeeds.

Hope this helps. Please tag me in a comment if you need any further assistance on this.

----
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.