A GitHub Action to install and configure the OpenTofu CLI for infrastructure-as-code workflows.
opentofu/setup-opentofu is a GitHub Action that installs and configures the OpenTofu CLI in GitHub Actions workflows. It solves the problem of manually setting up OpenTofu for infrastructure-as-code automation by providing a reusable, configurable step that handles version installation, credential setup, and output management.
DevOps engineers and developers who use GitHub Actions for CI/CD and need to run OpenTofu commands for infrastructure provisioning and management as part of their automated pipelines.
Developers choose this action because it offers a streamlined, official-feeling setup for OpenTofu within GitHub Actions, with features like version flexibility, credential integration, and output wrapping that enhance workflow automation and reliability.
The opentofu/setup-opentofu action is a tool for GitHub Actions that automates the setup of the OpenTofu CLI. It enables developers to seamlessly integrate infrastructure-as-code practices into their CI/CD pipelines by providing the necessary command-line tools directly in their workflow runners.
tofu binary to expose its STDOUT, STDERR, and exit code as outputs for subsequent steps.The action is designed to be a reliable, community-maintained utility that simplifies OpenTofu integration in automated workflows, emphasizing flexibility through configurable inputs and outputs.
Supports specific versions, version files, and semantic versioning ranges including pre-releases, as shown in the README with examples like '1.6.0' or '.opentofu-version' files.
Configures Terraform Cloud/Enterprise credentials directly from GitHub Secrets via inputs like cli_config_credentials_token, simplifying secure authentication in workflows.
When enabled, the wrapper script captures STDOUT, STDERR, and exit codes as outputs, facilitating advanced automation like PR comments, as demonstrated in the usage examples.
Runs on Ubuntu, Windows, and macOS GitHub Actions runners, with Bash shell support on Windows, ensuring broad environment coverage.
The README notes that users may experience trouble with exit codes or output format, requiring them to set tofu_wrapper to false as a workaround, indicating potential instability.
Marked as community-maintained, the OpenTofu team does not fix non-critical bugs or add features, which could lead to slower updates and limited support for edge cases.
Binary caching is primarily useful for self-hosted runners; on GitHub-hosted runners, the ephemeral nature limits persistence, reducing its practical benefit as admitted in the README.
A GitOps OpenTofu and Terraform controller for Flux
GitHub actions for Terraform and OpenTofu
Plan and apply Terraform/OpenTofu via PR automation, using best practices for secure and scalable IaC workflows.
Automating workflows via pull requests
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.