Site icon TheWindowsUpdate.com

Want to Avoid Accidently Deleting your Resources in Azure? It’s Easier Than You Think

This post has been republished via RSS; it originally appeared at: Microsoft Tech Community - Latest Blogs - .

This article is brought to you by the Nonprofit Tech Acceleration (NTA) for Black and African American Communities Program Technical Team. For information on how to take advantage of the granted offerings or free technical consultation, please visit: Supporting Black Community Nonprofits | Microsoft Nonprofits

 

The most important point is when 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 must 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 “demogroup” 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.” 

  

 

 

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. 

  

But to avoid this scenario in the future all you need to do is identify all the important Resource Groups that contain critical Azure resources and then Lock those Resource Groups. 

As an administrator, you can lock an Azure subscription, resource group, or resource to protect them from accidental user deletions and modifications. The lock overrides any user permissions. 

You can set locks that prevent either deletions or modifications. In the portal, these locks are called Delete and Read-only 

 

 

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.   
  3. Now, you will be able to see the lists of Resource Groups that you have created. Click on the specific Resource Group that you wish to Lock. 

 

 

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

 

 

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

 

 

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

 

 

    Click on the Ok button to create the Lock. 

 

 

  1. 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.” 

  1. To edit/remove the lock, select the edit/delete button. 

 

This way you can protect your Azure Resource Group from an accidental deletion or modification in Azure Portal. 

Once a resource has been locked, the resource lock must first be removed before the resource can be modified or deleted.

 

How to recover deleted Resource Group Azure 

You can just try the following as a workaround. 

 

 

Exit mobile version