All guides

OpenTofu or Terraform: what differs today

OpenTofu is a fork of Terraform, created in response to HashiCorp's change of license. The two projects have different licenses and different stewards, and each documents features on its own pages.

Close-up of code on a screen in many colours

Licenses and stewardship

On 10 August 2023, HashiCorp announced that future releases of its products would move from the Mozilla Public License 2.0 (MPL 2.0) to the Business Source License 1.1 (BSL). Terraform's license file applies the BSL to version 1.6.0 and later.

The file permits production use with one condition: the use may not consist of offering Terraform to third parties, hosted or embedded, as competition for the licensor's paid versions. Hosting it or using it for an organization's internal purposes does not count as a competitive offering. The change license is MPL 2.0, four years from the date a version is published.

IBM completed its acquisition of HashiCorp on 27 February 2025, and the license file names IBM as the licensor.

OpenTofu's FAQ says the fork was created in response to that license change. The Linux Foundation announced the project on 20 September 2023, and its repository states the license as MPL 2.0. The Cloud Native Computing Foundation accepted OpenTofu on 23 April 2025 at the Sandbox maturity level. The FAQ says a core team chooses features and fixes, and a steering committee decides on big changes.

Compatibility in OpenTofu's documentation

On 24 November 2026, the release pages of the two projects mark Terraform v1.17.2 and OpenTofu v1.13.10 as the latest releases.

OpenTofu's migration page says the project aims to maintain compatibility with Terraform configurations, and that most Terraform code will work without modification. Its FAQ says OpenTofu works with the current Terraform providers.

Two OpenTofu pages differ on state files. The FAQ says OpenTofu reads existing state files, and the newest it covers are those written by Terraform 1.5.x. The page on migrating interdependent configurations says OpenTofu reads Terraform 1.x state files without modification. That page also warns that Terraform "may not reliably read OpenTofu state files", above all when features specific to OpenTofu are in use. Test the switch on a copy of your own state.

Features on OpenTofu's pages

  • State and Plan Encryption: OpenTofu encrypts state and plan files at rest, for local storage and for a backend. The key providers on the page include PBKDF2, AWS KMS, GCP KMS and OpenBao.
  • Backend Configuration: variables and locals are allowed in backend configuration, with restrictions. All values must resolve during tofu init.
  • Provider Configuration: a provider configuration with an alias can also take for_each, which instantiates it multiple times from a collection.
  • Command: plan: -exclude focuses planning on the resource instances that do not match the given address.
  • OCI Registry Integrations: OCI registries are a module source type and a secondary installation source for provider packages.

Two Terraform pages address the first two topics. Manage sensitive data says you can encrypt state at rest, and that the method depends on your backend. The backend overview says a backend block cannot refer to named values such as input variables and locals.

Features on Terraform's pages

  • Stacks overview: Stacks are a configuration layer in HCP Terraform for deploying a set of modules repeatedly.
  • terraform query: the command queries existing infrastructure for resources according to .tfquery.hcl files, and it can generate import and resource blocks for the results. The v1.14 changelog lists it as a new feature.
  • The same changelog adds actions. An action block declares a provider operation outside create, read, update and delete, triggered through the lifecycle of a resource or with the -invoke flag.
  • Terraform policy: a policy-as-code framework written in HCL. The v1.17 changelog announces its general availability.

Before you depend on a feature from either list, find it in the documentation of the tool and version you run.

Registries

Each tool has its own default registry. Terraform's page on provider requirements says a provider address with no hostname defaults to registry.terraform.io. OpenTofu's page on provider requirements says it defaults to registry.opentofu.org. OpenTofu's FAQ adds that the project will not have its own providers.

How to choose

  • Read the Additional Use Grant in Terraform's license file against the way your company offers Terraform to others.
  • Look up every provider and module you use in the registry of the tool you plan to run.
  • Keep each state file under one tool, given the warning quoted above.

The migration path

OpenTofu's migration guide calls the process safe and reversible:

  1. Back up the state files and commit all code.
  2. Install OpenTofu and verify it with tofu --version.
  3. Run tofu init, then tofu plan. The result to expect is "No changes", or a plan identical to the one Terraform would print.
  4. Run tofu apply even when there are no infrastructure changes. The guide says this updates the state file format if needed.
  5. Make a small, non-critical change and apply it.

To roll back, restore from the backups if any state changes were made, then run terraform init and terraform plan.

Configurations that read each other through terraform_remote_state have an order. The guide's principle is to migrate dependent configurations before their dependencies, and to avoid OpenTofu-specific features during the migration.

Sources

Want a second pair of eyes on yours? We do this work for a living.

Book a call

More guides