plugins icon indicating copy to clipboard operation
plugins copied to clipboard

Support terraform-docs

Open gberenice opened this issue 11 months ago • 3 comments

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! 🌟

gberenice avatar Feb 29 '24 10:02 gberenice

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 avatar Feb 29 '24 19:02 TylerJang27

@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?

gberenice avatar Mar 01 '24 14:03 gberenice

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!

TylerJang27 avatar Mar 01 '24 18:03 TylerJang27