Terraform or OpenTofu? Infrastructure as code in 2026

For years, Terraform has been the standard tool for managing infrastructure as code (IaC): you describe virtual machines, networks, DNS records and cloud services in text files, and the tool creates, changes or deletes them. Since 2023, however, it has had an open source fork, OpenTofu, and if you are starting out now or maintaining existing code, it is a fair question: which one should you use? In this article we compare the current state of the two tools.

What does infrastructure as code mean?

Instead of clicking around by hand, the description of the infrastructure lives in a Git repository. This has three big advantages:

  • Repeatable: the same code produces the same environment in test and in production.
  • Transparent: every change is a commit, you can see who changed what and why, and it can be reverted.
  • Verifiable: the plan step shows in advance what will change, before anything happens.

A simple example that creates an S3 bucket in AWS. This code runs the same way with Terraform and OpenTofu:

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 6.0"
    }
  }
}

provider "aws" {
  region = "eu-central-1"
}

resource "aws_s3_bucket" "backup" {
  bucket = "example-company-backups"
}
terraform init && terraform plan    # or: tofu init && tofu plan
terraform apply                      # or: tofu apply

Where does OpenTofu come from?

In August 2023, HashiCorp changed Terraform’s licence from the open source MPL 2.0 to the Business Source License (BSL 1.1). Under the BSL, Terraform can be used freely to manage your own infrastructure, but it can’t be built into a product that competes with HashiCorp’s services. In response, several companies and developers forked the last MPL version; the project moved under the Linux Foundation as OpenTofu, and in January 2024 the first stable release came out, 1.6.0. In April 2025, OpenTofu became a sandbox project of the CNCF (Cloud Native Computing Foundation).

Meanwhile HashiCorp changed hands: IBM completed its acquisition of the company in February 2025. Terraform development continues under IBM.

Where do the two tools stand now?

Both projects are active, and they release new versions at a roughly similar pace:

  • Terraform 1.15 was released on 29 April 2026. Among other things, variables and local values can now be used in the source and version values of modules, variables and outputs can be marked deprecated, and the S3 backend supports aws login authentication.
  • OpenTofu 1.12 was released yesterday, 14 May 2026. prevent_destroy can now also be controlled from a variable, the new destroy = false lifecycle setting lets you remove a resource from the state without deleting it, and tofu init records the providers’ checksums for every platform.

The differences in one table

  Terraform OpenTofu
Licence BSL 1.1 (source available, with restrictions) MPL 2.0 (open source)
Developer HashiCorp (IBM) community, Linux Foundation / CNCF
Command terraform tofu
Configuration language HCL HCL, same syntax
Providers Terraform Registry OpenTofu Registry, with the same providers
State file encryption on the backend side (for example S3 encryption) built-in client-side encryption as well (since 1.7)
Features unique to each terraform test, queries (query), actions enabled meta-argument, provider-level for_each, variables in the backend block
Cloud platform HCP Terraform (paid plans and a free tier) none of its own; third-party or your own CI/CD

The two tools split around versions 1.5–1.6. Since the split, both have added features that the other doesn’t have, or that work differently. Simpler, “traditional” configurations, however – resources, modules, variables, outputs – run the same way in both.

What matters when choosing?

Licence and business model

If you manage your own infrastructure or your clients’, the BSL doesn’t restrict you in practice. But if you are building a product or service that itself offers infrastructure automation, it’s worth having a lawyer review the BSL terms, and here OpenTofu is the safer choice.

HCP Terraform and teamwork

HashiCorp’s cloud platform, HCP Terraform, provides state storage, runs, access management and policy checks. The old free plan ended on 31 March 2026, and accounts were moved to the new, limited free tier. If your team uses it and is happy with it, Terraform remains the obvious choice. If runs happen in your own CI/CD system anyway (for example in GitLab CI, where GitLab can also store the state), OpenTofu fits in just as well.

Features

If you need a specific feature – with OpenTofu, for example, the built-in state encryption; with Terraform, the HCP integration or the latest provider capabilities – that may settle the question. It’s worth trying both on your own code before you commit.

Stability and future

Both projects have serious backing: IBM behind Terraform, and a foundation and several companies building on it behind OpenTofu. Neither is going to disappear in the next few years.

Migrating from Terraform to OpenTofu

If you use Terraform 1.5 or earlier, the migration is simple in most cases:

# 1. fresh state backup
terraform state pull > state-backup.tfstate

# 2. check: according to Terraform there are no pending changes
terraform plan

# 3. in the same directory, with OpenTofu
tofu init
tofu plan      # ideally: "No changes."

From a newer Terraform version, follow OpenTofu’s migration guide, because a feature that exists only in Terraform (for example certain removed or import blocks, or some parts of terraform test) may need changes. Always back up the state file beforehand, and try it on a test environment first.

What do we recommend?

  • Existing Terraform code that works well, with HCP Terraform: you have no reason to switch.
  • New project, with your own CI/CD, without licence concerns: both are good; if there is no strong argument for Terraform, OpenTofu’s open licence raises fewer questions in the long run.
  • You are building a product or service on IaC: OpenTofu.

Whichever you choose, the point is the same: the infrastructure should live in Git, changes should go to production through plan and code review, and nobody should make changes by hand in the cloud console. For the internal configuration of servers (packages, configuration files, services), a configuration management tool complements this well; we introduced the basics in our Ansible for beginners article. If you are starting out in the cloud, you can read about cloud service models (IaaS, PaaS, SaaS) on the blog of our hosting brand, aWh.

We also help with building and operating AWS, Google Cloud and OVHcloud infrastructure as code; you can read more on our Cloud and DevOps page.

Let’s talk about your project

Tell us briefly how we can help, and we will get back to you as soon as we can.

Get in touch