Which hooks does pre-commit-terraform provide?
BeginnerProductionTesting and Policy as Code
Answer
terraform_fmt, terraform_validate, terraform_docs, terraform_tflint, terraform_checkov, terraform_trivy, terraform_providers_lock and terrascan, configured through .pre-commit-config.yaml. Install with pre-commit install, and run pre-commit run -a in CI.
More on Testing and Policy as Code
How do you test infrastructure code, and what does the testing pyramid look like?BeginnerWhat does the static-analysis layer catch?BeginnerWhat does tflint do, and how is it configured?BeginnerHow do Checkov and Trivy differ?IntermediateHow does `terraform test` work?BeginnerHow do mock providers work in `terraform test`?Advanced