docs-terraform-guidelines

Useful tooling for Terragrunt/Terraform

The goal of this page is to list some useful tooling for Terragrunt/Terraform.

Code quality

Good code quality is a must-have for any project

Code security

Left shift security related tasks as much as possible

Documentation

Documentation is a must-have for any project

Readability of plan and apply

When working with Terraform and even more so for Terragrunt, reading plan can be a pain. Terraform is not fixing it any time soon : Github issue on concise plan

How to operate this tools

For terraform fmt, terragrunt hcl and checkov you can use the following configuration :

repos:
  - repo: https://github.com/antonbabenko/pre-commit-terraform
    rev: v1.77.0
    hooks:
      - id: terraform_fmt
      - id: terragrunt_fmt
      - id: terraform_checkov
        args:
          - --args=--quiet    
          - --args=--framework=terraform
      - id: terraform_providers_lock
        args:
          - --hook-config=--mode=only-check-is-current-lockfile-cross-platform

For tflint check here