Skip to content

Commit

Permalink
XDR-1336: Add terraform-docs hook (feat)
Browse files Browse the repository at this point in the history
  • Loading branch information
arledesma committed Feb 9, 2022
1 parent 2016fbf commit 0e7ae77
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,28 @@

- id: terraform-validate
name: Terraform validate
description: Validates all Terraform configuration files
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:
- '.'

0 comments on commit 0e7ae77

Please sign in to comment.