-
-
Notifications
You must be signed in to change notification settings - Fork 567
Description
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.