|
1 | 1 | exclude: ".terraform" |
2 | 2 | repos: |
3 | 3 | - repo: https://github.com/antonbabenko/pre-commit-terraform |
4 | | - rev: v1.92.1 |
| 4 | + rev: v1.92.2 |
5 | 5 | hooks: |
6 | 6 | - id: terraform_docs |
7 | 7 | always_run: true |
8 | 8 | - id: terraform_fmt |
| 9 | + - id: terraform_validate |
| 10 | + args: |
| 11 | + - --hook-config=--retry-once-with-cleanup=true |
| 12 | + exclude: ^examples |
9 | 13 | - id: terraform_tflint |
10 | 14 | alias: terraform_tflint_nocreds |
| 15 | + exclude: ^examples |
11 | 16 | name: terraform_tflint_nocreds |
12 | | - - id: terraform_tfsec |
13 | | - - repo: local |
14 | | - hooks: |
15 | | - - id: terraform_validate |
16 | | - name: terraform_validate |
17 | | - entry: | |
18 | | - bash -c ' |
19 | | - AWS_DEFAULT_REGION=us-east-1 |
20 | | - declare -a DIRS |
21 | | - for FILE in "$@" |
22 | | - do |
23 | | - DIRS+=($(dirname "$FILE")) |
24 | | - done |
25 | | - for DIR in $(printf "%s\n" "${DIRS[@]}" | sort -u) |
26 | | - do |
27 | | - cd $(dirname "$FILE") |
28 | | - terraform init --backend=false |
29 | | - terraform validate . |
30 | | - cd .. |
31 | | - done |
32 | | - ' |
33 | | - language: system |
34 | | - verbose: true |
35 | | - files: \.tf(vars)?$ |
36 | | - exclude: examples |
37 | | - - id: tflock |
38 | | - name: provider_locks |
39 | | - entry: | |
40 | | - bash -c ' |
41 | | - AWS_DEFAULT_REGION=us-east-1 |
42 | | - declare -a DIRS |
43 | | - for FILE in "$@" |
44 | | - do |
45 | | - DIRS+=($(dirname "$FILE")) |
46 | | - done |
47 | | - for DIR in $(printf "%s\n" "${DIRS[@]}" | sort -u) |
48 | | - do |
49 | | - cd $(dirname "$FILE") |
50 | | - terraform providers lock -platform=windows_amd64 -platform=darwin_amd64 -platform=linux_amd64 |
51 | | - cd .. |
52 | | - done |
53 | | - ' |
54 | | - language: system |
55 | | - verbose: true |
56 | | - files: \.tf(vars)?$ |
57 | | - exclude: examples |
| 17 | + - id: terraform_trivy |
| 18 | + args: |
| 19 | + - --args=--skip-dirs="**/.terraform,examples/*" |
| 20 | + - id: terraform_providers_lock |
58 | 21 | - repo: https://github.com/pre-commit/pre-commit-hooks |
59 | 22 | rev: v4.6.0 |
60 | 23 | hooks: |
| 24 | + - id: check-added-large-files |
61 | 25 | - id: check-case-conflict |
62 | 26 | - id: check-json |
63 | 27 | - id: check-merge-conflict |
64 | 28 | - id: check-symlinks |
65 | 29 | - id: check-yaml |
66 | 30 | args: |
67 | 31 | - --unsafe |
| 32 | + - id: detect-private-key |
68 | 33 | - id: end-of-file-fixer |
69 | 34 | - id: mixed-line-ending |
70 | 35 | args: |
|
86 | 51 | - --markdown-linebreak-ext=md |
87 | 52 | exclude: README.md |
88 | 53 | ci: |
89 | | - skip: [terraform_docs, terraform_fmt, terraform_tflint, terraform_tfsec, tflock] |
| 54 | + skip: [terraform_docs, terraform_fmt, terraform_validate, terraform_tflint, terraform_trivy, terraform_providers_lock] |
0 commit comments