Skip to content

Conversation

@chucklever
Copy link
Contributor

terraform is becoming more and more proprietary. We'd like to keep kdevops based on as much open source code as is practically. Fortunately, there is an open source alternative to terraform: OpenTofu. Add a Kconfig setting that allows users to select the use of either terraform or opentofu to handle cloud provisioning. For now the default remains "use terraform".

The gen_tfvars playbook was failing with an undefined variable when
the user forgot to run the new "make cloud-config" step. Add a
helpful error message.

Signed-off-by: Chuck Lever <[email protected]>
Add comprehensive support for OpenTofu as an alternative to Terraform
for infrastructure provisioning. OpenTofu is an open-source fork of
Terraform maintained by the Linux Foundation that provides full
compatibility with Terraform configurations while offering a
community-driven development model.

The implementation adds a Kconfig choice between Terraform and
OpenTofu with automatic binary path configuration. The
install_terraform role now handles installation of either tool based
on user selection, downloading from appropriate sources. All Ansible
tasks using the cloud.terraform.terraform and terraform_output
modules now use the binary_path parameter to invoke the correct tool.

Users can select their preferred tool via menuconfig and the system
handles all necessary configuration automatically through
extra_vars.yaml. Default versions are Terraform 1.2.3 and OpenTofu
1.6.0, both configurable via Ansible variables.

Generated-by: Claude AI
Signed-off-by: Chuck Lever <[email protected]>
@chucklever chucklever merged commit 884379d into main Nov 26, 2025
22 checks passed
@chucklever chucklever deleted the cel/opentofu branch November 26, 2025 15:44
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.

2 participants