TFLint

TFLint is a framework and each feature is provided by plugins, the key features are as follows:

  • Find possible errors (like invalid instance types) for Major Cloud providers (AWS/Azure/GCP).

  • Warn about deprecated syntax, unused declarations.

  • Enforce best practices, naming conventions.

Linux:

curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash

Windows:

choco install tflint

Docker/Podman

docker run --rm -v $(pwd):/data -t ghcr.io/terraform-linters/tflintas

You can install the plugin by adding a config to .tflint.hcl and running tflint --init:

plugin "azurerm" {
    enabled = true
    version = "0.24.0"
    source  = "github.com/terraform-linters/tflint-ruleset-azurerm"
}

Last updated