Design a multi-account AWS landing zone managed with Terraform.
AdvancedScenarioTesting Upgrades and Large-Scale Operations
Answer
Situation read → Dozens of accounts, consistent guardrails.
What I'd do →
- Use AWS Organizations with OUs; manage them and SCPs in a
managementstack. - An account factory (AWS Control Tower Account Factory for Terraform, or custom) creates accounts from a request file.
- Baseline modules per account: IAM roles, CloudTrail, Config, VPC, budgets.
- Layered states, a central state bucket in a tooling account, and OIDC roles per account.
Why → Accounts are created and baselined by code, so each looks identical and is auditable.
Interview tip → Describe the account-vending flow end to end.
More on Testing Upgrades and Large-Scale Operations
What does each of `terraform validate`, `plan` and `terraform test` actually check?BeginnerWrite a native test for a module that creates an encrypted S3 bucket.IntermediateCompare Terratest with `terraform test`.IntermediateReal-cloud integration tests leave orphaned resources when they fail midway. How do you handle that?AdvancedHow do you upgrade from Terraform 1.5 to 1.9 safely?IntermediateMajor AWS provider upgrade from v4 to v5 (or v5 to v6) across many stacks. How do you plan it?Advanced