Friday, December 23, 2022

Lock resources in Azure

As an administrator, we 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. 

These locks are of 2 types 

1. Delete

2. Read-only


Delete means authorized users can read and modify a resource, but they can't delete it.

ReadOnly means authorized users can read a resource, but they can't delete or update it. Applying this lock is similar to restricting all authorized users to the permissions that the Reader role provides


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 same parent lock. The most restrictive lock in the inheritance takes precedence.