-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-hooks.yaml
36 lines (33 loc) · 1.13 KB
/
.pre-commit-hooks.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
# This configuration file allows our pre-commit hooks to be used with pre-commit: http://pre-commit.com/
- id: terraform-validate
name: Terraform validate
description: Validates all Terraform configuration files.
entry: hooks/terraform-validate.sh
language: script
files: \.tf$
exclude: \.+.terraform\/.*$
require_serial: true
args: []
- id: terraform-docs
name: terraform-docs
description: |
Generate terraform docs using the terraform-docs tool.
This hook requires expects a configuration to exist at the base of the repo.
See https://terraform-docs.io/user-guide/configuration/
example .terraform-docs.yml
formatter: "markdown table"
recursive:
enabled: true
path: modules
entry: quay.io/terraform-docs/terraform-docs:0.16.0
language: docker_image
files: (\.terraform-docs.yml|README.md|\.tf(vars)?)$
pass_filenames: false
args:
- '.'
- id: terraform-lock-fail
name: forbid .terraform.lock.hcl
description: For use with opensource terraform modules.
entry: do not commit .terraform.lock.hcl in this repository
language: fail
files: '\.terraform\.lock\.hcl$'