Accidental deletion of a resource is the worst nightmare of an Azure administrator — deleting what you have been doing for quite a time by a fellow member you assigned.
But that’s the reality. Humans make mistakes. Some cost millions. So, Microsoft found a solution to address that. Azure Resource Locks.
First things first.
For those who are new to the gang, you can officially join the best Azure killers gang on Earth by Subscribing below.
Subscribe to my channel. Thanks! ❤️
Through the Azure Locks, you can place restrictions on your cloud resources — and there are two ways to do it.
- Read Only Lock
- Delete Lock
Have you ever heard the term CRUD? — Creating, Reading, Updating, and Deleting.
The same goes for here. If a lock has not been placed, anyone with the privileges can perform the CRUD with your resources. A Lock just prevents it from happening.
This is the most basic type of the Locks. When assigned to a resource, resource group, or a Subscription, it can be only read. Anything other than reading will be restricted.
It could be starting a virtual machine, moving a resource to another resource group, creating a new resource, or simply deleting one. All of those acts will be prohibited.
And there is another type of Lock.
Delete lock stands to do only one thing: preventing deletion. When applied, no one can delete it, not even you, unless you remove the lock.
With the delete lock, authorized users will be able to read and modify the resource, but will not be allowed to delete the resource.
And you can place this lock anywhere you want it to be.
- Subscription level
- Resource group
- Resources
Let’s find out how you can actually do it.
As I told you before, you can place this lock anywhere you want. Just for the demonstration, let’s place a lock in a Resource group.
1. Open Azure Portal
Sign up for your Azure portal and click on Azure Resource Groups to see the list of resource groups. — Search if you can’t find it here.
If you have been following my series, you will see a resource group. If you are not familiar with creating one, you are welcome to go through it first.
2. Click on a resource group to go inside.
In the resource group scroll down or search in the sidebar for the term “Locks” and click on it.
🌿 Click on Add to create a new lock.
🌿 Give a meaningful name to the new lock.
🌿 Choose between the Read-only and Delete Locks.
🌿 Click OK to proceed.
Alright! You have now successfully assigned a lock to the Resource group. All the resources inside that resource group will inherit that same lock.
That’s it.
Hit Subscribe If you got something.❤️
What Next
Azure resource locks are vital when using the Azure portal for an Azure admin (MS Azure) to prevent accidental deletions. But there is even more to learn.
You may be preparing for the Azure fundamentals (az-900) exam. You can use this guide for your further studies. Furthermore, did you know Microsoft is giving 50% vouchers for its fundamentals exams? Learn how to get it.
This Post Has One Comment
Thank you for sharing your precious knowledge. Just the right information I needed. By the way, check out my website at FQ6 about Airport Transfer.