Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Include .tfbackend files in hooks #822

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
entry: hooks/infracost_breakdown.sh
language: script
require_serial: true
files: \.(tf(vars)?|hcl)$
files: \.(tf(backend|vars)?|hcl)$
exclude: \.terraform/.*$

- id: terraform_fmt
Expand All @@ -13,7 +13,7 @@
Rewrites all Terraform configuration files to a canonical format.
entry: hooks/terraform_fmt.sh
language: script
files: (\.tf|\.tfvars)$
files: \.tf(vars)?$
exclude: \.terraform/.*$

- id: terraform_docs
Expand Down Expand Up @@ -53,7 +53,7 @@
require_serial: true
entry: hooks/terraform_validate.sh
language: script
files: \.(tf(vars)?|terraform\.lock\.hcl)$
files: \.(tf(backend|vars)?|terraform\.lock\.hcl)$
exclude: \.terraform/.*$

- id: terraform_providers_lock
Expand All @@ -71,7 +71,7 @@
require_serial: true
entry: hooks/terraform_tflint.sh
language: script
files: (\.tf|\.tfvars)$
files: \.tf(backend|vars)?$
exclude: \.terraform/.*$

- id: terragrunt_fmt
Expand Down Expand Up @@ -114,7 +114,7 @@
Static analysis of Terraform templates to spot potential security issues.
require_serial: true
entry: hooks/terraform_tfsec.sh
files: \.tf(vars)?$
files: \.tf(backend|vars)?$
language: script

- id: terraform_trivy
Expand All @@ -123,7 +123,7 @@
Static analysis of Terraform templates to spot potential security issues.
require_serial: true
entry: hooks/terraform_trivy.sh
files: \.tf(vars)?$
files: \.tf(backend|vars)?$
language: script

- id: checkov
Expand Down