14. Testing Terraform Code

Static Checks

Built in

  • terraform fmt

    • tells about about indentation format of codebase

  • terraform validate

    • checks for input variables are initialized and used correctly

  • terraform plan

  • custom validation rules

External

  • tflint

  • checkov, tfsec, terrascan, terraform-compliance, snyk

  • Terraform Sentinal (enterprise only)


Last updated