Interview Prep/Terraform/Modules and Code Structure

How do you enforce encryption and tagging standards on every team's infrastructure?

IntermediateScenarioModules and Code Structure
Answer

Situation read → Standards should be built in, not remembered.

What I'd do →

  1. Publish golden modules (encrypted S3, tagged RDS) as the default way to build.
  2. Enforce with policy as code in CI (Checkov, OPA/Conftest, or Sentinel) on the plan JSON.
  3. Add org guardrails (SCPs, AWS Config rules) as the backstop for anything outside Terraform.

Why → Modules make the right thing easy, policy makes the wrong thing hard, and SCPs catch the rest.

Interview tip → Mention both shift-left and runtime controls.

All Terraform questions Roadmap: Terraform

More on Modules and Code Structure