Linters
tfaction runs some linters in test and test-module actions.
- terraform validate
- suzuki-shunsuke/github-action-tflint
- suzuki-shunsuke/github-action-tfsec
- suzuki-shunsuke/trivy-config-action
Enable or disable linters
You can enable or disable the following linters
- tflint
- tfsec
- Trivy
You can configure them at tfaction-root.yaml
.
By default, tflint and tfsec are enabled and Trivy is disabled.
If you want to migrate tfsec to Trivy, please disable tfsec and enable Trivy.
tfsec:
enabled: false
trivy:
enabled: true
You can also disable tflint.
tflint:
enabled: false
tflint
tfaction runs tflint and notifies the result.
--
Fix code by tflint --fix
#2104 tfaction >= v1.13.0, tflint >= v0.47.0
Codes are fixed by tflint --fix
and a commit is pushed to the feature branch.
By default, this feature is disabled. You can enable this by tfaction-root.yaml.
tflint:
enabled: true
fix: true # Enable `tflint --fix`
tfsec
tfaction runs tfsec and notifies the result.
--
Trivy
--