Interview Prep/Terraform/Secrets Provisioners and Policy as Code

What do you keep as evidence for an auditor that policy was enforced on every production change?

IntermediateScenarioSecrets Provisioners and Policy as Code
Answer

Situation read → Compliance wants proof, not promises.

What I'd do →

  1. Retain plan JSON, policy results, approver identity and the commit SHA for each apply.
  2. Store them in an immutable bucket or HCP Terraform run history.
  3. Link to CloudTrail events from the apply role.

Why → Plan, policy and approval together tell the full story of a change.

Interview tip → Plan files contain secrets, so encrypt and restrict access.

All Terraform questions

More on Secrets Provisioners and Policy as Code