TE

Terraform Performance

Performance optimization for large Terraform codebases with parallelism, partial backends, and targeted applies

Details

Language / Topic
terraformTerraform
Category
Performance

Rules

balanced
- Use `terraform apply -parallelism=20` to increase concurrent resource operations beyond the default of 10 for large graphs.
- Split large root modules into smaller child modules called via `terraform_remote_state` or module outputs — smaller state files plan and apply faster.
- Use `terraform apply -target=module.networking` during development to apply only the changed subgraph and avoid full plan computation.
- Use `depends_on` sparingly — it forces sequential graph resolution and eliminates parallelism for the entire dependency chain; prefer implicit resource references.