Skip to content
Back to Architecture Decisions

Cost Attribution

Tagging strategy so every dollar of cloud spend maps to a team, product, and environment.

Why

Without cost attribution, you have one giant bill and no idea which team's new feature caused the 30% spike. Attribution via tags lets you slice the bill by team, product, and environment, which is the prerequisite for FinOps (you can't hold a team accountable for spend you can't isolate). A good tagging strategy also enables chargeback — showing product teams their true infrastructure cost, which is the feedback loop that makes them care. The cost of bad attribution is that every cost conversation becomes an argument about whose spend it is.

When

Day 1 of cloud adoption, re-enforced via policy. Takes 2 hours to define + CI enforcement. Skip guarantees un-attributable spend forever.

How

1. Define a mandatory tag schema: team, env, product, cost-center
2. Enforce via cloud policy (SCP / Azure Policy) — reject untagged resources
3. Apply tags in IaC (Terraform locals) so they're consistent, not manual
4. For shared resources (VPC, KMS), split by a usage-based metric (e.g. traffic %)
5. Export billed tags to a warehouse; build the per-team attribution view
6. Audit tag coverage monthly; any untagged spend is a bug to fix, not accept

Example

Mandatory tags (enforced by SCP):
  team: payments | growth | platform | ...
  env:   prod | staging | dev
  product: checkout | analytics | ...
  cost-center: CC-1042

Terraform:
  tags = { team = "payments", env = "prod", product = "checkout", ... }

Unattributed spend this month: $340 (0.8%) → 2 untagged S3 buckets
  → ticket to platform-team to tag or delete

Common Problems

  • ⚠Optional tags that nobody applies — without policy enforcement, tags rot within a month; make them mandatory at provisioning.

Best Practices

  • ✓Keep the tag schema to 4-6 tags — too many and people apply them inconsistently; the minimum is team + env + product.
  • ✓Use a tag dictionary in the repo with allowed values per tag — free-text tags fragment the bill ('payments' vs 'Payments' vs 'pay').

Related Resources