terraform-linters/Setup TFLint
Sets up tflint 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 |
|---|---|---|---|
| tflint_version | TFLint version to install | no | latest |
| tflint_version_file | Path to a file containing the TFLint version to install (an asdf/mise `.tool-versions` entry, or a plain version file). Used when `tflint_version` is unset or `latest`. | no | — |
| github_token | GitHub token - used when getting the latest version of tflint | no | ${{ github.server_url == 'https://github.com' && github.token || '' }} |
| tflint_wrapper | Installs a wrapper script to wrap subsequent calls to `tflint` and expose `stdout`, `stderr`, and `exitcode` outputs | no | false |
| checksums | Newline-delimited list of valid checksums (SHA256 hashes) for the downloaded TFLint binary. When set, the action will verify that the binary matches one of these checksums before proceeding. | no | — |
| cache | Enable caching of TFLint plugins | no | false |
| tflint_config_path | Glob pattern for TFLint config files used to generate cache key | no | .tflint.hcl |
| plugin_dir | Directory where TFLint plugins are installed. Can also be set via TFLINT_PLUGIN_DIR environment variable. | no | ~/.tflint.d/plugins |
Outputs
| name | description |
|---|---|
| tflint-version | The installed version of TFLint |
| cache-hit | A boolean value to indicate a cache entry was found |
| stdout | The output (stdout) produced by the tflint command. Only available if `tflint_wrapper` is set to `true`. |
| stderr | The error output (stderr) produced by the tflint command. Only available if `tflint_wrapper` is set to `true`. |
| exitcode | The exit code produced by the tflint command. Only available if `tflint_wrapper` is set to `true`. |