RSS

OpenTofu vs. Terraform: a comparison of the IaC engines

Infrastructure as Code IaC Tools Open Source State Management CI/CD

What you'll learn: You'll understand what OpenTofu is, what Terraform is, why OpenTofu emerged after a licensing change, the key differences in 2026, and how to choose between them without accidentally designing in vendor lock-in.

OpenTofu vs. Terraform looks, at first glance, like a bikeshed argument over an open source tool that already works – the syntax is the same, the providers are the same, the workflow is the same, and you can usually point terraform plan at some existing Terraform configurations, swap the binary, and get a tofu plan that tells the same story about your desired state.

That's the comforting part.

The less comforting part is that infrastructure as code (IaC) is not just a CLI and a file format, it's a long-lived contract between your team, your cloud resources, your state file, and the governance model that decides who gets to change the rules when your business is mid-migration and your existing infrastructure is already carrying too much memory of past "quick fixes".

How OpenTofu is different to Terraform

OpenTofu is a community-driven fork of Terraform that was built as a drop-in replacement after HashiCorp's licensing model shifted away from an Open Source Initiative type of license. It has deliberately optimized for backward compatibility so opentofu users can keep using the same providers, the same HashiCorp configuration language (HCL), and the same mental model of provisioning infrastructure through plans, applies, and a state management layer that remembers what the real world looks like when your Git repo is not around.

OpenTofu operates under the Linux Foundation, which matters less for the logo and more for the mechanics of community-driven development. A foundation-run project can set expectations about neutral stewardship, community collaboration, and community contributions in a way that feels boring until you are trying to manage infrastructure across multiple cloud providers and suddenly realize your tooling choices have turned into a procurement problem.

In 2025, OpenTofu also joined the Cloud Native Computing Foundation (CNCF), accepted at the Sandbox maturity level. This decision puts it in the same broad ecosystem as other cloud native building blocks and makes the "community involvement" story more legible to teams that already treat CNCF membership as a signal about long-term community-driven maintenance.

What is Terraform?

Terraform is the original project that popularized a huge chunk of the modern IaC tool pattern. 

It's a declarative workflow that lets you describe infrastructure as code using HCL, compile that intent into a `terraform plan`, and then apply those changes against cloud resources across AWS, Google Cloud, Microsoft Azure

If you've lived inside the Terraform ecosystem for any length of time, you already know the muscle memory. It's not really about the CLI flags, it's about the structure of teams, the way Terraform modules become organizational APIs, and the way the HashiCorp ecosystem bundles adjacent tooling (policy, secrets, runtimes, hosted workflows) into something that can feel like an operating model rather than just a binary.

That track record is why Terraform keeps showing up in production use even after the licensing change. 

Stability has value, inertia has value, and commercial support has value, especially when you are trying to manage cloud resources in regulated environments, and the people signing the risk register want a vendor on the other side of the contract.

What is OpenTofu?

The headline event was August 10, 2023, when HashiCorp announced it would adopt the Business Source License (BSL, sometimes written as BUSL) for future releases of its products. 

Terraform moved away from the Mozilla Public License 2.0 (MPL 2.0), which many people treat as a truly open source baseline.

The open source license ensures you do not wake up one day and discover your tooling is now governed by constraints that were never part of your original project assumptions.

OpenTofu's fork announcement and early releases were, explicitly, a community response to that licensing change, and the tone was not subtle about what they were optimizing for, which was a "truly open source" future with community-driven governance rather than a single-vendor roadmap.

OpenTofu vs. Terraform comparison

A comparison of the two tools is mostly about risk, not syntax.

Most of the differences you feel day-to-day are not about the HCL parser or the plan graph, they are about the licensing model, where feature investment goes, how fast "new features" ship, and how much you care about being able to treat your IaC tool as a shared commons rather than a product that can become a lever for vendor lock-in.

Category OpenTofu Terraform
Open source license Mozilla Public License 2.0 (MPL 2.0), positioned as truly open source and foundation governed. Business Source License (BSL 1.1) for future releases, a source-available model with additional restrictions.
Governance Linux Foundation stewardship, CNCF Sandbox project, community driven development with broad community involvement. Vendor governed roadmap and release strategy inside the HashiCorp ecosystem.
Compatibility Designed as a drop in replacement for many existing terraform configurations, same syntax and same providers in most common cases. The reference implementation for Terraform language features and the historical center of the terraform ecosystem.
State management Built-in state and plan encryption options that apply locally and with remote backends. Strong guidance on protecting sensitive data, state security typically relies on backend encryption and access controls.
Hosted workflows No first-party Terraform Cloud equivalent, focuses on CLI and ecosystem integrations. Terraform Cloud and related hosted offerings are a major part of the product story.
Testing `tofu test` improvements such as provider mocking and resource overrides for integration testing workflows. Testing exists, but OpenTofu has been investing visibly in test ergonomics post-fork.

That table is the skeleton, but the muscles matter. Below are the five biggest differences.

1. Licensing

The biggest OpenTofu vs. Terraform difference is still licensing. Once you move from MPL 2.0 to a BSL license, you've changed the default posture for community contributions and created a class of users who will now treat upgrades as a legal review rather than a routine dependency bump.

2. Governance

The second biggest difference is governance, because Linux Foundation stewardship and CNCF membership do not magically produce better code. Instead, they change who gets to say no, who gets to merge, and how community collaboration is structured when the roadmap has to balance enterprise needs with the open source nature of the project.

3. Features

The third difference is that OpenTofu has chosen to invest in features that are unambiguously about operator pain, and not about monetization.

OpenTofu's features around early variable evaluation are a good example, because they sound like a small compiler detail until you're trying to parameterize remote backends, module sources, or encryption configuration across environments.

You quickly realize the "static" configuration boundary in Terraform has always been a little too rigid for real-world continuous delivery workflows.

State encryption is the other obvious example, because everyone has known for years that the state file tends to accumulate sensitive data (provider credentials, resource attributes, accidental secrets), and while Terraform's normal posture is to tell you to encrypt your backend storage and lock down access, OpenTofu offers first-class state encryption and plan encryption as part of state management itself, which is both a security win and a portability win when your remote backends are not uniform across environments.

4. Workflows

A lot of "terraform vs opentofu comparison" posts get stuck in philosophy and forget that engineers live in commands, so it's worth being explicit about the boring parts.

`terraform plan` and `tofu plan` are the same conceptual operation: a read of current state, a refresh against real cloud resources, a diff against configuration, and an execution plan you can review before you apply.

OpenTofu's CLI docs and Terraform's CLI docs will feel familiar enough that you can wrap both in GitHub Actions for continuous delivery, pin versions, and standardize the interface across repos, which is exactly what teams do when they are trying to manage infrastructure changes through pull requests and avoid turning IaC into a bespoke snowflake per team.

Here is a minimal GitHub Actions shape that runs a tofu plan against existing Terraform configurations, assuming your repo already uses HCL and remote backends that OpenTofu supports.

name: tofu plan
on:
  pull_request:
jobs:
  plan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: opentofu/setup-opentofu@v1
      - run: tofu init
      - run: tofu plan -detailed-exitcode

If you already have Terraform providers pinned and your state management story is clean, the drop-in replacement claim is often true in practice, which is why a comparison of OpenTofu and Terraform tends to be less about migration mechanics and more about whether you want to anchor your infrastructure tooling in a community-driven project or in a vendor product line.

5. Terraform Cloud

Terraform Cloud is not just a hosted backend, it's a workflow product with opinions about collaboration, policy, secrets, and state.

If your organization has already standardized on it, you're not choosing between Terraform and OpenTofu in the abstract, you're choosing whether the hosted platform is part of your infrastructure control plane.

OpenTofu does document a "cloud" configuration that targets Terraform Cloud-style workflows. You can, in many cases, use Terraform Cloud as a remote backend with OpenTofu, but the moment you do, you're reintroducing the HashiCorp ecosystem as a dependency.

This decision may work out fine, but it changes the risk profile compared to using simpler remote backends like object storage in Google Cloud Storage or Azure Blob Storage with your own access controls.

This is where "vendor lock-in" stops being a slogan and becomes a budgeting reality, because the more of your workflow you put into a proprietary control plane, the harder it is to treat your IaC tool as interchangeable plumbing.

When you should use OpenTofu versus Terraform

If you care about the open source license, not as a moral badge but as a constraint that protects future optionality, OpenTofu is usually the more comfortable choice.

Its MPL posture and foundation governance are explicitly designed to keep the project in the category of truly open source, and that matters if you build internal platforms, ship infrastructure tooling, or simply do not want your IaC tools to become entangled with a restrictive business source license.

If you want OpenTofu's newer features, especially early variable evaluation and built-in state encryption, you will also lean toward OpenTofu, because those are direct answers to the daily pain of managing state files, remote backends, and environment templating without creating a spaghetti bowl of wrapper scripts.

If you are trying to avoid a split-brain infrastructure story – where one group runs Terraform and another group runs OpenTofu, and everyone shares Terraform modules but nobody agrees on upgrade cadence – adopting OpenTofu as the default engine can simplify the Terraform and OpenTofu coexistence problem by making Terraform the exception rather than the baseline.

And yes, that sounds like a political statement, but infrastructure is full of political statements that are also tooling decisions.

When you should use Terraform versus OpenTofu

If you're deeply invested in Terraform Cloud, in its policy workflows, in its organizational constructs, and in the comfort of official commercial support, Terraform remains the straightforward choice. However, that choice further entrenches vendor lock-in and makes portability harder later on.

You're buying an integrated experience, not just a CLI, and you're aligning with the vendor roadmap that is funding that experience.

If your internal governance model values a single accountable vendor more than it values community driven development, Terraform's position as the original project with the deepest historical track record can still win – especially when the people who approve production use want one escalation path and do not want to reason about foundation governance, CNCF maturity levels, or the subtle ways a fork can diverge over time.

This is also where the decision between the two gets made.

OpenTofu is no longer a new experiment, but Terraform remains the gravitational center for a lot of enterprise documentation, CI/CD pipelines, training materials, and default assumptions, and switching those assumptions has a cost, even when the code migration is easy.

Can you use OpenTofu and Terraform together?

You can run OpenTofu and Terraform together.

Some teams do so because they're slowly moving away from a licensing model they do not like without taking on a big-bang migration.

The trap is that the differences accumulate in the margins, so the more you rely on OpenTofu-only features (state encryption, certain testing enhancements, future language extensions, the .tofu file extension), the harder it is to treat the two as interchangeable.

Also, the more you rely on Terraform-only hosted workflows, the more OpenTofu becomes a partial participant in your infrastructure story rather than a full replacement.

If you need both, the least painful approach is to be explicit about boundaries, pin versions, keep your Terraform modules conservative, and treat provider upgrades as integration testing events rather than casual bumps.

It's necessary to do this because the failure mode is not usually "plan fails", it's "plan succeeds, and later you discover state management diverged across environments".

Stategraph Orchestration can help here by giving you a consistent pull request workflow for both Terraform and OpenTofu, so you can run tofu plan or terraform plan as a controlled, reviewable operation, enforce approvals, and keep continuous delivery tied to Git history rather than to whoever last clicked a button in a web UI.

Conclusion: Making a decision

If you only care about syntax, the decision is between two near-identical tools, because the same syntax and providers story holds for most teams most of the time.

If you care about long-term optionality, community collaboration, and the ability to treat your IaC tool as infrastructure rather than as a product dependency, choosing between OpenTofu and Terraform is a real architectural choice, which shows up in procurement, security posture, and how confident you feel betting your workflows on a state file that will outlive your current cloud platform strategy.

Still not sure? You can also review Terraform vs. AWS CDK in our dedicated comparison article.