-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.pre-commit-config.yaml
50 lines (50 loc) · 2.58 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
45
46
47
48
49
50
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: end-of-file-fixer
- id: no-commit-to-branch
- id: check-case-conflict
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.82.0
hooks:
- id: terraform_docs
args:
- '--args=--lockfile=false'
- '--hook-config=--path-to-file=README.md'
- '--hook-config=--add-to-existing-file=true'
- '--hook-config=--create-file-if-not-exist=true'
- '--hook-config=--recursive.enabled=true'
- '--hook-config=--recursive.path=submodules'
- id: terraform_fmt
- id: terraform_tflint
args:
- '--args=--config=__GIT_WORKING_DIR__/.tflint.hcl'
- '--args=--only=terraform_deprecated_interpolation'
- '--args=--only=terraform_deprecated_index'
- '--args=--only=terraform_unused_declarations'
- '--args=--only=terraform_comment_syntax'
- '--args=--only=terraform_documented_outputs'
- '--args=--only=terraform_documented_variables'
- '--args=--only=terraform_typed_variables'
- '--args=--only=terraform_module_pinned_source'
- '--args=--only=terraform_naming_convention'
- '--args=--only=terraform_required_version'
- '--args=--only=terraform_required_providers'
- '--args=--only=terraform_standard_module_structure'
- '--args=--only=terraform_workspace_remote'
- id: terraform_validate
- id: terraform_checkov
args:
- '--args=--compact'
- '--args=--quiet'
- '--args=--skip-check CKV_AZURE_164,CKV_AZURE_165,CKV_AZURE_166,CKV_AZURE_139,CKV_AZURE_172,CKV_AZURE_141,CKV_AZURE_115,CKV_AZURE_117,CKV_AZURE_116,CKV_AZURE_6,CKV_AZURE_171,CKV_AZURE_168,CKV_AZURE_167,CKV_AZURE_33,CKV_AZURE_206,CKV_AZURE_34,CKV2_AZURE_33,CKV2_AZURE_21,CKV2_AZURE_21,CKV2_AZURE_1,CKV2_AZURE_18,CKV_AZURE_190,CKV_AZURE_59,CKV2_AZURE_38,CKV_CIRCLECIPIPELINES_2,CKV_AZURE_226,CKV_AZURE_227,CKV_AZURE_233,CKV2_AZURE_40,CKV2_AZURE_41,CKV2_AZURE_47'
- id: terraform_tfsec
args:
- '--args=--exclude azure-container-limit-authorized-ips'
# - id: terrascan # Skipping until they update lifecycle block; Data resources do not have lifecycle settings, so a lifecycle block is not allowed.
# args:
# - '--args=--non-recursive'
# - '--args=--policy-type=aws'
# - '--args=--skip-rules=AC_AWS_0369' #Flow logs are enabled, terrascan does not follow the logical path of the resource