Question

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

You manage an Azure environment. You create a new resource group named rg-finance-prod to hold production database resources. You apply a tag with the key CostCenter and value Finance-101 to rg-finance-prod. Additionally, you configure a CanNotDelete resource lock on rg-finance-prod. Afterwards, you deploy an Azure SQL database named db-finance into rg-finance-prod. Which of the following statements correctly describe the resource governance settings applied to the database? Select two.

  1. The database inherits the CanNotDelete lock from the resource group, preventing its deletion.Answer
  2. The database does not inherit the CostCenter tag from the resource group.Answer
  3. C
    The database automatically inherits the CostCenter tag from the resource group.
  4. D
    The CanNotDelete lock prevents users from modifying the database configuration or connection strings.

Answer

The database inherits the CanNotDelete lock from the resource group, preventing its deletion, and the database does not inherit the CostCenter tag from the resource group.
Resource locks in Azure are inherited by all child resources in the scope where they are applied. Therefore, applying a CanNotDelete lock to the resource group prevents the database from being deleted. Conversely, tags are not inherited by resources from the parent resource group, meaning the database will not have the CostCenter tag automatically applied.

Step-by-Step Solution

1
Evaluate lock inheritance for the SQL database inside the resource group.
The CanNotDelete lock applied to the resource group rg-finance-prod is inherited by the child database db-finance, preventing its deletion.
In Azure, resource locks applied at a parent scope are inherited by all child resources.
2
Evaluate tag inheritance for the SQL database inside the resource group.
The CostCenter tag is not inherited by the database db-finance.
Azure resources do not automatically inherit tags from their parent resource group.

Key Concept

Resource lock inheritance applies to child resources, while tag inheritance does not occur automatically from resource groups to child resources.
Rate this question