Skip to content
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_replace should support --header-from for reading doc headers from files other than main.tf #177

Closed
tidzo opened this issue Feb 25, 2021 · 3 comments
Labels
estimate/2h Need 2 hours to be done feature New feature or request good first issue Good for newcomers hook/terraform_docs_replace Python hook stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@tidzo
Copy link

tidzo commented Feb 25, 2021

terraform-docs itself supports the header-from option on the command line or in its config file. This defaults to a value of main.tf, which works fine with this project's terraform_docs_replace hook.

However, if using a different value of header-from that does not end in .tf (or .tfvars, but that would be... strange) , such as doc_header.md, then the logic on (currently) line 33 of terraform_docs_replace..py means that a change to the header file will not result in README.md being recreated.

My proposal to resolve this is to add an argparse argument to terraform_docs_replace.py named --header-from, defaulting to main.tf, and amend the logic near line 33 so that a supplied value of that argument (if it doesn't end in .tf), also gets added to the list.

If this sounds reasonable, I will submit a PR to that effect.

@MaxymVlasov MaxymVlasov added estimate/2h Need 2 hours to be done good first issue Good for newcomers hook/terraform_docs_replace Python hook feature New feature or request labels Sep 9, 2021
@github-actions
Copy link

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

@github-actions github-actions bot added the stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 10, 2021
@MaxymVlasov MaxymVlasov removed the stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 14, 2021
@github-actions
Copy link

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

@github-actions github-actions bot added the stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 14, 2021
@github-actions
Copy link

This issue was automatically closed because of stale in 10 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
estimate/2h Need 2 hours to be done feature New feature or request good first issue Good for newcomers hook/terraform_docs_replace Python hook stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

2 participants