Most Terraform pain isn't the language — it's the layout. This is the repo structure we use for client projects: how to split modules from live environments, when to use workspaces (almost never), and how to keep plan output small enough to actually review.
- The two failure modes: one giant root module vs 400 micro-repos
- The layout:
modules/(reusable) +envs/dev|staging|prod(thin roots) - State isolation per environment — blast-radius thinking
- Versioning modules with git tags
- CI wiring: plan on PR, apply on merge, manual gate for prod
- What we deliberately don't do (workspaces for envs, monorepo-wide applies)

Top comments (0)