All releases

Terraformv1.12
Terraform 1.12 — Stacks, Ephemeral Values, and OPA Policy Integration
Terraform 1.12 ships three long-requested features: Stacks (composable multi-environment configurations), ephemeral values (secrets that never touch state), and native OPA policy enforcement — closing the gap with enterprise tooling without requiring Terraform Cloud.
What's New
- 1Stacks GA — new .tfstack.hcl and .tfdeploy.hcl file types let you compose root modules and deploy them across multiple environments declaratively
- 2Ephemeral values — mark resources and outputs as ephemeral to prevent them from appearing in state files or plan output; essential for credentials and tokens
- 3Native OPA policy integration — terraform plan can evaluate .rego policies without external CI wrappers
- 4Provider-defined functions — providers can expose custom functions callable in HCL expressions (e.g., cidrsubnet from a network provider)
- 5Test framework improvements — terraform test now supports mocking provider responses for faster, offline unit tests
- 6Improved moved and removed blocks — supports cross-module resource transfers without destroy/recreate
- 7OpenTelemetry traces for terraform plan and apply — correlate infrastructure changes with deployment pipelines
Breaking Changes
- terraform.tfstate lock file format changed — old backends need updating before teams can mix 1.12 and earlier clients
- Deprecated -var-file flag syntax removed — use --var-file (double dash) consistently
Upgrade Notes
Stacks and ephemeral values are additive — existing configs need no changes. OPA integration requires OPA ≥ 0.65 installed locally. The state lock format change is the only migration-critical item; upgrade all team members simultaneously.