Interview Prep/Real-World Interview/Infrastructure as Code & Terraform state

How did you enforce policies on infrastructure code?

AdvancedBehavioralInfrastructure as Code & Terraform state
Answer

Good answer looks like → "Checkov in CI for common misconfigurations, plus custom OPA Rego policies evaluated against terraform show -json plan output with Conftest, for rules like 'every resource has the owner tag' and 'no security group allows 0.0.0.0/0 on port 22'. Org-level SCPs were the final backstop for things like disabling CloudTrail."

Follow-ups to expect → Why evaluate the plan rather than the code? How did you handle exceptions?

Red flags → Policies written down in a wiki with no enforcement.

All Real-World Interview questions Roadmap: Interview readiness

More on Infrastructure as Code & Terraform state