0
votes

Azure API Management is now "soft-deleted" to enable you to restore it if it was deleted by mistake.

Creating Azure API Management using deleted name results in name "already in use" error

When using terraform destroy it does the soft-delete, which makes it tricky with development as you often want to recreate it.

How can I purge the soft-deleted APIM with terraform?

2

2 Answers

2
votes

Ran into same thing, my quick research on how to call this API:

az rest --method delete --header "Accept=application/json" -u 'https://management.azure.com/subscriptions/{SubscriptionId}/providers/Microsoft.ApiManagement/locations/{eastus}/deletedservices/{api name}?api-version=2020-06-01-preview'