Announcing OpenTofu 1.6.0

By Malcolm Matalka on Jan 10, 2024
Announcing OpenTofu 1.6.0

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

Original instructions

apk add opentofu --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing/
apk add --allow-untrusted tofu_*.apk

Debian and Ubunutu

Original instructions

sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://get.opentofu.org/opentofu.gpg | sudo tee /etc/apt/keyrings/opentofu.gpg >/dev/null
curl -fsSL https://packages.opentofu.org/opentofu/tofu/gpgkey | sudo gpg --no-tty --batch --dearmor -o /etc/apt/keyrings/opentofu-repo.gpg >/dev/null
sudo chmod a+r /etc/apt/keyrings/opentofu.gpg
echo \
"deb [signed-by=/etc/apt/keyrings/opentofu.gpg,/etc/apt/keyrings/opentofu-repo.gpg] https://packages.opentofu.org/opentofu/tofu/any/ any main
deb-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/null
sudo apt-get update
sudo apt-get install -y tofu

RHEL and Fedora

cat >/etc/yum.repos.d/opentofu.repo <<EOF
[opentofu]
name=opentofu
baseurl=https://packages.opentofu.org/opentofu/tofu/rpm_any/rpm_any/\$basearch
repo_gpgcheck=0
gpgcheck=1
enabled=1
gpgkey=https://get.opentofu.org/opentofu.gpg
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
[opentofu-source]
name=opentofu-source
baseurl=https://packages.opentofu.org/opentofu/tofu/rpm_any/rpm_any/SRPMS
repo_gpgcheck=0
gpgcheck=1
enabled=1
gpgkey=https://get.opentofu.org/opentofu.gpg
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EOF
sudo yum install -y tofu

Snapcraft

Original instructions

snap install --classic opentofu

Homebrew

Original instructions

brew install opentofu

Pre-build Binaries

Original instructions

#!/bin/sh
set -e
TOFU_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/null
wget "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/tofu
popd >/dev/null
rm -rf "${TEMPDIR}"
echo "OpenTofu is now available at /usr/local/bin/tofu."

Source

Original instructions

git clone git@github.com:opentofu/opentofu.git
cd opentofu
go build -ldflags "-w -s -X 'github.com/opentofu/opentofu/version.dev=no'" -o bin/ ./cmd/tofu
We use cookies and similar technologies to provide certain features, enhance the user experience and deliver content that is relevant to your interests. Depending on their purpose, analysis and marketing cookies may be used in addition to technically necessary cookies. By clicking on "Agree and continue", you declare your consent to the use of the aforementioned cookies. Here you can make detailed settings or revoke your consent (in part if necessary) with effect for the future. For further information, please refer to our Privacy Policy .