Skip to content

Conversation

@alexandermarston
Copy link
Collaborator

@alexandermarston alexandermarston commented Dec 12, 2025

For some time, Tofu Controller has only supported up to version 1.5.7 of Terraform due to the licensing changes Hashicorp announced and implemented in 2023. As we have not been able to update to a newer version of Terraform and had not completed the migration to OpenTofu, users have been forced to deploy their own custom runner images.

This PR starts the process of moving away from Hashicorp Terraform and to the OpenTofu implementation.

For this change, a few changes have been made:

  • GitHub workflows now setup OpenTofu binaries, rather than Terraform.
  • Various Test Cases have been updates to account for OpenTofu specific CLI output.
  • Runner Images have been updated to make the tofu binary available to the runner, pulling this in from the OpenTofu minimal images rather than downloading architecture specific binaries.

@artem-nefedov
Copy link
Contributor

This probably needs to be highlighted as a breaking change for those who build their own runner images and update terraform binary there

@alexandermarston alexandermarston changed the title Implement opentofu Migrate Tofu Controller to OpenTofu Dec 13, 2025
@alexandermarston alexandermarston marked this pull request as draft December 16, 2025 11:34
@mloiseleur
Copy link
Contributor

This PR may fix #1437

OS-alexandrebrito added a commit to OS-alexandrebrito/tofu-controller that referenced this pull request Jan 9, 2026
  Implements support for both Terraform and OpenTofu binaries using
  separate Dockerfiles with minimal code changes. This enables teams
  to use either binary while maintaining security compliance, with
  OpenTofu as the default and a clear deprecation path for Terraform.

  Changes:
  - Updated runner.Dockerfile and runner-azure.Dockerfile to OpenTofu v1.11.2
  - Created runner-terraform.Dockerfile and runner-terraform-azure.Dockerfile
  - Updated CI/CD workflows to build all 4 image variants
  - Added binary detection in runner/server.go
  - Added Terraform v1.14.3 support via separate images
  - Updated documentation for binary selection
  - Removed unnecessary BINARY_TYPE build arguments

  Images published:
  - OpenTofu (default): v{VERSION}, latest
  - Terraform: v{VERSION}-terraform, latest-terraform

  Binary versions:
  - OpenTofu: 1.11.2
  - Terraform: 1.14.3 (up from 1.5.7)

  Breaking changes for Terraform users:
  - S3 backend role_arn deprecated (use assume_role block)
  - -state flag deprecated (use backend configuration)
  - See IMPLEMENTATION_VERIFICATION.md for migration guidance

  Related to PR flux-iac#1675
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants