Error creating API Management using the same name

David Aguado Fernandez 0 Reputation points
2025-02-25T09:14:44.39+00:00

Hi:

After deleting an API Management and checking that it is not found as "Soft-Deleted" when I try to create it again Terraform ends up giving an error.

User's image

I have verified that the APIM has been deleted and purged, so the AzureRM provider should not try to undelete but rather create it again. I have checked no any APIM available in the "recycled folder" from the Azure portal, CLI with different  API versions.

User's image

User's image

I have verified that after deleting and purging the APIM, Azure says that the name is still in use.User's image

User's image

Microsoft says that sometimes, it may take a little time for the name to be completely released after removal and purging. How can I free the name to use it again?

Thanks.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,312 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Loknathsatyasaivarma Mahali 630 Reputation points Microsoft Vendor
    2025-02-26T01:44:38.19+00:00

    Hello David Aguado Fernandez,

    Thank you for your patience and for sharing your feedback on the Q&A community platform. I’m glad to hear that you were able to resolve your issue, and I appreciate you sharing your solution! Your contribution is valuable and can help others in the community facing similar challenges.

    As per the Microsoft Q&A community policy, "The question author cannot accept their own answer. They can only accept answers by others"

    I’m reposting your solution here so you can mark it as accepted if it resolves your query:

    Even after deleting and purging an APIM, it may take some time for Microsoft to fully release that name. It took approximately 36 hours.

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue. 

    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.


  2. Aki Nishikawa 1,830 Reputation points Microsoft Employee
    2025-02-26T02:41:20.86+00:00

    Hello @David Aguado Fernandez

    As the following document says, an API Management instance is soft-deleted when using the Azure portal or REST API version 2020-06-01-preview or later to delete it.

    https://learn.microsoft.com/en-us/azure/api-management/soft-delete

    Retention period is 48 hours.

    https://learn.microsoft.com/en-us/azure/api-management/soft-delete#soft-delete-behavior

    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.