-
Notifications
You must be signed in to change notification settings - Fork 61
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 Provider Documentation Alignment #280
Conversation
Nice idea...but how do we know that this is valid for said format...or indeed what stops the next PR just messing this up? Otherwise it means we are taking your word for it that they are valid today and you are hoping that going forward, others will ensure any new/changed docs also comply |
Sure, I can look at generating directly from this: https://github.com/hashicorp/terraform-plugin-docs and adding the relevant descriptions etc that are already in the hand cranked docs (I manually added the metadata to avoid the potential over generation). Could then look at using the |
That would make sense to me though @jdamata would have final say since it is his repo! |
Okay @tbutler-qontigo, @jdamata, I've now implemented tfplugindocs approach to generate documentation from the provider source code (resources and data sources), templates and examples. I've taken the descriptions from the previous documentation to preserve as much as possible. Where things were not possible to be generated from the source, I've used templates. I've also implemented the Let me know your thoughts. |
Thanks for the contribution @lornest. I added some small nitpick comments. All the documentation being shifted around is a lot to read through and verify its all good. Ill try to read through all the doc diffs and catch anything missed |
Great stuff @lornest but as you say, you have now introduced an additional step for the developer to have to run an manual step to generated automated documentation - it seems like it would be better to do as you suggest above - ie to have the PR do this step automatically. what do you think @jdamata |
yah i agree and that would be sweet. @lornest is this something you could take a stab at? |
@jdamata will address all of the above comments from you and the other contributors/maintainers and add the on PR workflow today. Thanks for the feedback everyone 👍 |
Testing workflow
testing a change without doc updates locally
period to test codegen PR
Hey @jdamata and co! I've added 2 workflows and tested them on my local fork. First, when someone creates a PR with changes to the provider code ( There's also another workflow that checks the documents are up-to-date on push to Let me know if there's anything else! |
small nit in a comment. otherwise LGTM |
* testing workflow after changing actions to SHAs * [bot] docs: tfplugindocs generate --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Thanks all, I've completed the updates as per the feedback |
Hey @jdamata!
This is just a small change to align the documentation with the expected format for a Terraform Provider (see examples in the Hashicorp generator).
This has no functional impact, but is not purely selfless - a number of tools that have been built around the TF ecosystem rely on these metadata - for example, I'm trying to run Upjet to generate a Kubernetes controller based off of your provider, which seems to scrape this metadata from the docs.
Thanks!