pre-commit-terraform
pre-commit-terraform copied to clipboard
The `terraform-docs` hook no longer generated since the pre-commit-terraform v1.95.0
The version description says that terraform-doc versions less than v0.12 are no longer supported. However, I have terraform-docs v0.19 in $PATH and README.md is not generated. If I revert pre-commit-terraform to v1.94.3 everything works.
.pre-commit-config.yaml:
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.95.0
hooks:
- id: terraform_docs
args:
- --hook-config=--path-to-file=README.md
- --hook-config=--add-to-existing-file=true
- --hook-config=--create-file-if-not-exist=true
- --hook-config=--use-standard-markers=true
- --args=--config=.terraform-docs.yml
.terraform-docs.yml:
---
formatter: markdown table
output:
file: README.md
mode: inject
sort:
enabled: true
by: required
settings:
anchor: true
color: true
default: true
description: false
escape: true
hide-empty: false
html: true
indent: 2
lockfile: true
read-comments: true
required: true
sensitive: true
type: true
Environment information
- OS: Win11 with Ubuntu 24.04 on WSL2
Linux 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Description: Ubuntu 22.04.3 LTS
- Tools availability and versions:
GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
pre-commit 3.6.2
bash: line 3: tofu: command not found
Terraform v1.5.3
python SKIPPED
Python 3.10.12
checkov SKIPPED
infracost SKIPPED
terraform-docs version v0.19.0 linux/amd64
terragrunt version v0.54.15
terrascan SKIPPED
TFLint version 0.53.0
+ ruleset.terraform (0.9.1-bundled)
tfsec SKIPPED
trivy SKIPPED
tfupdate SKIPPED
hcledit SKIPPED