Interview Prep/Terraform/State Backends and Workspaces

Many teams read each other's outputs via `terraform_remote_state`. What problems appear, and how do you fix them?

IntermediateScenarioState Backends and Workspaces
Answer

Situation read → Hidden coupling.

What I'd do →

  1. List who reads what; ensure readers use a read-only role.
  2. Treat outputs as a versioned contract and don't rename without a deprecation window.
  3. Move high-value shared values to SSM or a service catalog, with explicit ownership.

Why → Anyone with remote_state access can read the entire state, including secrets, and renames silently break downstream plans.

Interview tip → Mention "contract" and "least privilege".

All Terraform questions Roadmap: Terraform in production

More on State Backends and Workspaces