generated from getindata/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
35 lines (32 loc) · 1.43 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
repos:
- repo: https://github.com/gruntwork-io/pre-commit
# Stick to v0.1.20 until this bug is fixed: https://github.com/gruntwork-io/pre-commit/issues/102
# When updating, also check if tflint version in pre-commit workflow can be updated.
rev: "v0.1.20" # Get the latest from: https://github.com/gruntwork-io/pre-commit/releases
hooks:
- id: terraform-validate # It should be the first step as it runs terraform init required by tflint
- id: terraform-fmt
- id: tflint
args:
- --module
- --config=.tflint.hcl
- repo: https://github.com/terraform-docs/terraform-docs
rev: "v0.16.0" # Get the latest from: https://github.com/terraform-docs/terraform-docs/releases
hooks:
- id: terraform-docs-go
args: ["."]
- repo: https://github.com/bridgecrewio/checkov.git
rev: "2.5.13" # Get the latest from: https://github.com/bridgecrewio/checkov/releases
hooks:
- id: checkov
args: [--skip-check, "CKV_TF_1"] # Terraform module sources do not use a git url with a commit hash revision
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.5.0" # Get the latest from: https://github.com/pre-commit/pre-commit-hooks/releases
hooks:
- id: check-merge-conflict
args: ["--assume-in-merge"]
- id: mixed-line-ending
args: ["--fix=no"]
- id: end-of-file-fixer
- id: check-case-conflict
- id: check-yaml