Interview Prep/Terraform/Modules and Code Structure

Compare Terragrunt with plain Terraform for a company with 30 stacks and 5 accounts.

IntermediateScenarioModules and Code Structure
Answer

Situation read → The pain is repeated backend and provider boilerplate and ordering between stacks.

What I'd do →

  1. Quantify what hurts today: copied backend.tf, -var-file wrappers, dependency ordering.
  2. If it's mostly boilerplate, Terraform plus a generated backend via -backend-config and a small CI matrix is enough.
  3. If dependency graphs across many stacks is the real pain, Terragrunt (dependency, run-all) pays off.

Why → Every extra tool is something to learn, upgrade and debug; adopt it for a measured problem.

Interview tip → Neither is wrong; show the trade-off, not a preference.

All Terraform questions Roadmap: Terraform

More on Modules and Code Structure