What delete and read-only locks block, how they inherit, and the surprising things a ReadOnly lock stops (like listing storage keys).
From Ultra Transcenders AZ-104 by Tony Rough
Locks protect resources from accidental deletion or change, regardless of the RBAC permissions of the person making the change. There are only two levels, and they differ in what they allow.
| Lock | Read | Modify / create in scope | Delete | Move into or out of a resource group |
|---|---|---|---|---|
| CanNotDelete (Delete) | Yes | Yes (for example, deploy a VM into the resource group) | No | Allowed |
| ReadOnly | Yes | No | No | Blocked when on the source or target resource group or subscription |
New-AzResourceLock -LockName L1 -LockLevel ReadOnly -ResourceGroupName <resource group name>. Set-AzResource doesn’t manage locks, and container immutability policies or App Configuration read-only locks aren’t Resource Manager locks.Common trap: Assuming any lock stops resources moving into or out of a resource group - only a ReadOnly lock on the source or target resource group or subscription blocks a move; a CanNotDelete lock, or any lock on the individual resource, doesn’t.
A ReadOnly lock on a storage account also blocks the List Keys operation (it is a POST, and ReadOnly blocks all POST operations), so users can no longer read the access keys and must use Microsoft Entra credentials for blob or queue data; clients that already hold a key can keep using it. (See Figure 3.1.)
This note is one section of Ultra Transcenders AZ-104: Microsoft Azure Administrator, an independent study guide that explains every topic the exam covers by technology, with comparison tables, diagrams and the common traps, plus a glossary linked to Microsoft Learn.
About the book · Free AZ-104 glossary · All AZ-104 study notes
Where LRS, ZRS, GRS, RA-GRS, GZRS and RA-GZRS keep your copies, what each survives, and which account types support them.
The three SAS types, what each can grant, how they're signed, and how to revoke one when a token leaks.
How the storage account firewall decides who gets in: IP rules, VNet rules with service endpoints, private endpoints and the trusted-services exception.
The order Azure applies subnet and NIC network security groups for inbound and outbound traffic, how priority works, and a worked example.
What a private endpoint puts in your subnet, how private DNS zones make names resolve to it, and when to choose it over a service endpoint.
Which App Service tiers allow manual scale-out, autoscale, slots and how many instances, and the difference between scaling up and scaling out.
Fault and update domains, zones, the SLA each gives, and what you can and can't change after a VM is created.