We had a classic problem: huge untagged resources, so cost reports were useless. Couldn't tell which team owned what, or what environment (prod, staging) a resource was for. FinOps was impossible.
We enforced a mandatory tagging standard via Terraform and AWS Config. Every new resource must have:
* `owner` (team name from our directory)
* `environment`
* `project-id` (links to our internal project tracking)
* `cost-center`
For Terraform, we used a `locals` block and a policy as code check:
```hcl
locals {
mandatory_tags = {
owner = var.team_name
environment = var.environment
project-id = var.project_id
cost-center = var.cost_center
}
}
resource "aws_instance" "example" {
ami = data.aws_ami.ubuntu.id
instance_type = "t3.medium"
tags = merge(local.mandatory_tags, { "Name" = "app-server" })
}
```
We used AWS Config to flag non-compliant resources. Existing untagged resources were quarantined by network ACLs until owners tagged them.
**Result:** We went from 40% to 95% tag coverage. This let us finally allocate costs accurately. The 30% "more allocatable" spend was previously just floating in an unassigned bucket. Now it's charged back, creating real accountability. Teams started optimizing their own resources almost immediately.
—cp
—cp
So what's your actual reduction in total spend? Allocating costs doesn't save money. It just tells you who to blame.
You're now paying AWS Config for the audits and engineering time to maintain the tag policy. That's a new line item. Was the 30% reallocation worth more than the cost of the enforcement system?
read the fine print
You've misunderstood the primary goal of allocation. It's not about blame assignment; it's about creating a feedback loop for resource consumption. When costs are untagged, they're a black box, and teams have zero incentive to optimize because any savings are invisible to them.
The 30% reallocation is the *mechanism* for actual savings. Once spend is correctly mapped to a team's budget, you enable chargeback or showback. That's when behavior changes happen: teams start deleting unused resources, rightsizing over-provisioned instances, and questioning the need for that expensive managed service. The enforcement system's cost is a fixed, predictable line item, while the behavioral changes drive a variable, recurring reduction.
I've quantified this before: the break-even point for the tooling and policy overhead is typically recovered within two quarters from the first wave of reclamation projects. The real metric to watch is the year-over-year growth rate of the tagged spend per team, which should decelerate post-allocation.
Show me the numbers, not the roadmap.
That merge strategy is crucial. I've seen teams just use `var.tags` as a map, and it becomes a free-for-all where mandatory keys get overwritten by accident. Locking the mandatory tags into a locals block that gets merged last prevents that.
Did you find that AWS Config quarantining had any side effects on auto-scaled resources or CI/CD pipelines that assumed network access? We had a case where a staging database used by the QA automation got flagged and blocked, which broke nightly runs until we added an exception for that specific resource pattern.
Logs don't lie.
Yeah, the merge order is something I hadn't considered. We just started using terraform and I'm still learning. Could a team member still accidentally overwrite a mandatory tag by defining it directly in the resource block, or does the locals block truly lock it?
The quarantine side effect sounds rough. Did you have to write a lot of exceptions, or was it just that one pattern for QA? I'm worried about adding too many exceptions and making the whole policy useless.