-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
44 lines (44 loc) · 1.42 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
repos:
- repo: local
hooks:
- id: lock_modules
name: Lock Terraform Registry modules
description: 'Locks Terraform module versions and maintains hashes'
entry: infra/scripts/lock-modules.sh
language: script
files: '\.tf$'
exclude: ^.*\/modules\/.*
pass_filenames: true
require_serial: true
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.96.2
hooks:
- id: terraform_fmt
- id: terraform_docs
name: terraform_docs on modules
args:
- --hook-config=--create-file-if-not-exist=true
- --args=--hide providers
files: ^infra/modules/.*
- id: terraform_docs
name: terraform_docs on resources
args:
- --hook-config=--create-file-if-not-exist=true
exclude: |
(?x)^(
infra/modules/.*?
)$
- id: terraform_tflint
args:
- --args=--disable-rule terraform_required_version
- --args=--disable-rule terraform_required_providers
- --args=--config=__GIT_WORKING_DIR__/.tflint.hcl
- id: terraform_validate
args:
- --args=-json
- --args=-no-color
- --hook-config=--retry-once-with-cleanup=true
- id: terraform_trivy
args:
- --args=--skip-dirs="**/.terraform"
- --args=--ignorefile=__GIT_WORKING_DIR__/.trivyignore