Skip to content

TERRAFORM

Linters

Linter Additional
tflint
TERRAFORM_TFLINT
GitHub stars sarif
terrascan
TERRAFORM_TERRASCAN
GitHub stars sarif
terragrunt
TERRAFORM_TERRAGRUNT
GitHub stars autofix
terraform-fmt
TERRAFORM_TERRAFORM_FMT
GitHub stars formatter

Linted files

  • File extensions:
    • .tf

Configuration in MegaLinter

Variable Description Default value
TERRAFORM_PRE_COMMANDS List of bash commands to run before the linters None
TERRAFORM_POST_COMMANDS List of bash commands to run after the linters None
TERRAFORM_FILTER_REGEX_INCLUDE Custom regex including filter
TERRAFORM_FILTER_REGEX_EXCLUDE Custom regex excluding filter