Interview Prep/Azure/Fundamentals and Resource Hierarchy

How do tags work and do they inherit?

BeginnerConceptFundamentals and Resource Hierarchy
Answer

Tags are name-value pairs on resources, RGs and subscriptions (up to 50 per resource). They do not inherit automatically from the RG to its resources. To get inheritance we assign the built-in policy "Inherit a tag from the resource group if missing" (Modify effect) and run a remediation task for existing resources.

Cost Management can group by tags, and tag inheritance for cost reporting can be enabled in Cost Management settings so usage records pick up RG and subscription tags.

az tag update --resource-id $(az group show -n rg-shop-prod --query id -o tsv) \
  --operation merge --tags env=prod owner=platform costcenter=cc-104
Azure All Azure questions Roadmap: Azure core services

More on Fundamentals and Resource Hierarchy