What problem does it solve?
Terraform state is the canonical record that maps your HCL configuration to real-world infrastructure, enabling safe planning and updates across teams.
Terraform manages, tracks, and synchronizes resource attributes so that changes are predictable and auditable.
Core Features & Use Cases
- List and view tracked resources with terraform state list and terraform state show.
- Move resources between addresses or modules with terraform state mv to support refactoring.
- Remove resources from state without impacting real infrastructure using terraform state rm.
- Import existing resources into state with terraform import or declarative import blocks for batch workflows, enabling gradual adoption of IaC.
- Pull and push state to remote backends for collaboration and disaster recovery, with locking and drift detection.
Quick Start
Initialize your Terraform project and begin state management by running terraform init, then run terraform state list to enumerate all tracked resources.