OpenTofu 1.12 The Feature Terraform Never Shipped
OpenTofu 1.12 ships dynamic prevent_destroy, enabling variable-driven resource protection across environments—a feature requested since Terraform 0.7 in 2016 but never implemented. It also resolves provider lock file friction by having the registry return both zh and h1 checksums in one pass, eliminating the need for a separate tofu providers lock run. The new -json-into=FILENAME flag writes machine-readable JSON to a file while preserving human-readable terminal output, simplifying tooling integration. For infrastructure engineers managing multi-environment IaC, these features reduce module duplication and operational friction, directly improving developer experience and platform engineering workflows. Use OpenTofu 1.12's dynamic prevent_destroy with variables to enforce environment-specific lifecycle policies without forking modules.