Terraform vs OpenTofu: what changed, what's compatible, and which to use
OpenTofu is an open-source fork of Terraform, created after HashiCorp moved Terraform to the Business Source License (BUSL 1.1) in August 2023. It is MPL 2.0, run under the Linux Foundation, and uses the same HCL, providers and workflow with a tofu command instead of terraform. The two were identical at the fork and have added different features since; for most configurations, switching is straightforward.

Why OpenTofu exists: the 2023 licence change
Terraform was open source under the Mozilla Public License 2.0 (MPL 2.0) from its first release. On 10 August 2023 HashiCorp announced that future versions of its products, Terraform included, would use the Business Source License 1.1 (BUSL, also written BSL). Terraform's licence file names the licensed work as Terraform version 1.6.0 or later; 1.5.x and earlier remain MPL 2.0.
A group of companies and community members published the OpenTF manifesto asking HashiCorp to reverse the change, then forked the last MPL code. The fork was renamed OpenTofu in September 2023 and placed under the Linux Foundation. Key dates:
| Date | Event |
|---|---|
| 10 Aug 2023 | HashiCorp announces the move to BUSL 1.1 |
| Sep 2023 | OpenTF becomes OpenTofu, a Linux Foundation project |
| 10 Jan 2024 | OpenTofu 1.6.0, the first stable release |
| Feb 2025 | IBM completes its acquisition of HashiCorp |
| 23 Apr 2025 | OpenTofu accepted into the CNCF as a Sandbox project, keeping MPL 2.0 |
As of November 2026, the latest releases are Terraform 1.17 and OpenTofu 1.13. The version numbers no longer line up feature for feature, so compare release notes rather than numbers.
What the BUSL means if you just use Terraform
For most people, nothing changed in practice. The BUSL's additional use grant in Terraform's licence allows production use, provided your use doesn't include offering Terraform to third parties "on a hosted or embedded basis in order to compete with" the vendor's paid versions. A competitive offering is defined as a product offered to third parties on a paid basis that significantly overlaps with the capabilities of the paid versions.
So using Terraform to manage your own company's infrastructure, in CI or on laptops, is permitted. The restriction targets companies that sell a product built on Terraform that competes with HCP Terraform, which is why vendors of Terraform automation platforms were among OpenTofu's founders. This is a summary, not legal advice: read HashiCorp's licensing FAQ and the licence text, and ask your legal team if you build or resell tooling around Terraform.
Two more points that are often missed. HashiCorp's official providers, such as hashicorp/aws, are still MPL 2.0, and the BUSL text converts each Terraform version to MPL 2.0 four years after that version is published.
Terraform vs OpenTofu side by side
As of November 2026:
| Terraform | OpenTofu | |
|---|---|---|
| Licence | BUSL 1.1 (1.6.0 and later) | MPL 2.0 |
| Governance | HashiCorp, an IBM company | Linux Foundation; CNCF Sandbox project |
| Command | terraform | tofu |
| Language | HCL (.tf) | HCL (.tf, plus .tofu files) |
| Providers and modules | Terraform Registry | OpenTofu Registry (same provider addresses, e.g. hashicorp/aws) |
| Hosted service | HCP Terraform (and Terraform Enterprise) | None from the project; third-party platforms support it |
| State encryption | Via the backend (for example S3 server-side encryption) | Built-in client-side encryption (1.7+) |
| Certification | HashiCorp Terraform Associate (004 tests 1.12) | None from HashiCorp |
What's compatible
At the fork the two were the same program, so a lot still matches:
- The language. Resources, data sources, variables, outputs, locals, modules,
for_each,count,moved,importandcheckblocks work the same way. - The workflow.
tofu init,tofu plan,tofu apply,tofu state list: swap the command name and the habits transfer, including how to read a plan. - Providers. Providers use the same plugin protocol. OpenTofu resolves addresses like
hashicorp/awsthrough the OpenTofu Registry, so most configurations need no changes torequired_providers. - State. OpenTofu's FAQ says it works with existing state files up to those created by Terraform 1.5.x. For later Terraform versions, OpenTofu publishes version-specific migration guides.
- Tests. Both have a test command (
terraform test,tofu test) using.tftest.hclfiles.
Since 2024 each project has added features the other doesn't have in the same form, so compatibility is high for common configurations and lower for code that uses the newest features of either.
Features in OpenTofu
OpenTofu releases have added, among other things:
- Client-side state encryption (1.7): state and plan files encrypted before they are written, with key providers such as PBKDF2, AWS KMS, GCP KMS and OpenBao.
- Early evaluation (1.8): variables and locals allowed in places that need values before planning, such as backend blocks, module sources and encryption settings.
- Provider
for_each(1.9): several instances of one provider block, for example one per region, and the-excludeplanning flag. - Ephemeral values and conditional resources (1.11), and a dynamic
prevent_destroy(1.12).
terraform {
encryption {
key_provider "pbkdf2" "main" {
passphrase = var.passphrase
}
method "aes_gcm" "main" {
keys = key_provider.pbkdf2.main
}
state {
method = method.aes_gcm.main
}
}
}
provider "aws" {
alias = "by_region"
for_each = var.aws_regions
region = each.key
}Both blocks are OpenTofu-only syntax that Terraform doesn't support. Note that the encryption block still sits inside terraform { }, which OpenTofu keeps for compatibility.
Features in Terraform
Terraform releases since the fork have added, among other things:
- Ephemeral resources and values (1.10): data that is read during a run and never stored in plan or state, and write-only arguments (1.11) for passing secrets to providers.
- List resources and
terraform query(1.14) to find existing infrastructure and generate import configuration, and action blocks (1.14) for provider-defined operations outside create/update/delete, such as invalidating a CDN cache. - HCP Terraform integration: the
cloudblock, remote runs, Terraform Stacks and Terraform Policy.
Where a feature appears in both (OpenTofu added ephemeral values in 1.11), the syntax and details can differ, so check the docs of the tool you run. If you rely on HCP Terraform, Terraform is the natural choice; OpenTofu users typically pair it with self-managed CI or a third-party platform.
Migrating from Terraform to OpenTofu (and back)
OpenTofu's migration guide describes four steps: back up state and code, install OpenTofu, initialise and verify, then test with a small change.
# 1. Back up state (for a remote backend, use its versioning or pull a copy)
terraform state pull > backup.tfstate
# 2. Install OpenTofu, then initialise in the same directory
tofu init
# 3. Expect no changes
tofu planIf tofu plan shows No changes, apply a harmless change (a tag) to confirm the round trip. Check the guide for your Terraform version first: configurations that use Terraform-only features, the cloud block, or terraform_remote_state to read another configuration's state need extra steps. Moving back to Terraform works the same way in reverse, as long as you haven't used OpenTofu-only features such as state encryption (decrypt first) or provider for_each.
Don't run both tools against the same state as a team habit. Pick one per configuration, pin its version, and migrate deliberately.
Which should you learn or use?
- Learning: it barely matters. HCL, providers, state, plans, modules and the lifecycle rules are the same ideas in both, and nearly everything you learn transfers. If you want a certification, the HashiCorp Terraform Associate exam tests Terraform (version 1.12 for exam 004), so study Terraform's behaviour and docs.
- Choose Terraform if you use or plan to use HCP Terraform or Terraform Enterprise, want vendor support from HashiCorp/IBM, or need Terraform-only features.
- Choose OpenTofu if your organisation requires an open-source licence, you build a product on top of the tool, or you want OpenTofu-only features such as client-side state encryption or provider
for_each.
New to both? Start with what Terraform is and the Terraform tutorial; everything there applies to OpenTofu with tofu in place of terraform.
Practise the shared workflow
Planfile teaches Terraform on your iPhone, with Labs that simulate the CLI (init, plan, apply, state) against a fake cloud. The concepts carry straight over to OpenTofu, though the Labs use the terraform command. The first two chapters are free.
Questions
Is OpenTofu a drop-in replacement for Terraform?
For most configurations written for Terraform 1.5 and earlier, yes: same HCL, providers and state. Code using features added to either tool since the fork may need changes.
Is Terraform still free to use?
Yes. Under the BUSL you can use Terraform in production for your own infrastructure at no cost. The restriction covers offering it to third parties in a product that competes with HashiCorp's paid versions.
Why did OpenTofu fork from Terraform?
Because HashiCorp moved Terraform from MPL 2.0 to the Business Source License in August 2023. OpenTofu continues the last MPL-licensed code as an open-source project under the Linux Foundation.
Can OpenTofu use Terraform providers?
Yes. Providers use the same plugin protocol, and the OpenTofu Registry serves the common providers under the same addresses, such as hashicorp/aws.
Does the Terraform Associate exam cover OpenTofu?
No. The HashiCorp Terraform Associate (004) tests Terraform 1.12 and HCP Terraform. Most concepts are shared, but study Terraform for the exam.
Terraform vs OpenTofu: which is better?
Neither overall. Terraform has HCP Terraform and Terraform-only features; OpenTofu has an open-source licence and features like client-side state encryption.