No description https://opentofu.org
Find a file
Dmitry Kisler 0c987c51b8
fix: ci trial with matrix extension to set wrapper
Signed-off-by: Dmitry Kisler <admin@dkisler.com>
2023-10-10 00:13:52 +02:00
.github fix: ci trial with matrix extension to set wrapper 2023-10-10 00:13:52 +02:00
.husky feat: ported action definition from setup-terraform 2023-10-05 01:15:05 +02:00
dist chore: migrated terraformrc to tofurc 2023-10-09 22:46:28 +02:00
lib chore: migrated terraformrc to tofurc 2023-10-09 22:46:28 +02:00
wrapper feat: ported action definition from setup-terraform 2023-10-05 01:15:05 +02:00
.gitignore feat: ported action definition from setup-terraform 2023-10-05 01:15:05 +02:00
action.yml fix: missing a single quotation mark. 2023-10-09 22:49:25 +02:00
CHANGELOG.md chore: paraphrasing for clarity 2023-10-09 22:52:12 +02:00
CODE_OF_CONDUCT.md chore: init docs 2023-10-04 23:09:39 +02:00
CODEOWNERS chore: init docs 2023-10-04 23:09:39 +02:00
index.js feat: ported action definition from setup-terraform 2023-10-05 01:15:05 +02:00
LICENSE chore: init docs 2023-10-04 23:09:39 +02:00
package-lock.json chore: pinned the dependencies 2023-10-09 22:40:24 +02:00
package.json chore: pinned the dependencies 2023-10-09 22:40:24 +02:00
README.md chore: migrated terraformrc to tofurc 2023-10-09 22:46:28 +02:00

setup-opentofu

The opentofu/setup-opentofu action sets up OpenTofu CLI in your GitHub Actions workflow by:

  • Downloading the latest version of OpenTofu CLI and adding it to the PATH.
  • Configuring the CLI configuration file with a Terraform Cloud/Enterprise hostname and API token.
  • Installing a wrapper script to wrap subsequent calls of the tofu binary and expose its STDOUT, STDERR, and exit code as outputs named stdout, stderr, and exitcode respectively. (This can be optionally skipped if subsequent steps in the same job do not need to access the results of OpenTofu commands.)

After you've used the action, subsequent steps in the same job can run arbitrary OpenTofu commands using the GitHub Actions run syntax. This allows most OpenTofu commands to work exactly like they do on your local command line.

Usage

This action can be run on ubuntu-latest, windows-latest, and macos-latest GitHub Actions runners. When running on windows-latest the shell should be set to Bash.

The default configuration installs the latest version of OpenTofu CLI and installs the wrapper script to wrap subsequent calls to the tofu binary:

steps:
- uses: opentofu/setup-opentofu

Inputs

The action supports the following inputs:

  • cli_config_credentials_hostname - (optional) 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.
  • cli_config_credentials_token - (optional) The API token for a Terraform Cloud/Enterprise instance to place within the credentials block of the OpenTofu CLI configuration file.
  • tofu_version - (optional) The version of OpenTofu CLI to install. If no version is given, it will default to latest.
  • tofu_wrapper - (optional) Whether 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.

Outputs

This action does not configure any outputs directly. However, when you set the tofu_wrapper input to true, the following outputs are available for subsequent steps that call the tofu binary:

  • 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.

License

Mozilla Public License v2.0

Code of Conduct

Code of Conduct

Experimental Status

By using the software in this repository (the "Software"), you acknowledge that: (1) the Software is still in development, may change, and has not been released as a commercial product by OpenTofu; (2) the Software is provided on an "as-is" basis, and may include bugs, errors, or other issues; (3) the Software is NOT INTENDED FOR PRODUCTION USE, use of the Software may result in unexpected results, loss of data, or other unexpected results, and OpenTofu disclaims any and all liability resulting from use of the Software.