dflook/terraform-fmt-check
Check that OpenTofu configuration files are in canonical format
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Maintainedlast commit Jan 13, 2026
- License
- None
Pinned Snippet
uses: dflook/terraform-fmt-check@59168426e242f665bf7b70644d706224e665056a # v2.2.3tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| path | The path containing Terraform files to check the formatting of. | no | . |
| workspace | Terraform workspace to inspect when discovering the Terraform version to use, if the version is not otherwise specified. See [dflook/terraform-version](https://github.com/dflook/terraform-github-actions/tree/main/terraform-version#terraform-version-action) for details. | no | default |
| backend_config | List of Terraform backend config values, one per line. This is used for discovering the Terraform version to use, if the version is not otherwise specified. See [dflook/terraform-version](https://github.com/dflook/terraform-github-actions/tree/main/terraform-version#terraform-version-action) for details. | no | "" |
| backend_config_file | List of Terraform backend config files to use, one per line. This is used for discovering the Terraform version to use, if the version is not otherwise specified. See [dflook/terraform-version](https://github.com/dflook/terraform-github-actions/tree/main/terraform-version#terraform-version-action) for details. Paths should be relative to the GitHub Actions workspace | no | "" |
Outputs
| name | description |
|---|---|
| failure_reason | When 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-reason | When 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. |