Interview Prep/Terraform/Secrets Provisioners and Policy as Code

Tagging compliance: how do you guarantee every resource has `Owner` and `CostCenter`?

IntermediateScenarioSecrets Provisioners and Policy as Code
Answer

Situation read → Missing tags break cost allocation.

What I'd do →

  1. Set default_tags in the provider, fed from required variables with validation.
  2. A policy check on plan JSON verifying tags_all contains both keys.
  3. AWS Config or tag policies at the org level as the backstop.

Why → Provider defaults make it automatic; policy makes it enforced.

Interview tip → Check tags_all, not tags, in policies.

All Terraform questions

More on Secrets Provisioners and Policy as Code