Skip to main content

Remote State Backends

Terraform Backend Configuration

See the complete backend configuration guide

Environment Management

Manage multiple environments using Terraform workspaces and variable files.

Using Workspaces

# Create workspaces
terraform workspace new dev
terraform workspace new staging
terraform workspace new prod

# Deploy to dev
terraform workspace select dev
terraform apply -var-file=environments/dev.tfvars

# Deploy to prod
terraform workspace select prod
terraform apply -var-file=environments/prod.tfvars

Environment-Specific Configuration

environments/dev.tfvars
services_api_memory = 512
services_api_timeout = 10
environments/prod.tfvars
services_api_memory = 2048
services_api_timeout = 30