Why Large Terraform State Files Slow Teams Down and How to Fix Them
As Terraform projects grow, state files managing hundreds or thousands of resources cause plan times to balloon, with some users reporting 20–25 minutes for states containing around 2,900 resources. Every terraform plan refreshes all resources via API calls regardless of whether their configuration changed, creating a sequential bottleneck that worsens with each new resource added. Large shared states also trigger cloud API rate limits from providers like AWS, Azure, and GCP, sometimes causing plans to fail entirely due to throttling. Beyond performance, a single large state file creates a wide blast radius where unrelated resources can be accidentally modified or destroyed in the same apply. Splitting infrastructure into smaller, purpose-specific state files is identified as the structural solution, while proposals for partial-refresh features in Terraform and OpenTofu remain unimplemented.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in