Skip to content
ENExplore Calculators

Terraform State Growth Calculator

Project how Terraform state file size will grow as infrastructure scales.

About Terraform State Growth Calculator

Formula: growth_per_month = new_resources_per_month × avg_state_size_per_resource. Terraform state grows with resource count, not directly with infrastructure activity — a resource with many computed attributes (e.g. a large `aws_instance` with nested blocks) contributes more state bytes than a simple one. Projecting this forward helps anticipate when state size might start affecting plan/apply performance or backend limits.

Formula

projected_size_MB = current_size_MB + (new_resources_per_month × avg_state_per_resource_KB / 1024) × projection_months

current_size_MB
Current state file size (MB)
new_resources_per_month
Resources added per month
avg_state_per_resource_KB
Average state contribution per resource (KB)
projection_months
Months to project forward

Worked example

With the default values below, Terraform State Growth Calculator returns State Growth per Month of 0.059. Change any input above and every figure here is recalculated in your browser.

Inputs used

New Resources per Monthaccepts 0–1,000,000 resources/mo
15 resources/mo
Avg State Size per Resourceaccepts 0–100,000 KB
4 KB
Current State Sizeaccepts 0–1,000,000 MB
3 MB
Project Forwardaccepts 0–1,200 months
12 months

Results

State Growth per Month
0.059 MB/mo
Projected State Size
3.70 MB
State Growth per Month
60.0 KB/mo

Step by step

  1. 1Growth/month: new resources × avg size= 60.0KB
  2. 2Projected state size= 3.70MB

Assumptions and limits

  • The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 3 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

At what state size should I worry about performance?

Most teams don't notice issues until state reaches tens of MB with thousands of resources — at that point plan/refresh times and IDE tooling (e.g. state inspection) start to feel sluggish, which is a good trigger to consider splitting state.

Why do some resources contribute more to state size than others?

Resources with large computed attributes, extensive nested blocks, or big `for_each`/`count`-generated attribute maps (e.g. IAM policy documents, security group rule lists) serialize to much more JSON than a simple resource like a single S3 bucket.

Does state growth affect apply time?

Indirectly — a larger state means more JSON to parse/write on every operation and typically correlates with more resources to refresh and plan against, compounding with the effects modeled in the refresh duration calculator.

How do I reduce future state growth?

Split large configurations into smaller root modules per logical boundary (network, compute, data) so growth in one area doesn't bloat a single shared state file.

Terraform State Growth Calculator | Calcrivo