opentofu
OpenTofu
Overview
OpenTofu (tofu) is a drop-in replacement for the Terraform CLI that stayed open source after HashiCorp moved Terraform to the BSL license. It reads the same .tf files and the same registry providers and modules. Migrating is mostly "run tofu instead of terraform". It also has features Terraform does not: client-side encryption of state and plan files, lifecycle { enabled = ... }, for_each on providers, and variables in backend and module source blocks. This skill covers install, project layout, state encryption, remote state, tests, migration and CI use. It was checked against OpenTofu 1.13.2.
Instructions
1. Install
brew install opentofu # macOS, Linux (Homebrew)
sudo snap install --classic opentofu # Linux with snap
tofu version # expect: OpenTofu v1.13.x
Other options (deb/rpm repositories, Windows winget, a standalone installer script) are listed at https://opentofu.org/docs/intro/install/. If you use the standalone script, download it to a file, read it, and run it from the file; do not pipe it into a shell. The script verifies its downloads with cosign or GnuPG, so one of them must be installed. For a manual install, download the release zip and tofu_<version>_SHA256SUMS from the GitHub release page and run sha256sum -c before unzipping.