Overview of pre-commit-terraform
masterpre-commit-terraform is a collection of Git Hooks for Terraform, OpenTofu, and Terragrunt, powered by the pre-commit framework. It automates code quality checks, formatting, and validation to ensure infrastructure-as-code configurations remain consistent and error-free.
Key capabilities include:
- Running checks locally and in CI environments.
- Execution as standalone Git hooks or via Docker images.
- Flexible scope: run against the entire repository or only on changed files (e.g., during a git stash, last commit, or Pull Request).