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 essential points on this particular topic.
How to recover deleted Resource Group Azure
The first and most critical point is if you delete any of the Resource Groups, all the resources belonging to that particular Resource Group and the Resource Group will get deleted permanently. So you should be very careful before deleting any 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 permanently delete this resource group and all its resources.”
You can see it here
So, recovering or restoring a deleted Resource Group in Azure is impossible. The action can’t be undone and is an irreversible action.
You can try the following as a workaround
- You can try raising a ticket to Microsoft to restore it. Just give it a try.
- We can also try to find the deployment template for the resources 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, you can Identify all the Resource Groups that are pretty important for you and contain all your critical Azure resources. Then, Lock those Resource Groups.
To Lock your Azure Resource Groups, follow the below quick instructions.
- Log in to the Azure Portal.
- Search for Resource Groups and click on the search result Resource Groups.
3. you can now see the lists of Resource Groups you 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 under Settings.
5. Click the + Add button to create a Lock for that Resource Group you wish to delete.
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 an optional note.
Click on the OK button to create the Lock.
7. Now, when you 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.”
This way, you can save your Azure Resource Group from an accidental deletion in the Azure Portal.
You may also like following the articles below
- Azure Rename Resource Group
- How to find Resource ID in the Azure portal
- Azure PowerShell List Resource Groups
- The ‘New-AzResourceGroup’ command was found in the module ‘Az.Resources’
- How to check Azure Credit
This article concludes that there is no way to restore the deleted Resource Groups. Still, you can Lock your Resource Groups to save from accidental deletion using the above instructions, and this is a workaround to restore a resource group in Azure. Thanks for reading this article !!!
I am Rajkishore, and I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machine, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.