Interview Prep/Terraform/State and Backends in Production

One central state bucket or one per account?

IntermediateProductionState and Backends in Production
Answer

We prefer one bucket per environment account (or per account group) so prod state is only readable from prod-privileged roles and a compromise of dev cannot read prod secrets. A single central bucket with prefix-scoped IAM is simpler to run but concentrates risk. Cross-account is done with assume_role in the backend block.

All Terraform questions Roadmap: Terraform in production

More on State and Backends in Production