navjotdevops/Terraform Version Checker
Check Terraform versions in .terraform-version and .tf files and suggest upgrades to the latest stable version
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| directory | Where to look for terraform files to check for version updates. The directory is relative to the repository's root. Multiple paths can be provided by splitting them with a new line. Example: directory: | /path/to/first/module /path/to/second/module | no | . |
| github-token | GitHub token for PR creation and API access. Use secrets.GITHUB_TOKEN or a PAT. | no | ${{ github.token }} |
| fail-on-updates | Whether to fail the action if outdated versions are found. Set to 'true' to fail the workflow when updates are available. | no | false |
| patches-behind | Number of patch versions behind the latest to target. For example, if latest is 1.14.4 and patches-behind is 2, the action will suggest 1.14.2 instead. | no | 0 |
| apply-updates | Whether to apply the suggested updates to the files. Set to 'true' to modify the files in-place. | no | false |
| create-pr | Whether to create a Pull Request with the version updates. Requires 'apply-updates' to be 'true'. | no | false |
| pr-title | Title for the generated Pull Request | no | — |
| pr-body | Body/Description for the generated Pull Request | no | — |
Outputs
| name | description |
|---|---|
| updates_found | Whether any outdated versions were found (true/false) |
| update_count | Number of version updates recommended |
| current_version | Current Terraform version(s) found in the repository |
| latest_version | Target Terraform version (patches-behind from latest stable) |
| findings | JSON array of all findings with details |