Deleting a resource in Azure
Moving resources across different groups and deleting resources are common activities when managing a cloud based app.
I came across a scenario where azure resource did not completely cleaned-up even though I deleted it from a portal. I am sharing a scenario and the way I resolved below:
I had a managed certificate created in azure portal belongs to a resource group and a region. Lets say resource group is “RG-FrontEnd” and Region is “Central US”. However I wanted to delete that certificate resource when I upgrade an app. I removed a default lock and deleted a web certificate resource in portal.
Then I tried to create new web certificate under same resource group and in a different region ( with same name ). But Azure did not allow to proceed throwing an error saying there is already resource exists in same resource group ( Though in different region ) after deleting a previous resource. The reason for that was previous resource has not deleted properly.
But when I looked back re-visiting it shown as “deleted” at portal level.
How to overcome?
If you come across same issue in same use case or different use cases then you can completely clean up resource from all the places in hierarchies using below steps.
- Visit https://resources.azure.com ( You need to login to portal first )
- Switch to “Read/write” mode from top menu
- navigate to resource from left menu
- Execute “delete” action
Hope this helps!