An administrator manages an Azure subscription that contains a resource group named `rg-dev-sandbox`. The resource group contains a virtual machine named `vm-sandbox` and a storage account named `stdevsandbox`.
The administrator applies a tag named `Dept: Engineering` and a `CanNotDelete` lock to `rg-dev-sandbox`.
Which statement describes the resulting governance state of the resources in `rg-dev-sandbox`?
- The virtual machine and the storage account cannot be deleted, and they do not inherit the tag.Answer
- BThe virtual machine and the storage account automatically inherit the tag, but they can be deleted because the lock only prevents deletion of the resource group.
- CThe virtual machine and the storage account automatically inherit both the lock and the tag.
- DThe virtual machine and the storage account can be deleted by a subscription Owner because resource locks do not restrict users who inherit the Owner role from the subscription.
Answer
The virtual machine and the storage account cannot be deleted, and they do not inherit the tag.
The correct answer states that the virtual machine and the storage account cannot be deleted, and they do not inherit the tag. This is correct because resource locks applied at the resource group level inherit to all child resources, blocking delete operations. However, tags on resource groups are not inherited by child resources.
Step-by-Step Solution
Key Concept
Resource lock inheritance and tag non-inheritance behaviors in Azure Resource Manager.
Estimated Time:1m 30s