A company has a critical Azure resource group that contains production resources. They want to ensure that no one can accidentally delete or modify the resources in this group, even if they have Contributor permissions. Which Azure feature should they use?
Resource Locks are the correct protection mechanism for a production resource group. They are applied at the resource group or individual resource scope and override any RBAC role, even Owner or Contributor, by blocking delete or modification operations. A CanNotDelete lock prevents deletion, while a ReadOnly lock prevents both deletion and changes to resource properties, ensuring critical production assets are safeguarded against accidental or malicious actions.
Why this answer
Resource Locks are the correct choice because they provide a way to prevent accidental deletion or modification of critical Azure resources by applying a lock at the resource, resource group, or subscription level. Even users with Contributor or Owner permissions are blocked from performing delete or modify operations when a lock is set to 'CanNotDelete' or 'ReadOnly'. This ensures that production resources are protected beyond the permissions granted by RBAC.
Exam trap
The trap here is that candidates often confuse Azure Policy with Resource Locks, thinking Policy can prevent deletion, but Policy only audits or enforces configuration rules, not operational actions like delete or modify.
Why the other options are wrong
Azure Policy enforces compliance rules on resource configurations (e.g., allowed SKUs or tagging), but it does not prevent deletion or modification of existing resources; it only audits or denies non-compliant new deployments or updates.
RBAC controls who can perform actions on resources, but it does not prevent accidental deletion or modification by users who already have Contributor permissions. Resource Locks are needed to enforce deletion/update prevention beyond RBAC.
Management Groups are used for organizing and managing multiple subscriptions, not for preventing accidental deletion or modification of resources within a specific resource group.
When would these options actually be correct?
An exam question where the company needs to ensure that all resources in a subscription are deployed only in specific regions (e.g., 'East US') to meet data residency requirements. Azure Policy would be the correct answer to enforce this rule.
A company wants to grant specific users read-only access to a storage account while allowing other users full access. RBAC would be correct to assign the Reader role to the first group and Contributor to the second.
A company needs to apply governance policies (like allowed regions or resource types) across multiple subscriptions. Management Groups would be the correct answer to organize subscriptions and apply policies at scale.
Why candidates pick the wrong answer
Candidates may confuse Azure Policy's ability to 'deny' certain actions with preventing deletion, not realizing that Policy does not block direct delete operations on existing resources.
Candidates may think RBAC is the primary tool for preventing unauthorized changes, overlooking that Resource Locks provide an additional layer of protection even for authorized users.
Candidates may confuse Management Groups with a hierarchical control mechanism, thinking they can lock resources, but they are actually for subscription organization and policy inheritance.