Manage multiple environments — workspaces, variable files, and environment isolation strategies.
Five passes over the same idea, each from a different angle. Do them in order, or jump to whichever you need.
Terraform workspaces provide separate state instances for the same configuration. Use cases: dev/staging/prod environments. Alternatives: directory-per-environment, Terragrunt, and Terraform Cloud workspaces. Variable files (.tfvars) customize behavior per environment. Each approach has trade-offs for isolation and DRY-ness.