dflook/tofu-fmt-check

Check that OpenTofu configuration files are in canonical format

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Maintainedlast commit Jan 13, 2026
License
None

Pinned Snippet

workflow.ymlSHA-pinned
uses: dflook/tofu-fmt-check@1ae8a83029b8ad8e6c6a12834e0d3d9cd0e34d5f # v2.2.3

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
pathThe path containing OpenTofu files to check the formatting of.no.
workspaceOpenTofu workspace to inspect when discovering the OpenTofu version to use, if the version is not otherwise specified. See [dflook/tofu-version](https://github.com/dflook/terraform-github-actions/tree/main/tofu-version#tofu-version-action) for details. nodefault
variablesVariables to set when initializing OpenTofu. This should be valid OpenTofu syntax - like a [variable definition file](https://opentofu.org/docs/language/values/variables/#variable-definitions-tfvars-files). Variables set here override any given in `var_file`s. no
var_fileList of tfvars files to use, one per line. Paths should be relative to the GitHub Actions workspace no
backend_configList of OpenTofu backend config values, one per line. This is used for discovering the OpenTofu version to use, if the version is not otherwise specified. See [dflook/tofu-version](https://github.com/dflook/terraform-github-actions/tree/main/tofu-version#tofu-version-action) for details. no""
backend_config_fileList of OpenTofu backend config files to use, one per line. This is used for discovering the OpenTofu version to use, if the version is not otherwise specified. See [dflook/tofu-version](https://github.com/dflook/terraform-github-actions/tree/main/tofu-version#tofu-version-action) for details. Paths should be relative to the GitHub Actions workspace no""
namedescription
failure_reasonWhen the job outcome is `failure` because the format check failed, this will be set to 'check-failed'. If the job fails for any other reason this will not be set. This can be used with the Actions expression syntax to conditionally run a step when the format check fails.
failure-reasonWhen the job outcome is `failure` because the format check failed, this will be set to 'check-failed'. If the job fails for any other reason this will not be set. This can be used with the Actions expression syntax to conditionally run a step when the format check fails.