How do I re-create a Web App Service with the same name of a deleted Web App Service on a different subscription than the original?

Thomas van der Werff 25 Reputation points
2023-03-01T12:52:45.16+00:00

The situation is as follows:

[1] Earlier I created a Web App Service with a specific name X on subscription A. This was part of an automated process involving DevOps pipelines and Bicep templates. After testing the automatic deployment of a web app through DevOps pipelines I wanted to deploy the same app with the same name X on a different subscription B. I'm aware that the URL has to be globally unique so [2] I first deleted the web app on subscription A. Then [3] I tried to use the same deployment technique on subscription B with the same name X for my web app. This did not seem to work as the error code I kept receiving was:

Website with given name X already exists

So [4] I tried the same deployment with app name Y. This worked flawlessly and the app is running as we speak. I am unable to personally look into the portal of subscription B but I have a buddy who can. We just took a look and I have the following additional information.

  • There was NOT a version of the web app with name X running on subscription B
  • There was never a web app with name X on subscription B (used "Get-AzDeletedWebApp")
  • The web app with name Y is running on subscription B
  • I am still able to creat web app with name X on subscription A

I so checked my own portal environment and found all the previously deleted websites but not a single one that was still alive. I know that there is a 30 days window in which you can retrieve a web app but I cant find any information about the fact whether or not the URL is also still being claimed during that period.

My guess is that this is the case and that I have to perform some kind of extra manual purge in order to make web app with name A be able to be deployed on subscription B. So my concluding question is:

  1. Is this the case?
  2. If so, can I purge these old versions?
  3. If so, how do I purge those?
  4. If not to any of the above what should I do next?

Thanks in advance.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
0 comments No comments
{count} vote

Answer accepted by question author
  1. TP 145.5K Reputation points Volunteer Moderator
    2023-03-01T13:43:08.62+00:00

    Hi,

    Once you delete a name it can only be used in the same subscription or another subscription that is part of the same tenant until the name reservation cooldown period is over. Another poster said that he was able to re-use a name in a different subscription after 30 days. Please see article below:

    Name Reservation on App Service for Web Apps and App Service Environment (ASE)

    https://techcommunity.microsoft.com/t5/apps-on-azure-blog/name-reservation-on-app-service-for-web-apps-and-app-service/ba-p/3675100

    If you have an urgent need to reuse the name you can try sending an email with subject line “Attn:Sneha |thread title” to AzCommunity[at]microsoft[dot]com referencing this thread.

    Couple of related threads below:

    https://learn.microsoft.com/en-us/answers/questions/1151487/why-is-it-not-possible-to-hard-delete-an-azure-web

    https://learn.microsoft.com/en-us/answers/questions/1182550/how-to-permanently-delete-purge-app-service-in-azu

    If the above is helpful please click Accept Answer.

    Thanks.

    -TP


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.