A resource lock is an Azure control that protects a resource, resource group, or subscription from accidental or malicious change. Depending on the lock type, it can block deletion, or it can prevent both deletion and modification. Locks sit in the management plane, so they protect infrastructure even when an attacker has valid credentials and can issue normal administrative commands.
In cyber security, resource locks matter because they add a last line of defense against destructive cloud activity. If a service principal, user account, or automation identity is compromised, the attacker may still be unable to erase critical storage, databases, or recovery components if those assets are locked. Defenders use locks to safeguard high-value systems and to slow down destructive attacks, buying time to detect abuse, revoke access, and restore services. Locks are not a replacement for least privilege or strong secret hygiene, but they can stop a valid identity from turning into a demolition tool.


