US Edition Austin, TX UTC 00:00:00

Terraform vs OpenTofu in 2026: licence, features and migration

Terraform vs OpenTofu as of October 2026: licence (BSL vs MPL-2.0), features unique to each, state compatibility and how to migrate in four steps.

Terraform and OpenTofu are close enough that most configurations run on both, and the real differences are licence, governance and a growing list of features that exist in only one tool. As of October 30, 2026, Terraform (HashiCorp, now part of IBM) is source-available under the Business Source License 1.1, while OpenTofu is an open-source fork under MPL-2.0 hosted by the Linux Foundation. Which to use depends on your legal constraints, whether you rely on HCP Terraform, and which newer features you need.

Where the two tools came from

OpenTofu began as a fork of Terraform 1.5.x after HashiCorp announced on August 10, 2023 that future releases of its products would move from MPL 2.0 to the Business Source License. From Terraform 1.6 onward the core is under BSL 1.1. HashiCorp said at the time that its APIs, SDKs and almost all other libraries would remain under MPL 2.0.

OpenTofu was handed to the Linux Foundation, and the project's FAQ presents that as a way to reduce the risk of a single vendor controlling it. It was accepted into the CNCF on April 23, 2025 at the Sandbox maturity level.

Licence: what actually differs

HashiCorp's announcement says the code can be used "except where providing a competitive offering to HashiCorp", and that end users may otherwise copy, modify and redistribute it, including commercially. In practice, most companies running Terraform to manage their own infrastructure are not affected.

The restriction matters more if you build a product or managed service around Terraform, if your legal team has a blanket rule against non-open-source licences, or if you want a tool that no single company can relicense again. OpenTofu's MPL-2.0 licence removes those questions. This is not legal advice, so read the HashiCorp licence FAQ against your own use.

Compatibility: what carries over

  • Configuration: OpenTofu says most Terraform code works without modification.
  • State: per the OpenTofu FAQ, existing state files work up to those created with Terraform 1.5.x. State written by newer Terraform versions needs checking against the migration guide for your exact version.
  • Providers: OpenTofu uses the same providers, but pulls them through its own registry, searchable at search.opentofu.org. That registry is separate from the Terraform Registry.
  • Future parity: the project aims for feature parity but does not promise to track every Terraform release.

Features only OpenTofu has

These come from the OpenTofu changelogs. Versions are the release that introduced the feature.

  • State encryption (1.7): optional encryption of state with AES-GCM and key providers including a passphrase (PBKDF2), AWS KMS, GCP KMS and OpenBao. The encryption docs also list Azure Vault and an external provider.
  • Variables in module sources and backends (1.8): early evaluation of variables and locals, with limitations.
  • -exclude (1.9): the reverse of -target; it skips named objects and everything depending on them. The same release added for_each in provider configuration blocks.
  • OCI registry support (1.10): modules can be installed from OCI registries with an oci: source address, and OCI registries can act as provider mirrors.
  • enabled in lifecycle (1.11): an alternative to count for resources and modules that have zero or one instance.
  • 1.13 additions: an experimental -lint flag, a convert function, assume functions and official Windows ARM64 support.

OpenTofu 1.7 also introduced the removed block and provider-defined functions, but Terraform has both as well, so they are not differences.

Features only Terraform has

Terraform's changelog shows several additions that were not in the OpenTofu release notes reviewed for this page, as of October 2026:

  • Actions and terraform query (1.14): a top-level action block for provider-defined operations outside the create, read, update, delete model, plus list resources in .tfquery.hcl files for querying existing infrastructure.
  • Terraform Policy (generally available in 1.17.0, October 21, 2026): the -policies flag on plan, apply and query no longer needs an experimental build.
  • -minimal-refresh (1.17.0): refreshes only resources with proposed changes.
  • Variables in provider requirements (1.17.0).
  • HCP Terraform and its integrations: HashiCorp's hosted platform is built around Terraform, not OpenTofu.

Features both now have, with different timing

Ephemeral values that never reach state or plan files arrived in Terraform 1.10 (November 27, 2024), with write-only attributes in 1.11 (February 27, 2025). OpenTofu added ephemeral values and write-only attributes in 1.11. Both tools also support S3 state locking without DynamoDB, in Terraform 1.11 and OpenTofu 1.10.

How to migrate from Terraform to OpenTofu

The official migration page gives four steps:

  1. Back up your state and your code.
  2. Install OpenTofu.
  3. Run tofu init and verify the configuration.
  4. Test with a small change before touching anything critical.

Take extra care if several configurations share data through terraform_remote_state; OpenTofu has a separate guide for interdependent configurations. Also confirm your CI images, pipelines and policy tooling call tofu rather than terraform.

Going back is harder once you use OpenTofu-only features such as state encryption or -exclude, because Terraform cannot read or run them. Keep a pre-migration state backup and avoid those features until you are sure.

Which one should you choose?

  • Choose OpenTofu if you need an open-source licence, want state encryption without extra tooling, or build services on top of the tool.
  • Choose Terraform if you use HCP Terraform, rely on Terraform Policy or actions, or your vendors only support the HashiCorp tool.
  • Stay put if your current setup works and neither the licence nor a missing feature affects you. Switching has a cost and little upside otherwise.

For more on infrastructure tooling, see our DevOps tooling, cloud and platforms coverage, or the guides section.

Frequently asked questions

Is OpenTofu a drop-in replacement for Terraform?

For most configurations, yes. OpenTofu states that most Terraform code works unmodified, but newer Terraform-only features and state from recent Terraform versions may not carry over.

Is Terraform still free to use?

Terraform's core remains free to download and use, but since version 1.6 it is licensed under BSL 1.1, which bars offering a competitive product to HashiCorp. Check the HashiCorp licence FAQ for your case.

Does OpenTofu support state encryption?

Yes, since OpenTofu 1.7. It supports AES-GCM with passphrase, AWS KMS, GCP KMS, Azure Vault and OpenBao key providers, among others.

Is OpenTofu a CNCF project?

Yes, at Sandbox level. The CNCF accepted it on April 23, 2025, and it is governed under the Linux Foundation.

Do OpenTofu and Terraform use the same providers?

They use the same provider ecosystem, but OpenTofu fetches them from its own registry, separate from the Terraform Registry.