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

Support terraform-docs #681

Open
gberenice opened this issue Feb 29, 2024 · 3 comments
Open

Support terraform-docs #681

gberenice opened this issue Feb 29, 2024 · 3 comments

Comments

@gberenice
Copy link

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

@TylerJang27
Copy link
Collaborator

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?

@gberenice
Copy link
Author

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

@TylerJang27
Copy link
Collaborator

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants