-
-
Notifications
You must be signed in to change notification settings - Fork 541
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
terraform-docs tfvars hcl does not generate tfvars file #558
Comments
It is a subset of #179 |
@MaxymVlasov : I am not 100% sure why this issue is closed. Is it because pre-commit-terraform does not support the --output-file parameter? All other prerequisistes for the linked ticket are already given (terraform-docs uses v0.16.0 and directly executing "terraform-docs tfvars hcl . --output-file test.tfvars" seems to work in the container). In case this is the issue, may I kindly request to get rid of the official documentation stating the support for tfvars example file generation? This is the corresponding documentation that mentions exactly this command: https://github.com/antonbabenko/pre-commit-terraform/blob/master/README.md?plain=1#L502C14 Side Note / Question What I tried was this, but it seems like it is not working (no errors, but file is as well not created). Directly executing the command works fine.
Any tips on how to get this working? |
This issue will be resolved during #179 resolution because that problem goes from unmaintainable logic located somewhere in https://github.com/antonbabenko/pre-commit-terraform/blob/master/hooks/terraform_docs.sh
Feel free to submit PR to make #179 live, that's the only possibility which I see here |
Describe the bug
Running terraform-docs does not produce auto generated tfvars files (but indicates success in output)
How can we reproduce it?
.pre-commit-config.yaml
Trigger container
Output
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg. [INFO] Initializing environment for https://github.com/antonbabenko/pre-commit-terraform. Generating / updating terraform.tfvars.auto (terraform_docs).......................Passed
Directory structure
Additional information
Running terraform-docs binary directly on the same project generates the corresponding file containing all variables (incl. defaults)
Running terraform_docs in .pre-commit-config.yaml to generate markdown works like a charm
Environment information
The text was updated successfully, but these errors were encountered: