How to recover deleted Resource Group Azure

How to recover deleted Resource Group Azure

Sometimes, knowingly or unknowingly you might delete a Resource Group, But what if you want to restore the deleted Resource Group in Azure? Let’s discuss a few important points on this particular topic.

How to recover deleted Resource Group Azure

The first and the most important point is if you are deleting any of the Resource Groups, all the resources belonging to that particular Resource Group along with the Resource Group will get deleted permanently. So you should be very much careful before deleting any of the resource Groups.

Make sure before deleting the Resource Group, that you are reading the warning message that says below

“Warning! Deleting the “demoRsgGroup” resource group is irreversible. The action you’re about to take can’t be undone. Going further will delete this resource group and all the resources in it permanently.”

You can see it here

recover deleted Resource Group Azure

So, note that it is not possible to recover or restore a deleted Resource Group in Azure. The action can’t be undone and is an irreversible action.

You can just try the following as a workaround

  • You can try raising a ticket to Microsoft to restore it back. Just give a try.
  • We can also try to find the deployment template for the resources that we created earlier in our deleted resource group and then we can use the same template while creating a new one.

But to avoid this type of scenario in the Future what you can do is, Identify all the Resource Groups that are quite important for you and contains all your critical Azure resources. Then Lock those Resource Groups.

To Lock your Azure Resource Groups, you just need to follow the below quick instructions.

  1. Log in to the Azure Portal.
  2. Search for Resource Groups and click on the search result Resource Groups.
restore deleted resource group azure

3. Now, you can able to see the lists of Resource Groups that you have created. Click on the specific Resource Group that you wish to Lock.

4. On the Resource Group page, click on the Locks link from the left navigation that is present under Settings.

how to lock a Resource Group in Azure

5. Click on the + Add button to create a Lock for that Resource Group you wish to delete.

lock a resource group in azure

6. On the Add lock window, Provide the below details.

  • Lock name: Provide a meaningful name for your Lock.
  • Lock type: Select the Lock type read-only or Delete based on your requirement.
  • Notes: Provide a note which is optional.

Click on the Ok button to create the Lock.

How to add a lock to a resource group in Azure

7. Now when you will try to delete the Resource Group, it won’t allow you and will show you a message

“The Resource Group is locked and can’t be deleted. Click here to manage locks for this Resource Group.”

The resource group is locked and can't be deleted

This way you can save your Azure Resource Group from an accidental deletion in Azure Portal.

You may also like following the below articles

Wrapping Up

Well in this article, we conclude that there is no way to restore the deleted Resource Groups but you can Lock your Resource Groups to save from accidental deletion using the above instructions. Thanks for reading this article !!!