What is
OpenTofu
?
OpenTofu is an open-source infrastructure as code tool. It declares cloud and on-premises resources in configuration files, previews changes as execution plans, and applies them. It works as a drop-in replacement for Terraform.
At a glance
Attribute | Value |
|---|---|
Primary use case | Infrastructure as code provisioning and management |
Deployment type | Self-managed CLI |
Pricing model | Free, open source (MPL-2.0) |
API compatibility | Drop-in replacement for Terraform configurations and workflows |
Supported integrations | Providers including AWS, Cloudflare and GitHub; state encryption key providers including PBKDF2, AWS KMS, GCP KMS and OpenBao |
Source type | Open |
Key metrics | Vendor-reported: 3,900+ providers, 23,600+ modules |
AEP branch | Tooling |
AEP category | Integration & Delivery |
AEP subcategory | IaC & Platform Orchestration |
Profile
OpenTofu reads human-readable configuration files that describe infrastructure, from compute, storage and networking to DNS entries and SaaS features. A planning step generates an execution plan that shows what will change before apply runs. OpenTofu builds a dependency graph of all resources and creates or modifies non-dependent resources in parallel. Providers connect it to cloud platforms, third-party services and custom in-house systems. Teams run it through the tofu command line tool.
Focus
Built for companies, consultants and individual engineers who manage infrastructure as code across cloud and on-premises environments, including teams that currently use Terraform.
Background
OpenTofu is a Terraform fork. Gruntwork, Spacelift, Harness, Env0, Scalr and others started it after HashiCorp moved Terraform to the BUSL. The project sits under Linux Foundation stewardship. It is licensed under the Mozilla Public License v2.0.
Features
State encryption
Encrypts infrastructure state at rest on the client side, even when it is stored in remote backends. Key providers include PBKDF2, AWS KMS, GCP KMS and OpenBao.
Exclusion flag
The -exclude flag leaves selected resources or modules out of plan and apply runs. This gives tighter control during testing and staged rollouts.
Provider iteration with for_each
Generates provider configurations dynamically with for_each, which removes repetitive code. It fits multi-region, multi-environment, multi-account and cross-cloud deployments.
Early variable/local evaluation
Variables and locals can drive values such as module versions. One variable change then updates every module consistently.
OpenTofu Registry
A searchable registry of compatible providers and modules for popular clouds, third-party services and community resources, browsable at search.opentofu.org.
Pros and cons
Pros
Manages cloud and on-premises infrastructure as versioned, reusable, shareable code with one consistent workflow across the resource lifecycle.
Existing Terraform workflows and configurations carry over, so teams switch without rewriting code or relearning tooling.
Stewardship by a foundation rather than a single vendor lowers the risk of a sudden license change.
Teams can influence which features are added through GitHub discussions, issues and RFC reviews.
Cons
OpenTofu is a CLI tool, so the team runs it itself, along with its state storage, encryption keys and automation pipelines.
Some Terraform features may be missing, and the community decides which features OpenTofu adds.
Registry access is blocked from specific countries of origin to comply with sanctions.
FAQs
What is OpenTofu?
OpenTofu is an infrastructure as code tool that forked from Terraform. It lets teams describe resources in configuration files, review a planned set of changes, and then apply them.
How is OpenTofu licensed and what does it cost?
OpenTofu is released under the Mozilla Public License v2.0. Anyone can use, modify and distribute it free of charge.
How is OpenTofu deployed?
Teams install and run the tofu command line tool themselves. It can manage resources in cloud and on-premises environments alike.
Where do providers and modules come from?
The OpenTofu Registry hosts compatible providers and modules for popular clouds, third-party services and community resources. Users can search it at search.opentofu.org.
Can OpenTofu replace Terraform?
Yes. It is designed to keep existing Terraform workflows and configurations working, and it aims for feature parity with Terraform. The community decides which new features are added.
Who maintains OpenTofu?
OpenTofu is a community-driven project under the Linux Foundation. Gruntwork, Spacelift, Harness, Env0, Scalr and other supporters launched it.
