A team configures an Azure resource group named `rg-billing-prod` by assigning a tag named `CostCenter: IT` and configuring a `CanNotDelete` lock on the resource group. The team then deploys a virtual network named `vnet-prod-01` inside `rg-billing-prod`.
What is the status of the tag and the resource lock on `vnet-prod-01`?
- The virtual network inherits the CanNotDelete lock, but it does not inherit the CostCenter tag.Cevap
- BThe virtual network inherits both the CostCenter tag and the CanNotDelete lock.
- CThe virtual network inherits the CostCenter tag, but it does not inherit the CanNotDelete lock.
- DThe virtual network does not inherit either the CostCenter tag or the CanNotDelete lock.
Cevap
The virtual network inherits the CanNotDelete lock, but it does not inherit the CostCenter tag.
In Azure, resource locks (such as CanNotDelete) are inherited by all child resources under the scope where the lock is applied. Therefore, the virtual network inherits the CanNotDelete lock. However, tags applied to a resource group are not automatically inherited by the resources inside it.
Adım Adım Çözüm
Anahtar Kavram
Resource lock inheritance versus tag non-inheritance in Azure resource groups