Announcing OpenTofu 1.6.0

Malcolm Matalka

On this page
Introduction
On August 10th 2023, HashiCorp changed the license of many of its open source projects, including Terraform, to the source-available BUSL license. In response, the OpenTofu project was made with the commitment to maintain an open source fork of Terraform. Since the fork, OpenTofu has been accepted into the Linux Foundation, cementing it as an open source project. A team of talented developers have been working full-time on first stable release of OpenTofu.
While hitting the “fork” button on GitHub is easy, it is only the beginning. The OpenTofu team has spent the last months creating the necessary infrastructure to give OpenTofu users the high-quality experience they are used to.
OpenTofu 1.6 is 100% compatible with Terraform 1.6. Migrating from Terraform to OpenTofu is easy and fully documented.
As the first release, OpenTofu 1.6.0 is conservative. It introduces the tofu test
feature as well as numerous smaller enhancements. With the stable release out, version 1.7.0 is already being planned. One feature we are especially looking forward to is encrypted state files.
Installing OpenTofu
An OpenTofu package probably exists for your favorite Linux distribution. Of course, it can also be installed from source.
Alpine
apk add opentofu --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing/apk add --allow-untrusted tofu_*.apk
Debian and Ubunutu
sudo apt-get updatesudo apt-get install -y apt-transport-https ca-certificates curl gnupgsudo install -m 0755 -d /etc/apt/keyringscurl -fsSL https://get.opentofu.org/opentofu.gpg | sudo tee /etc/apt/keyrings/opentofu.gpg >/dev/nullcurl -fsSL https://packages.opentofu.org/opentofu/tofu/gpgkey | sudo gpg --no-tty --batch --dearmor -o /etc/apt/keyrings/opentofu-repo.gpg >/dev/nullsudo chmod a+r /etc/apt/keyrings/opentofu.gpgecho \ "deb [signed-by=/etc/apt/keyrings/opentofu.gpg,/etc/apt/keyrings/opentofu-repo.gpg] https://packages.opentofu.org/opentofu/tofu/any/ any maindeb-src [signed-by=/etc/apt/keyrings/opentofu.gpg,/etc/apt/keyrings/opentofu-repo.gpg] https://packages.opentofu.org/opentofu/tofu/any/ any main" | \ sudo tee /etc/apt/sources.list.d/opentofu.list > /dev/nullsudo apt-get updatesudo apt-get install -y tofu
RHEL and Fedora
cat >/etc/yum.repos.d/opentofu.repo <<EOF[opentofu]name=opentofubaseurl=https://packages.opentofu.org/opentofu/tofu/rpm_any/rpm_any/\$basearchrepo_gpgcheck=0gpgcheck=1enabled=1gpgkey=https://get.opentofu.org/opentofu.gpgsslverify=1sslcacert=/etc/pki/tls/certs/ca-bundle.crtmetadata_expire=300
[opentofu-source]name=opentofu-sourcebaseurl=https://packages.opentofu.org/opentofu/tofu/rpm_any/rpm_any/SRPMSrepo_gpgcheck=0gpgcheck=1enabled=1gpgkey=https://get.opentofu.org/opentofu.gpgsslverify=1sslcacert=/etc/pki/tls/certs/ca-bundle.crtmetadata_expire=300EOF
sudo yum install -y tofu
Snapcraft
snap install --classic opentofu
Homebrew
brew install opentofu
Pre-build Binaries
!/bin/shset -eTOFU_VERSION="1.6.0-alpha2"OS="$(uname | tr '[:upper:]' '[:lower:]')"ARCH="$(uname -m | sed -e 's/aarch64/arm64/' -e 's/x86_64/amd64/')"TEMPDIR="$(mktemp -d)"pushd "${TEMPDIR}" >/dev/nullwget "https://github.com/opentofu/opentofu/releases/download/v${TOFU_VERSION}/tofu_${TOFU_VERSION}_${OS}_${ARCH}.zip"unzip "tofu_${TOFU_VERSION}_${OS}_${ARCH}.zip"sudo mv tofu /usr/local/bin/tofupopd >/dev/nullrm -rf "${TEMPDIR}"echo "OpenTofu is now available at /usr/local/bin/tofu."
Source
git clone git@github.com:opentofu/opentofu.gitcd opentofugo build -ldflags "-w -s -X 'github.com/opentofu/opentofu/version.dev=no'" -o bin/ ./cmd/tofu