Skip to content
Home / Migrations / TerraformOpenTofu

Terraform OpenTofu

easy

OpenTofu is the open-source Terraform fork maintained by the Linux Foundation after HashiCorp's license change to BUSL. Fully compatible with Terraform up to 1.5.x.

Estimated: 1-3h · 4 steps
Progress0%
Step 1: Install OpenTofu

OpenTofu CLI is a drop-in replacement for terraform CLI.

brew install opentofu  # or: curl -s https://packagecloud.io/install/repositories/opentofu/tofu/script.deb.sh | sudo bash
Step 2: Replace CLI calls

Replace `terraform` with `tofu` in all scripts, CI/CD pipelines, and Makefiles.

sed -i 's/terraform/tofu/g' Makefile .github/workflows/*.yml
Step 3: Update state backend (optional)

Existing state files are compatible. No migration needed. OpenTofu reads Terraform state format.

Step 4: Check provider compatibility

Most providers work. Verify your registry source — use registry.opentofu.org or keep registry.terraform.io for now.

tofu init && tofu plan — no errors

What this migration involves

Moving from Terraform to OpenTofu is rated easy and takes about 1-3h on a typical project. The guide breaks it into 4 steps, 2 of which ship with runnable commands and 1 with a verification check.

FAQ

How long does migrating from Terraform to OpenTofu take?

Around 1-3h for a typical project — 4 steps, difficulty rated easy, 2 of them with copy-paste commands.

Is moving from Terraform to OpenTofu reversible?

No reverse guide is tracked yet, so treat this as a one-way move and keep a full export of your Terraform data before you start.

What does OpenTofu cost compared to Terraform?

Pricing for both tools is contact-based or not tracked yet.