mirror of
https://github.com/tofuutils/pre-commit-opentofu.git
synced 2025-10-15 17:38:54 +02:00
feat: spport .tofu files (#6)
Signed-off-by: T. Hinrichsmeyer <t.hinrichsmeyer@ndr.de>
This commit is contained in:
parent
81b78c8fd7
commit
e059c5859b
4 changed files with 53 additions and 35 deletions
|
|
@ -4,7 +4,7 @@
|
|||
entry: hooks/infracost_breakdown.sh
|
||||
language: script
|
||||
require_serial: true
|
||||
files: \.(tf(vars)?|hcl)$
|
||||
files: \.((tf|tofu)(vars)?|hcl)$
|
||||
exclude: \.terraform\/.*$
|
||||
|
||||
- id: tofu_fmt
|
||||
|
|
@ -12,25 +12,29 @@
|
|||
description: Rewrites all OpenTofu configuration files to a canonical format.
|
||||
entry: hooks/tofu_fmt.sh
|
||||
language: script
|
||||
files: (\.tf|\.tfvars)$
|
||||
files: \.(tf|tofu)(vars)?$
|
||||
exclude: \.terraform\/.*$
|
||||
|
||||
- id: tofu_docs
|
||||
name: OpenTofu docs
|
||||
description: Inserts input and output documentation into README.md (using terraform-docs).
|
||||
description:
|
||||
Inserts input and output documentation into README.md (using
|
||||
terraform-docs).
|
||||
require_serial: true
|
||||
entry: hooks/tofu_docs.sh
|
||||
language: script
|
||||
files: (\.tf|\.terraform\.lock\.hcl)$
|
||||
files: (\.(tf|tofu)|\.terraform\.lock\.hcl)$
|
||||
exclude: \.terraform\/.*$
|
||||
|
||||
- id: tofu_docs_without_aggregate_type_defaults
|
||||
name: OpenTofu docs (without aggregate type defaults)
|
||||
description: Inserts input and output documentation into README.md (using terraform-docs). Identical to terraform_docs.
|
||||
description:
|
||||
Inserts input and output documentation into README.md (using
|
||||
terraform-docs). Identical to terraform_docs.
|
||||
require_serial: true
|
||||
entry: hooks/tofu_docs.sh
|
||||
language: script
|
||||
files: (\.tf)$
|
||||
files: \.(tf|tofu)$
|
||||
exclude: \.terraform\/.*$
|
||||
|
||||
- id: tofu_docs_replace
|
||||
|
|
@ -39,7 +43,7 @@
|
|||
require_serial: true
|
||||
entry: hooks/tofu_docs_replace.py
|
||||
language: python
|
||||
files: (\.tf)$
|
||||
files: \.(tf|tofu)$
|
||||
exclude: \.terraform\/.*$
|
||||
|
||||
- id: tofu_validate
|
||||
|
|
@ -48,7 +52,7 @@
|
|||
require_serial: true
|
||||
entry: hooks/tofu_validate.sh
|
||||
language: script
|
||||
files: (\.tf|\.tfvars)$
|
||||
files: \.(tf|tofu)(vars)?$
|
||||
exclude: \.terraform\/.*$
|
||||
|
||||
- id: tofu_providers_lock
|
||||
|
|
@ -66,12 +70,13 @@
|
|||
require_serial: true
|
||||
entry: hooks/tofu_tflint.sh
|
||||
language: script
|
||||
files: (\.tf|\.tfvars)$
|
||||
files: \.(tf|tofu)(vars)?$
|
||||
exclude: \.terraform\/.*$
|
||||
|
||||
- id: terragrunt_fmt
|
||||
name: Terragrunt fmt
|
||||
description: Rewrites all Terragrunt configuration files to a canonical format.
|
||||
description:
|
||||
Rewrites all Terragrunt configuration files to a canonical format.
|
||||
entry: hooks/terragrunt_fmt.sh
|
||||
language: script
|
||||
files: (\.hcl)$
|
||||
|
|
@ -87,18 +92,20 @@
|
|||
|
||||
- id: tofu_tfsec
|
||||
name: OpenTofu validate with tfsec (deprecated, use "tofu_trivy")
|
||||
description: Static analysis of OpenTofu templates to spot potential security issues.
|
||||
description:
|
||||
Static analysis of OpenTofu templates to spot potential security issues.
|
||||
require_serial: true
|
||||
entry: hooks/tofu_tfsec.sh
|
||||
files: \.tf(vars)?$
|
||||
files: \.(tf|tofu)(vars)?$
|
||||
language: script
|
||||
|
||||
- id: tofu_trivy
|
||||
name: OpenTofu validate with trivy
|
||||
description: Static analysis of OpenTofu templates to spot potential security issues.
|
||||
description:
|
||||
Static analysis of OpenTofu templates to spot potential security issues.
|
||||
require_serial: true
|
||||
entry: hooks/tofu_trivy.sh
|
||||
files: \.tf(vars)?$
|
||||
files: \.(tf|tofu)(vars)?$
|
||||
language: script
|
||||
|
||||
- id: checkov
|
||||
|
|
@ -118,7 +125,7 @@
|
|||
entry: hooks/tofu_checkov.sh
|
||||
language: script
|
||||
always_run: false
|
||||
files: \.tf$
|
||||
files: \.(tf|tofu)$
|
||||
exclude: \.terraform\/.*$
|
||||
require_serial: true
|
||||
|
||||
|
|
@ -138,7 +145,7 @@
|
|||
description: Runs terrascan on OpenTofu templates.
|
||||
language: script
|
||||
entry: hooks/terrascan.sh
|
||||
files: \.tf$
|
||||
files: \.(tf|tofu)$
|
||||
exclude: \.terraform\/.*$
|
||||
require_serial: true
|
||||
|
||||
|
|
@ -149,5 +156,5 @@
|
|||
entry: hooks/tfupdate.sh
|
||||
args:
|
||||
- --args=terraform
|
||||
files: \.tf$
|
||||
files: \.(tf|tofu)$
|
||||
require_serial: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue