Terraform Apply Time Calculator
Estimate how long a terraform apply will take based on resources to create, modify and destroy, and Terraform's default parallelism.
Inputs
Number of new resources Terraform will create.
Number of existing resources Terraform will update in-place.
Number of resources Terraform will tear down.
Average time per resource creation call (varies widely: seconds for IAM, minutes for RDS).
Average time per resource modification call.
Terraform's -parallelism value (default 10) controlling concurrent resource operations.
Estimated Apply Time
1.67min
Estimated Apply Time
100sec
Serial (No Parallelism) Time
1,000sec
Speedup from Parallelism
10.00×
Step by step
Serial time: creates×create_time + modifies×modify_time + destroys×destroy_time
40×20 + 15×10 + 5×10
= 1000s
Total resources touched
40 + 15 + 5
= 60
Parallel time at configured parallelism
max(longest single op, serial / min(10, 60))
= 100s (1.67 min)
How it works
Terraform executes independent resource operations concurrently up to the -parallelism limit (default 10), so apply time is closer to total_work / parallelism than the sum of every operation's duration — bounded by the slowest single operation, since apply can't finish faster than its longest-running resource. Formula: serial_time = creates×create_time + modifies×modify_time + destroys×destroy_time; parallel_time ≈ max(longest_op, serial_time / min(parallelism, total_resources)).
Formulas
Serial time
serial_time = creates × avg_create_time + modifies × avg_modify_time + destroys × avg_destroy_time
- creates
- Resources to create
- avg_create_time
- Average creation time (sec)
- modifies
- Resources to modify
- avg_modify_time
- Average modify time (sec)
- destroys
- Resources to destroy
- avg_destroy_time
- Average destroy time (sec)
Parallel apply time
parallel_time = max(longest_op, serial_time / min(parallelism, total_resources))
- longest_op
- Duration of the slowest single operation
- serial_time
- Total serial time
- parallelism
- Terraform -parallelism value
- total_resources
- creates + modifies + destroys
Frequently Asked Questions
Why can't apply finish faster than the longest single resource?
Terraform's dependency graph means some resources must wait on others, and even with unlimited parallelism, the critical path through dependent resources (e.g. a VPC before its subnets) sets a floor on total apply time — a single slow resource (like an RDS instance taking 10+ minutes) often dominates regardless of parallelism.
Does increasing -parallelism always speed up apply?
Only up to the number of independent (non-dependent) resources ready to apply at once, and up to API rate limits from your cloud provider — beyond that point, more parallelism just means more concurrent operations queueing on the same rate limit.
Why do create times vary so much by resource type?
Some resources (IAM roles, S3 buckets) are near-instant API calls, while others (RDS instances, EKS clusters, ACM certificate validation) involve provisioning infrastructure that takes minutes — use per-resource-type historical timing from your own applies for the most accurate average.
Should destroys always be assumed as fast as modifies?
Not necessarily — some resources have slow deletion (e.g. RDS instances with final snapshots, load balancers with dependent ENIs). If your destroys are known to be slower, model them separately rather than reusing the modify-time average.
You might also need
- Terraform Refresh Duration CalculatorCommonly used together
- Terraform Graph Complexity CalculatorCommonly used together
- Terraform Lock Timeout CalculatorCommonly used together
- Terraform Cloud Cost CalculatorCommonly used together
- Docker Build Time EstimatorCommonly used together
- Playbook Runtime CalculatorCommonly used together