SC500-LOCK-001SC-500Study guide skill: Implement resource locksReviewed

Contoso has a resource group named RG1 that contains virtual machines and a web app. No one, including users with the Owner role, may delete the resources in RG1 or resources added to it later. Operators must still be able to change resource settings. What should you do?

  1. A. Apply a ReadOnly (Read-only) lock to RG1.Incorrect
  2. B. Apply a CanNotDelete (Delete) lock to RG1.Correct
  3. C. Apply a CanNotDelete (Delete) lock to the management group that contains RG1's subscription.Incorrect
  4. D. Assign only the Reader role at the RG1 scope to all users.Incorrect
Show answer and explanation

Answer: B

Explanation

A CanNotDelete lock (called Delete in the portal) lets authorized users read and modify a resource but blocks deletion. A lock overrides any user permissions and, unlike RBAC, applies across all users and roles, so even an Owner can’t delete the resources while the lock is in place.[1] A lock applied to a resource group is inherited by all resources in it, including resources added later.[1]

A ReadOnly lock (called Read-only in the portal) blocks updates as well as deletions, so option A doesn’t meet the requirement to change settings.[1] On a resource group that contains virtual machines, it also prevents all users from starting or restarting them.[1] You can’t add a lock to management groups, so option C can’t be configured.[1] The Reader role lets you view all resources but doesn’t allow you to make any changes, so option D doesn’t meet the requirement to change settings.[2]


Sources

  1. Lock your Azure resources to protect your infrastructureMicrosoft Learn · Location: Lock your Azure resources to protect your infrastructure, Lock inheritance, Considerations before applying your locks, Configure locks · Checked
  2. Azure built-in roles for GeneralMicrosoft Learn · Location: Reader · Checked