Purge delete items in Azure Subscription

Francisco Javier Alvarez Clayton 0 Reputation points
2023-01-12T12:20:04.1266667+00:00

Hi, We have deleted a huge items (web apps, key vaults, storage accounts) and now we have to recreate it in another subscription, but we are not able to create it with the same name.

Is there a way to be able to purge all of these elements? We only find the way to purge the key vaults.

Thanks so much

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,376 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,319 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Luke Murray 11,251 Reputation points MVP
    2023-01-12T18:03:53.3033333+00:00

    Some resources need a unique name, usually those public-facing, because of DNS.

    https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/resource-naming

    If you are moving the resources across, you can move them:

    https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/move-resource-group-and-subscription

    Or delete and recreate them in the other subscription (you will lose any custom data etc so be careful if you don't have a backup - ie database backup for SQL server etc):

    https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/delete-resource-group?tabs=azure-powershell

    Some services, such as App Services, have name reservations:

    https://learn.microsoft.com/en-us/azure/app-service/reference-dangling-subdomain-prevention

    This means you are unable to use the same name immediately when used in another Azure AD tenant.

    1 person found this answer helpful.
    0 comments No comments

  2. SnehaAgrawal-MSFT 22,261 Reputation points
    2023-01-24T15:02:00.13+00:00

    Thanks for reaching here! Further to add:

    For Web app this is due to new feature App Service recently rolled out a Name Reservation feature to protect customers from the threat of subdomain takeovers.

    This new built-in feature creates a name reservation for web application names.

    The name reservation for a given resource name will exist from the moment the resource is created and for a lengthy time period after the resource has been deleted (a cooldown period).

    This means that during the cooldown period after resource deletion, other subscriptions outside of the original creating Azure AD tenant will not be able to create a web application using the same name.

    However, once the cooldown period has ended, the name reservation will be released, and any subscription will then be able to create a web application with that given name.

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

    Resolution:

    Option 1: If possible you can wait for the cooling-off period to expire. (unless it was previously used by an internal subscription)

    Option 2: Please reach out to us by sending an email with subject line “Attn:Sneha |thread title” to AzCommunity[at]microsoft[dot]com referencing this thread for help on this.

    0 comments No comments

Your answer

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