Locking In Azure Resource Groups

Locking in azure resource group
 
In the previous article I have discussed how you can organize your resources by applying the tagging functionality, but for working with the resources, there is still another functionality that is important which is called Azure resource locks.
 
As an administrator, you may need to lock a resource group, or resource to prevent other users from accidentally deleting or modifying critical resources. The Azure resource manager provides two levels of functionality (CanNotDelete or ReadOnly) to be able to make appropriate settings. In the portal, the locks are called Delete and Read-only respectively.
  • CanNotDelete
    This means those users who are authorized can still read and modify the resource, but they are not able to delete the resource.

  • ReadOnly
    This means those users who are authorized can read a resource but they are not able to delete or update the resource. Applying this role means granting the Reader role access to the authorized users.
Azure resource locks can be applied to individual resources or to resource groups. When you apply a lock at a parent scope, all resources within that scope inherit the same lock. Even resources you add later inherit the lock from the parent. When applied to a resource group, all resources in that group, including any created after the lock has been put into place will be locked.
 
Let's have a look to add an Azure Resource Locks functionality to your Azure resource group, perform the following steps.
 
Step 1
 
Open your Azure management portal here.
 
Step 2
 
In the portal, click on the side blade click on the Resource groups,
 
Locking in azure resource group
 
Step 3
 
On the Resource groups blade, click on the Resource group in my case name rh-AzureTraining field.
 
Locking in azure resource group
Step 4
 
In the navigation section on the Resource groups dashboard, click on the Locks button
 
Locking in azure resource group
 
Step 5
 
On the Locks blade, click on the Add button
 
Locking in azure resource group
 
Step 6
 
Now type rh-azureTraining-locks in the Lock name textbox, select a Lock type. In my case I select Read only, write Notes for description and click on OK
 
Locking in azure resource group
 
Step 7
 
Your first lock is ready, you can see the details of your Lock screen panel.
 
Locking in azure resource group


Similar Articles