HashiCorp has released the first preview of Terraform 2.0, the next major version of the industry-standard infrastructure-as-code tool.
Major Changes
- Native Drift Detection β Terraform can now continuously monitor infrastructure and detect out-of-band changes without running
terraform plan - Enhanced HCL2 β New language features including pattern matching, enhanced for expressions, and first-class error handling
- State v5 Format β Improved state file format with better concurrency support and reduced file size
- Provider SDK v3 β Simplified provider development with automatic schema validation and improved testing framework
Migration Path
Terraform 2.0 maintains backward compatibility with most 1.x configurations. A migration tool (terraform upgrade) handles the conversion of deprecated syntax automatically.
The preview is available now for testing, with the stable release expected in Q3 2026. OpenTofu, the open-source fork, has announced compatibility plans for the new state format.