Skip to main content

2 posts tagged with "azure-policy"

View All Tags

Azure tagging strategy, part 2: from alert to ticket with Terraform and ITSM tags

· 6 min read
Shpend Kelmendi
Software Engineer & Architect

When something breaks on a data platform, the first question is which service is affected and who owns it. This is part 2 of 3. It shows how we answer that with tags: three itsm-* tags that mirror the ITSM (IT service management) service tree, plus env, managed-by and data-product, all generated by one Terraform module. It builds on the decisions from part 1.

TL;DR
  • Keep the set small, mandatory and enforced. Every tag needs a reader. Ours are six, each with a named reader: three itsm-* tags route incidents, data-product attributes cost, env splits prod from non-prod cost, and managed-by exposes click-ops. All are generated and audited.
  • Generate tags in a central Terraform module, including managed-by for everything IaC creates. Azure Policy audits; it isn't the source.
  • Mirror your ITSM service tree in tags, so they route incidents. Don't reuse ITSM tags for cost: a shared Databricks workspace has one ITSM service but many products.
  • One product, one spelling, everywhere. The module emits the data-product slug once; Azure resources and Databricks jobs reuse the same key and value.

Azure tagging strategy, part 1: what to tag, what not, and where tags can live

· 8 min read
Shpend Kelmendi
Software Engineer & Architect

Tags without a strategy grow wild: inconsistent spellings, no cost attribution and slow incident routing. This is part 1 of 3. It follows one question: which question does a tag answer, and where can it live? It covers Azure's limits, the control plane vs. data plane boundary, what not to tag, and which implementation option fits. Part 2 shows how we generate the tags with Terraform and use them for incident routing. Part 3 covers Databricks, Microsoft Fabric and cost per data product.

TL;DR
  • Tag what causes cost or incidents. Azure tags are control-plane metadata on Azure Resource Manager (ARM) resources. Tag data-plane objects such as Key Vault secrets only when a defined process reads that metadata.
  • Every tag needs a named reader. A tag that no report, policy or process reads has no value and nobody will maintain it.
  • Identity goes in the name, mutable context in tags. Changing a tag is an in-place update; a rename means recreating the resource.
  • Let IaC write the tags and Azure Policy audit them. A Modify policy and Terraform overwrite each other's changes.