Favicon of OpenTofu

OpenTofu

OpenTofu is an open-source, MPL-2.0 licensed tool for declaratively managing cloud and custom infrastructure via configuration files.

Open Source Alternative to:
OpenTofu website screenshot
OpenTofu GitHub repository preview

OpenTofu is an open-source infrastructure as code (IaC) tool for building, changing, and versioning infrastructure through declarative configuration files. It's built for platform engineers, SREs, and DevOps teams who need to manage cloud resources, self-managed services, and custom in-house systems from a single codebase, without depending on a proprietary license.

Infrastructure is described in a high-level configuration language, then applied against providers for cloud platforms, SaaS tools, or internal systems. OpenTofu computes an execution plan before making any changes, so you see exactly what will be created, modified, or destroyed before it happens.

Key features

  • Infrastructure as Code: Define your datacenter and services in configuration files that can be versioned, reviewed, shared, and reused like any other code.
  • Execution Plans: Run a planning step that shows precisely what OpenTofu will do before you apply changes, removing guesswork from infrastructure updates.
  • Resource Graph: OpenTofu builds a dependency graph of all resources and parallelizes creation and modification of independent resources for faster, more predictable runs.
  • Change Automation: Apply complex changesets with minimal manual intervention, relying on the plan and graph to determine order and reduce human error.
  • Open governance: Licensed under MPL-2.0 and developed under open, community-driven governance with public Technical Steering Committee meetings.
  • Nightly builds: Experimental builds off main are published for testing upcoming changes, separate from stable releases.

Ideal use cases

OpenTofu fits teams that need to provision and manage cloud infrastructure (VMs, networks, databases, managed services) across one or more providers using a single, versioned configuration. It works well for organizations that want an open-source IaC tool without proprietary licensing terms, and for teams already familiar with HCL-based configuration workflows who want to keep infrastructure changes auditable through plan/apply cycles.

It's a good match for managing both popular cloud providers and custom, in-house infrastructure through the same tooling and workflow. Teams running CI/CD pipelines that need repeatable, reviewable infrastructure changes benefit from the execution plan step, since it catches unintended changes before they hit production.

OpenTofu is not the right tool if you need imperative, one-off scripting for infrastructure tasks, or if your infrastructure changes rarely enough that a declarative state-based tool adds more overhead than value. It's also not a configuration management tool for managing software inside running instances (that's a job for tools like Ansible or Chef); it focuses on provisioning and lifecycle management of infrastructure resources themselves.

Installation

The README points to the official install guide for setup instructions:

For testing unreleased changes, nightly builds off main are published and removed after 30 days:

https://nightlies.opentofu.org/nightlies

Automated tooling can check for the latest nightly build info at:

https://nightlies.opentofu.org/nightlies/latest.json

Nightly builds are experimental and not intended for production use; use the stable install guide above for production deployments. After installing, configuration files are written in the OpenTofu language, and infrastructure changes follow the standard plan-then-apply workflow.

For questions or contribution, the project maintains GitHub Discussions, a GitHub issue tracker, a Slack channel (#opentofu on CNCF Slack), and recurring community and Technical Steering Committee meetings, with a public calendar available for those who want to track events.

Frequently asked questions

Share:

Stars
29.9K
Forks
1.3K
Last commit
3 hours ago
Repository age
3 years
License
MPL-2.0
Self-hosted
No
Activity score
82/100
View Repository
Built with:
Ad
Favicon

 

  
 

Similar to OpenTofu

Favicon

 

  
 
Favicon

 

  
 
Favicon