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

How did you structure your Terraform code?

BeginnerBehavioralInfrastructure as Code & Terraform state
Answer

Good answer looks like → "Reusable modules in a separate repo (vpc, eks, rds, iam-role), versioned with Git tags. A live repo with envs/dev, envs/staging, envs/prod, each calling modules with environment-specific variables. Each env folder had its own backend config."

Follow-ups to expect → Workspaces or folders, and why? How did you test module changes?

Red flags → One giant main.tf for everything.

All Real-World Interview questions Roadmap: Interview readiness

More on Infrastructure as Code & Terraform state