DevOps
IT Infrastructure

OpenTofu vs Terraform in 2027: Licensing, Features and How to Migrate

Quick answer: OpenTofu vs Terraform

OpenTofu is the open-source fork of Terraform, licensed under MPL 2.0 and governed by the Linux Foundation as a CNCF project. Terraform is developed by HashiCorp, now part of IBM, under the Business Source License (BSL 1.1). Both use the same HCL language, providers and state format, so most code works in either. OpenTofu adds features such as native state encryption, while Terraform offers tighter integration with HCP Terraform and HashiCorp’s commercial tools. Choose OpenTofu for open licensing and portability, and Terraform if you depend on HashiCorp’s platform.

In August 2023 HashiCorp moved Terraform from an open-source licence to the Business Source License. The community answered with OpenTofu, a fork that stayed open source. Three years later, OpenTofu vs Terraform is no longer a question of “is the fork safe?” but of which roadmap, licence and feature set you want to depend on.

This comparison covers licensing, governance, features, compatibility and migration, with a clear recommendation for each type of team. It is written by the engineers behind Gart Solutions’ DevOps services, who build and maintain infrastructure as code for companies on AWS, Azure, Google Cloud and European clouds.

Deciding whether to switch? A Gart DevOps engineer will review your Terraform setup in a free 30-minute call and tell you what a move to OpenTofu would involve.

Get a free IaC review

OpenTofu vs Terraform at a Glance

CriteriaOpenTofuTerraform
LicenceMPL 2.0 (open source, OSI-approved)Business Source License 1.1 (source-available)
GovernanceLinux Foundation, CNCF project, open technical steering committeeHashiCorp, part of IBM
LanguageHCL, same syntaxHCL
Providers and modulesUses the same providers; own public registryTerraform Registry
State file formatCompatibleCompatible
Native state encryptionYes, client-side, with key management servicesNo native client-side encryption in the CLI
Commercial platformWorks with third-party platforms such as Spacelift, env0, Scalr and HarnessHCP Terraform and Terraform Enterprise
Policy as codeOpen Policy Agent and platform toolsSentinel (commercial) and OPA
Best forTeams wanting open licensing, portability and community governanceTeams invested in HashiCorp’s commercial ecosystem

Licensing and Governance: Why the Fork Happened

The Business Source License lets you use Terraform freely in your own company, but it restricts offering it in products that compete with HashiCorp. For most end users that changes little day to day. The bigger concern is control: one company now decides the roadmap and the licence terms. IBM completed its acquisition of HashiCorp in February 2025, which added another layer of uncertainty for some teams.

OpenTofu went the other way. It is hosted by the Linux Foundation, joined the CNCF in 2025, and is maintained by a group of companies and community contributors under the MPL 2.0 licence. No single vendor can change its licence. For companies that build internal platforms, sell services on top of infrastructure as code, or simply prefer open governance, that is the main reason to choose it.

Features Compared

Both tools share everything up to the fork point (Terraform 1.5) and have added features independently since. The table shows the most important differences for day-to-day work.

FeatureOpenTofuTerraform
Client-side state and plan encryptionYes (since 1.7), with AWS KMS, Google Cloud KMS, OpenBao and other key providersNo; relies on backend encryption
Native S3 state locking without DynamoDBYes (since 1.10)Yes in recent versions
Providers and modules from OCI registriesYes (since 1.10)No
Ephemeral resources and write-only attributesYes (1.11)Yes (1.10 and 1.11)
Conditionally enabling resources with an “enabled” argumentYes (1.11)No
Early variable evaluation (variables in backend and module sources)YesNo
Provider for-each iterationYesNo
Terraform Stacks and HCP Terraform featuresNoYes
Sentinel policiesNo (use OPA instead)Yes, in commercial editions
AI and assistant features in the managed platformDepends on the platform you useYes, in HCP Terraform

State encryption is the feature most teams care about. State files often contain passwords, keys and connection strings. With OpenTofu, the file is encrypted before it leaves your machine or pipeline, so it stays protected even if the storage bucket is exposed.

terraform {
  encryption {
    key_provider "aws_kms" "main" {
      kms_key_id = "alias/tofu-state"
      region     = "eu-central-1"
      key_spec   = "AES_256"
    }
    method "aes_gcm" "default" {
      keys = key_provider.aws_kms.main
    }
    state {
      method = method.aes_gcm.default
    }
  }
}

Infrastructure as code that is secure, reviewable and easy to change.

Gart DevOps engineers build and maintain Terraform and OpenTofu codebases: modules, state management, CI/CD pipelines and policy checks.

  • IaC audit: structure, security, state and drift
  • Reusable modules and environments for AWS, Azure, GCP and European clouds
  • Pipelines with plan reviews, policy as code and cost estimates
Explore DevOps servicesTalk to an engineer

Compatibility: Can You Switch Easily?

For most teams, yes. OpenTofu reads the same HCL, uses the same providers and keeps the same state format, so existing configurations usually run unchanged. The main things to check:

CheckWhy it matters
Version constraintsCode that requires Terraform 1.12 or later in required_version needs adjusting, because OpenTofu uses its own version numbers
Newer Terraform-only featuresConfigurations using features added to Terraform after the fork may need small changes
HCP Terraform and Terraform EnterpriseWorkspaces, Sentinel policies and run triggers must move to another platform or to your own CI/CD
ToolingLinters, wrappers such as Terragrunt and CI images need the tofu binary
Going backOnce you enable OpenTofu-only features such as state encryption, returning to Terraform requires undoing them

How to Migrate from Terraform to OpenTofu

StepWhat to do
1. Back up stateCopy every state file and make sure versioning is enabled on the backend
2. Check versionsReview required_version and any Terraform-only features in use
3. Install OpenTofuAdd the tofu binary to developer machines and CI images
4. Initialise and planRun tofu init and tofu plan on a non-production environment; the plan should show no changes
5. Update pipelinesReplace terraform commands with tofu in CI/CD, wrappers and documentation
6. Roll out by environmentMove development, then staging, then production, checking for zero-change plans at each step
7. Adopt new featuresOnly then enable state encryption and other OpenTofu features

A small codebase can switch in a day. Larger estates with many workspaces, a commercial platform and policy checks usually take a few weeks, mostly to move pipelines and policies. For good habits during the move, see our infrastructure as code best practices and guide to scalable Terraform modules.

Want a zero-drama migration? Gart engineers move your state, pipelines and policies to OpenTofu, environment by environment, with zero-change plans at every step.

Plan your migration

Which Should You Choose?

Your situationRecommendation
Starting a new infrastructure as code projectOpenTofu, unless you plan to buy HCP Terraform
You build a platform or product on top of IaCOpenTofu, to avoid licence restrictions
State files contain sensitive data and compliance mattersOpenTofu, for native state encryption
You rely on HCP Terraform, Terraform Enterprise, Stacks or SentinelTerraform, or plan a careful platform migration
You need vendor support contracts from HashiCorp/IBMTerraform
Large existing Terraform estate with no pressing issuesStay for now, but avoid Terraform-only features to keep the option open

Why Teams Choose Gart for Infrastructure as Code

What you getWhy it matters
Hands-on Terraform and OpenTofu experienceWe have built and refactored IaC codebases for SaaS, fintech, healthcare and e-commerce teams
Tool-neutral adviceWe recommend OpenTofu or Terraform based on your licence, platform and compliance needs
Secure state and secretsEncryption, access control and secret management built in from day one
Pipelines and policiesPlan reviews, policy as code and cost estimates in every pull request
Cloud and on-premise reachAWS, Azure, Google Cloud, OVHcloud, Hetzner and Proxmox environments

IaC is often the first step of larger projects, from moving off VMware to optimizing Kubernetes costs. A clean, portable codebase makes all of them faster.

Make your infrastructure code future-proof.

Book a free consultation with a Gart DevOps engineer. We will review your IaC setup and recommend whether to stay on Terraform or move to OpenTofu, and how.

  • Free 30-minute review of your Terraform codebase and pipelines
  • Clear recommendation with risks and effort
  • Optional migration, refactoring and ongoing support
Book a free consultationExplore DevOps services

FAQ

What is the difference between OpenTofu and Terraform?

OpenTofu is the open-source fork of Terraform, licensed under MPL 2.0 and governed by the Linux Foundation. Terraform is developed by HashiCorp, part of IBM, under the Business Source License. They share the same language, providers and state format, but OpenTofu adds features such as native state encryption, while Terraform integrates with HCP Terraform and Sentinel.

Is OpenTofu a drop-in replacement for Terraform?

For most configurations, yes. OpenTofu reads the same HCL and state files and uses the same providers. You may need to adjust version constraints, features added to Terraform after the fork, and anything tied to HCP Terraform or Terraform Enterprise.

Is Terraform still free to use?

Yes, for most companies. The Business Source License allows free internal use, but restricts offering Terraform in products that compete with HashiCorp. It is source-available rather than open source, which is why OpenTofu was created.

Who maintains OpenTofu?

OpenTofu is hosted by the Linux Foundation and is part of the Cloud Native Computing Foundation (CNCF). It is maintained by a technical steering committee with contributors from several companies and the wider community.

Does OpenTofu support state encryption?

Yes. Since version 1.7, OpenTofu can encrypt state and plan files on the client side, using keys from services such as AWS KMS, Google Cloud KMS or OpenBao, or a passphrase. Terraform's open CLI relies on encryption provided by the storage backend instead.

How long does it take to migrate from Terraform to OpenTofu?

A small codebase can switch in a day. Larger estates with many workspaces, CI/CD pipelines, policy checks or a commercial platform usually take a few weeks, mostly to update pipelines and replace HCP Terraform features.
arrow arrow

Thank you
for contacting us!

Please, check your email

arrow arrow

Thank you

You've been subscribed

We use cookies to enhance your browsing experience. By clicking "Accept," you consent to the use of cookies. To learn more, read our Privacy Policy