Azure Resource Locks for RG Protection
Short answer
B Apply a read-only lock to RG1 to prevent all modifications and deletions.
Question
Key Takeaways
The trap lies in confusing 'Delete' locks with 'Read-Only' locks; while Delete prevents deletion, it allows modification, whereas Read-Only prevents both.
This question tests the correct Azure resource lock type to prevent both modifications and deletions of a resource group. Applying a read-only lock is the definitive solution to restrict users from performing write or delete operations on RG1.
Common mistake: Many learners choose A (Delete lock) because they focus only on preventing deletion, failing to realize that this option still permits modifying resources within the group.
Expert Analysis
Why the Answer Is Correct
Applying a read-only lock (Option B) to RG1 ensures that users can only view the resources but cannot perform any write or delete operations. This perfectly satisfies the requirement to block both modification and deletion of resources and the resource group itself.Why the Other Options Are Wrong
A delete lock (Option A) only prevents deletion, allowing users to modify resources, which violates the prompt. RBAC (Option C) requires complex role assignments rather than a simple blanket restriction, and tags (Option D) are metadata only and have no enforcement capabilities.Community Comment Notes
While the majority voted for B, some learners like Lili97 questioned if inheritance applies to resource groups, noting that locks on a RG do not automatically apply to its child resources. However, since the question specifies operations on 'RG1' and 'resources in RG1', applying the lock directly to RG1 is the standard administrative approach to achieve the stated goal without managing every individual resource.Official Reference
https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources
This link opens the official vendor documentation in a new tab.
Exam Strategy
When securing resources against accidental changes, always distinguish between the two lock types: 'CanNotDelete' for preventing removal only, and 'ReadOnly' for preventing all changes including deletion.
Frequently Asked Questions
Does a lock applied to a Resource Group inherit to its resources?
Why is RBAC not the best answer here?
Community Votes
75% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 5 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 5
-
zswap 👍 2B. Apply a read-only lock to RG1. A read-only lock will prevent users from making any modifications or deletions to the resource group and its resources. This lock type ensures that all resources within RG1 can only be read, not modified or deleted
-
RjayC 👍 1 Answered BThe correct answer is B. Apply a read-only lock to RG1. ### Explanation: A read-only lock prevents users from making any modifications to resources within the resource group, including adding, updating, or deleting resources. It also ensures that the resource group itself cannot be deleted. This meets all the requirements stated in the scenario. ### Why not the other options? - A. Apply a delete lock to RG1: A delete lock would prevent users from deleting RG1 but does not restrict modifications to resources within RG1. - C. Grant role-based access control (RBAC) permissions to RG1: RBAC permissions provide access control but require detailed configuration and may not completely restrict all the specified actions. - D. Add a tag to RG1: Tags are used for organizing resources and do not control access or prevent actions.
-
Lili97 👍 1 Answered AI think we should get a : - delete lock on RG1 =====> Answer A - read only lock on RG1 resources only ====> Not mentioned in the possible choices Additionally, I understand there is no inheritance on a RG and its resources. So it should be answer A. Am I wrong ?
-
Dmarcetic 👍 1 Answered BRead-only: This lock type prevents users from modifying or deleting the resource group and its resources. CanNotDelete: This lock type prevents users from deleting the resource group but allows modifications.
-
Dmarcetic 👍 1 Answered BReadOnly: Prevents both modifications and deletion of the resource
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All AZ-900 Questions
Access 90 questions with complete answers and detailed explanations.
View Full AZ-900 Practice Test →