How to Lock your Azure Resources?
- Get link
- X
- Other Apps
Azure Resource Locking feature helps to prevent deletion and modification of Azure Resources on which the lock is been applied. Now you might be wondering how it's different and advantages compared to Azure RBAC (Role-Based Access Control)? RBAC is used as the first line of defense against restricting access to Azure Resources. Using RBAC you can restrict access to resources and resource actions. RBAC alone will not be sufficient across all environments especially from the Test environment onwards. RBAC and Resource lock doesn't conflict with each other rather they complement and should be applied as standard practice/pattern across all your Azure Subscriptions in your organization.
Assume you are an Administrator, which means you have full access to all your resources. With Resource Lock applying it provides a way for administrators to lock down Azure resources to prevent deletion and modification of a resource. Resource lock applies to all users regardless of their roles.
There are 2 types of Resource Locks:
- CanNotDelete - It allows the resource to be modified however not deleted.
- ReadOnly - the resource can neither be deleted nor modified. Applying this lock is similar to restricting all authorized users to the permissions granted by the Reader role.
Pre-Requisites:
Applying Resource Lock using Azure Portal
- Navigate to the resource/ resource group/ subscription you wish to lock in the Azure Portal
- In the main blade select the "Locks" icon
Lock Option - Provide lock name and description and select the lock type as Delete or Read-only.
Creating Lock - Click OK to save the lock. The resource is now protected.
- In future if you want to change the lock type or delete the lock, navigate to "Resource" - "Locks"
Option to Edit/Delete lock
Comments
Post a Comment