Question

Difficulty: EasyResource Governance: Resource Groups, Tags, and Resource Locks

An administrator applies a CanNotDelete lock to an Azure resource group named RG-Prod. A virtual machine named VM1 is deployed inside RG-Prod. Is the following statement true or false: VM1 cannot be deleted because it inherits the CanNotDelete lock from RG-Prod?

Answer: Answer

Answer

The statement is true. The virtual machine inherits the CanNotDelete lock from the resource group, which prevents it from being deleted.
The statement is correct because resource locks applied at the resource group scope are inherited by all resources inside that resource group, including VM1.

Step-by-Step Solution

1
Identify the lock type and the level at which it is applied.
A CanNotDelete lock is applied at the resource group scope (RG-Prod).
To determine what resources are affected, we first locate the scope and behavior of the lock.
2
Apply the inheritance rules for Azure resource locks.
The lock is inherited by all resources within RG-Prod, including the virtual machine named VM1.
Azure Resource Manager automatically propagates locks down to all child resources.
3
Evaluate the effect of a CanNotDelete lock on VM1.
VM1 cannot be deleted by any user, including administrators, until the lock is removed.
The CanNotDelete lock restricts delete operations on the resource itself and all inherited child resources.

Key Concept

Azure Resource Lock Inheritance
Estimated Time:45s
Rate this question