opentofu/OpenTofu - Setup Tofu
Sets up OpenTofu CLI in your GitHub Actions workflow.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| cli_config_credentials_hostname | The hostname of a Terraform Cloud/Enterprise instance to place within the credentials block of the OpenTofu CLI configuration file. Defaults to `app.terraform.io`. | no | app.terraform.io |
| cli_config_credentials_token | The API token for a Terraform Cloud/Enterprise instance to place within the credentials block of the OpenTofu CLI configuration file. | no | — |
| tofu_version | The version of OpenTofu CLI to install. If no version is given, it will default to `latest`. | no | latest |
| tofu_version_file | Path to a file containing the OpenTofu version to install. Takes precedence over `tofu_version` if both are provided. | no | — |
| tofu_wrapper | Whether or not to install a wrapper to wrap subsequent calls of the `tofu` binary and expose its STDOUT, STDERR, and exit code as outputs named `stdout`, `stderr`, and `exitcode` respectively. Defaults to `true`. | no | true |
| cache | Whether to use GitHub Actions tool-cache to store and reuse downloaded OpenTofu binaries. Defaults to `false`. | no | false |
| github_token | API token for GitHub to increase the rate limit. Defaults to the GITHUB_TOKEN environment variable unless running on Forgejo/Gitea. | no | "" |
| provider_acceptance_tests | Whether to automatically set environment variables for running OpenTofu provider acceptance tests (TF_ACC, TF_ACC_PROVIDER_NAMESPACE, TF_ACC_PROVIDER_HOST, TF_ACC_TERRAFORM_PATH). Defaults to `false`. | no | false |
| checksums | Newline-delimited list of valid checksums (SHA256 hashes) for the downloaded OpenTofu binary. When set, the action verifies the binary matches one of these checksums before proceeding. When unset, the action verifies the binary against the SHA-256 checksum published in the release's SHA256SUMS file by default. | no | — |
Outputs
| name | description |
|---|---|
| stdout | The STDOUT stream of the call to the `tofu` binary. |
| stderr | The STDERR stream of the call to the `tofu` binary. |
| exitcode | The exit code of the call to the `tofu` binary. |