OpenTofu

OpenTofu

Linux Foundation-backed open-source Go infrastructure-as-code tool and drop-in Terraform replacement with native state encryption.

★ 31.1K

Manage multi-cloud infrastructure as code under a truly open MPL-2.0 license

When HashiCorp switched Terraform from an open-source license to the Business Source License (BSL), platform teams and SaaS builders faced legal uncertainty around their automation pipelines. OpenTofu forked Terraform 1.5 under the Linux Foundation and CNCF, growing to 31.1K GitHub stars and 1,500 forks under the MPL-2.0 license. Written in Go (`91.3%` Go), it preserves compatibility with existing HCL modules while shipping community-requested features that legacy Terraform held back.

Why platform teams switch from Terraform to OpenTofu

  • Drop-in CLI and provider registry compatibility lets you run `tofu init` and `tofu plan` on existing `.tf` state files without rewriting resource blocks.
  • Built-in client-side state and plan file encryption (`AES-GCM` with PBKDF2, AWS KMS, GCP KMS, or OpenBao) protects sensitive secrets stored in S3 or remote backends natively.
  • Early variable and local evaluation allows dynamic expressions inside backend configuration blocks and module `source` paths.
  • Provider iteration (`for_each` on providers) lets you deploy identical infrastructure across dozens of AWS regions or Kubernetes clusters from one concise config block.

Migration precaution

Always take a versioned backup of your remote `.tfstate` file before running your first `tofu apply`, and pin provider versions explicitly in `.terraform.lock.hcl` during the transition. Install the `tofu` binary today and run `tofu plan` on a staging stack to verify zero-diff compatibility.

Ready to try OpenTofu?

Experience the full capabilities on their official website.

Visit Official Website