Interview Prep/Terraform/Secrets Provisioners and Policy as Code

Which checks belong in pre-commit, and which only in CI?

BeginnerScenarioSecrets Provisioners and Policy as Code
Answer

Situation read → Fast feedback locally, authority in CI.

What I'd do →

  1. Pre-commit: terraform fmt, terraform validate, tflint, terraform-docs, secret scanning.
  2. CI: everything above plus checkov/trivy config, plan, policy checks.

Why → Developers skip slow hooks; CI can't be skipped.

Interview tip → CI is the control, hooks are the convenience.

All Terraform questions

More on Secrets Provisioners and Policy as Code