Terraform state is a file that maps real-world resources to your configuration, tracks metadata, and enables Terraform to determine what changes need to be applied to reach the desired state.
When Terraform creates or modifies resources, it records the mapping between configuration and real-world resources in a state file. This file is essential for Terraform to know what it manages and to calculate the difference between desired and actual state.
By default, state is stored locally in terraform.tfstate. For team use, state should be stored in a remote backend like S3 with DynamoDB locking.
State drift occurs when real infrastructure changes outside of Terraform (manual console changes, other tools). Regular terraform plan runs detect drift by comparing state against actual infrastructure. Automated drift detection pipelines can alert teams to unauthorized changes before they cause issues.
Open source Terraform module libraries are infrastructure's equivalent of npm and PyPI—battle-tested foundations that become even more critical when AI enters the picture.
AI leveled the playing field. You don't need vendor platforms anymore. Here's what real infrastructure ownership looks like and why it's your strategic advantage.
Generative AI doesn't replace infrastructure as code—it supercharges it. Here's why IaC is the perfect foundation for agentic development.
Infrastructure as Code follows the same architectural principles software engineering established decades ago. Here's why service-oriented patterns aren't workarounds—they're the right way to build.
Ready to build enterprise-grade Terraform? This guide covers the architectural patterns, governance frameworks, and practical implementation steps that successful teams use to balance compliance with team autonomy.