Skip to content
Merged
Changes from 1 commit
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
28 changes: 14 additions & 14 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|tofu|tfvars|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|tofu|tfvars)$
exclude: \.terraform/.*$

- id: terraform_docs
Expand All @@ -24,7 +24,7 @@
require_serial: true
entry: hooks/terraform_docs.sh
language: script
files: (\.tf|\.terraform\.lock\.hcl)$
files: \.(tf|tofu|terraform\.lock\.hcl)$
exclude: \.terraform/.*$

- id: terraform_docs_without_aggregate_type_defaults
Expand All @@ -35,7 +35,7 @@
require_serial: true
entry: hooks/terraform_docs.sh
language: script
files: (\.tf)$
files: \.(tf|tofu)$
exclude: \.terraform/.*$

- id: terraform_docs_replace
Expand All @@ -44,7 +44,7 @@
require_serial: true
entry: python -Im pre_commit_terraform replace-docs
language: python
files: (\.tf)$
files: \.(tf|tofu)$
exclude: \.terraform/.*$

- id: terraform_validate
Expand All @@ -53,7 +53,7 @@
require_serial: true
entry: hooks/terraform_validate.sh
language: script
files: \.(tf(vars)?|terraform\.lock\.hcl)$
files: \.(tf|tofu|tfvars|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|tofu|tfvars)$
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|tofu|tfvars)$
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|tofu|tfvars)?$
Comment thread
MaxymVlasov marked this conversation as resolved.
Outdated
language: script

- id: checkov
Expand All @@ -133,7 +133,7 @@
language: python
pass_filenames: false
always_run: false
files: \.tf$
files: \.(tf|tofu)$
exclude: \.terraform/.*$
require_serial: true

Expand All @@ -143,7 +143,7 @@
entry: hooks/terraform_checkov.sh
language: script
always_run: false
files: \.tf$
files: \.(tf|tofu)$
exclude: \.terraform/.*$
require_serial: true

Expand All @@ -155,15 +155,15 @@
pass_filenames: false
always_run: false
require_serial: true
files: \.tf$
files: \.(tf|tofu)$
exclude: \.terraform/.*$

- id: terrascan
name: terrascan
description: Runs terrascan on Terraform templates.
language: script
entry: hooks/terrascan.sh
files: \.tf$
files: \.(tf|tofu)$
exclude: \.terraform/.*$
require_serial: true

Expand All @@ -174,5 +174,5 @@
entry: hooks/tfupdate.sh
args:
- --args=terraform
files: \.tf$
files: \.(tf|tofu)$
require_serial: true
Loading