-
-
Notifications
You must be signed in to change notification settings - Fork 540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The terraform-docs
hook no longer generated since the pre-commit-terraform v1.95.0
#721
Comments
Issue was already fixed in 1.96.1 |
This problem persists on v1.96.1 as well. Please reopen. |
Interesting, looks like there is an issue with Try repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.96.1
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 Also, compact version will looks like repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.96.1
hooks:
- id: terraform_docs
args:
- --hook-config=--add-to-existing-file=true
- --hook-config=--create-file-if-not-exist=true
- --args=--config=.terraform-docs.yml |
@MaxymVlasov |
No error output was given with this line. |
So, I can confirm that removing the line with I will not close the Issue, as I can see that obviously work will be done on it. Thank you so much for your help! |
For me it doesn't work even without the |
Doesn't work where also :(
|
@davidaparicio Your issue is unrelated. Please install dependencies: https://github.com/antonbabenko/pre-commit-terraform?tab=readme-ov-file#1-install-dependencies |
The workaround doesn't work for me either. I had to revert to The code: |
I can confirm that I had the same issue and reverting to |
Samesies |
Can we remove the
One thing to note, is in all of repo's whether its a Terraform Module like this one, or our monorepo used for deployments, the .pre-commit would live in the root of the dir, and all of the terraform would exists in child dir's. That not too dissimilar to how these are handled though, https://github.com/terraform-aws-modules/terraform-aws-eks where it understands to create the read me for those child modules If we revert to |
Confirm that new id: terraform_docs
args:
- --hook-config=--add-to-existing-file=true
- --hook-config=--create-file-if-not-exist=true # <---- This one broken?
- --args=--lockfile=false
- --hook-config=--parallelism-ci-cpu-cores=4 # DinD, can't calculate CPU cores v1.94.3 works. |
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:
.terraform-docs.yml:
Environment information
The text was updated successfully, but these errors were encountered: