plugins
plugins copied to clipboard
Support terraform-docs
Hey!
This issue is a feature request to add support for terraform-docs, a tool that automatically generates documentation from Terraform modules.
Currently, we use pre-commit to ensure that our Terraform documentation stays in sync with the code, but it would be great to have just one tool that contains all the typical Terraform plugins.
I believe this feature would be a valuable addition to the plugins library and would greatly benefit Terraform users.
Thank you for considering this! 🌟
Hi! Thanks for the suggestion, we'll keep it mind. We already have terraform-docs defined as a Trunk Tool, you can enable it with trunk tools enable terraform-docs
(see more here). To clarify, would you just want us to also a Trunk Action that behaves pretty much identically to pre-commit?
@TylerJang27 ah, cool, I didn't see it on the tools list. I was thinking of it as a formatter (similar to terraform fmt, e.g.), so it updates README files on trunk fmt/check. Does that make sense? Or would you recommend another way to handle this?
That makes sense, and then it would get picked up anyway with [trunk-fmt-pre-commit](https://github.com/trunk-io/plugins/blob/main/actions/trunk/plugin.yaml#L12)
. I'm less familiar with how terraform-docs
is run, so we'll have to see how feasible that is.
You're welcome to take a stab at it yourself and put up a PR, but otherwise we'll add it to our todo list!