Skip to content

Day 55 of 100

The Missing Tags

Cloud GovernanceAdvanced20–25 min

🔥 Problem Statement

There's a stated policy that every cloud resource should carry ownership and environment tags. In practice, a large share of resources have neither — the policy exists in a document somewhere, but nothing actually checks whether it's being followed at the point a resource gets created, so compliance has quietly eroded over time to whatever individual engineers happened to remember.

🏗️ Environment

  • Cloud: multiple teams, hundreds of resources
  • Required tags: ownership and environment, per stated policy
  • Actual compliance: a large fraction of resources missing one or both
  • Enforcement: currently manual/documentation-only, no automation

🤔 Your Challenge

How can tagging compliance be enforced reliably, rather than relying on people remembering a documented policy?

  • What's the difference between a policy that's documented and a policy that's enforced?
  • At what point in a resource's lifecycle would catching a missing tag be most effective — before or after it's created?
  • What tools exist for validating infrastructure changes against a policy before they're applied?
  • How would you handle the large number of already-existing, non-compliant resources separately from preventing new ones?

Solution Hidden

Think through the problem yourself before looking at the answer.

💡Solution

Step 1 — Understand the symptoms

A documented policy with no enforcement mechanism relies entirely on every engineer, every time, remembering and choosing to follow it — which, at any meaningful scale, degrades predictably over time as people are busy, new team members haven't fully internalized every documented convention, and manual processes have no consistent occasion to catch a miss. This isn't a discipline problem with any specific person; it's a structural gap where nothing actually checks compliance at the moment it matters.

Step 2 — Identify the likely bottleneck

The most effective point to enforce this is before a resource is created, not after — catching a missing tag at creation time (or at the point a Terraform plan is reviewed, if infrastructure is managed as code) prevents non-compliant resources from ever existing, rather than relying on a periodic audit to find and remediate them after the fact. The current process has no automated checkpoint anywhere in that lifecycle, which is the structural reason compliance has eroded.

Step 3 — Investigation

  • Determine how resources are actually created across the environment — through Terraform, through console access, through some other automation — since the enforcement mechanism needs to fit however creation actually happens, not an idealized single path.
  • Check what policy-as-code tooling is already in use or available for the relevant cloud provider(s) — many have native policy engines (Azure Policy, GCP Organization Policy) or general-purpose tools (OPA/Conftest, Sentinel) that can validate resource configuration before it's applied.
  • Quantify current non-compliance — how many existing resources lack required tags, broken down by team and environment, to understand the scope of both the enforcement gap and the remediation effort needed for what already exists.

Implement policy-as-code enforcement at the point resources are created or modified: for infrastructure managed via Terraform, a CI/CD validation step (using a tool like Conftest against OPA policies, or a cloud-native equivalent) that rejects a plan missing required tags before it can be applied. For resources that can still be created directly through the console, cloud-native policy enforcement (Azure Policy, GCP Organization Policy, or AWS Config rules with remediation) can similarly reject or flag non-compliant creation.

For the existing backlog of non-compliant resources, treat that as a separate remediation effort — identify owners where possible, tag what can be confidently attributed, and flag genuinely unowned resources for further investigation (which connects directly to the idle-resource cleanup problem). Don't let the size of the existing backlog delay putting the going-forward enforcement in place — stopping new non-compliant resources from being created is valuable immediately, independent of how long full remediation of existing ones takes.

Step 5 — Engineering lesson

A policy that isn't automatically checked is, in practical terms, a suggestion — however clearly it's documented, however reasonable it sounds, compliance will drift without something actively enforcing it at the moment a resource is created. Policy-as-code turns a governance document into an actual gate, which is the difference between "we have a tagging policy" and "our resources are actually tagged."

🧠 Today’s Takeaway

Governance works best when compliance is automated.

🔔 Don’t Miss Tomorrow’s Challenge

A new real-world engineering challenge is released every day.
100 Days → 100 Challenges → 100 New Things Learned.

Get the useful stuff, not the noise.

Occasional notes on engineering, Platform Engineering, AI, cloud and things I’m learning along the way.

No spam. Unsubscribe anytime.