Terraform vs OpenTofu: What Is the Difference?
In 2023 HashiCorp changed Terraform's licence from the open-source MPL 2.0 to the Business Source License (BSL). In response, a group of companies forked the last open-source version as OpenTofu, now a Linux Foundation project.
What's the same
- The HCL language, the plan/apply workflow and state format started out identical.
- Providers from the registry work with both.
- Most configurations run unchanged on either tool.
tofu init
tofu plan
tofu apply
What differs
- Licence: OpenTofu is MPL 2.0 open source. Terraform's BSL allows normal use, including in production, but restricts offering competing commercial products built on it.
- Governance: OpenTofu is community and foundation governed; Terraform is developed by HashiCorp (now part of IBM).
- Features: the projects have diverged. For example, OpenTofu added client-side state encryption and some language features first, while Terraform ships its own features and integrations with HCP Terraform.
- Registry and tooling: each has its own registry front end and release cadence; check that your platform supports the tool and version you choose.
How to choose
- Already on Terraform with HCP Terraform or Terraform Enterprise: staying put is simplest.
- Building a platform or product on top of the tool, or open-source licensing matters to your organisation: OpenTofu.
- New projects: either is a reasonable choice; pick based on licensing preference and the features and integrations you need.
Migrating
Moving between them is usually straightforward when versions are close: back up state, install the other binary, run init and confirm the plan shows no changes. Avoid using features unique to one tool if you want to keep the option to switch.
Was this article helpful?
Comments
No comments yet. Have a question or a tip? Be the first to share it.