Mastercard / terraform-provider-restapi

A terraform provider to manage objects in a RESTful API
Other
785 stars 215 forks source link

Improve documentation of provider #229

Closed mgw6 closed 11 months ago

mgw6 commented 11 months ago

Since the documentation for this provider does not match the format of other providers on the Terraform public providers registry, I have setup the tfplugindocs functionality as outlined in the SDK provider tutorial. Once this update is published to the registry, the attributes will be "boxes" instead of bold, and examples and descriptions for the resource and data source will be included.

To generate docs in the future, the command go generate ./... will need to be run for each release. I am not sure how this will interact with the tfpluginwebsite command in the do_release.sh file. I did extensive googling and couldn't find anything on it, but will make changes as necessary if you can give me some guidance on it.

DRuggeri commented 11 months ago

Thanks, @mgw6, this is pretty great! So, if I understand correctly, I think this is designed to replace the use of tfpluginwebsite during the release process. I noticed during the recent release that tfpluginwebsite was having issues and, to your point, it seems the project has completely vanished!

I think this is nearly ready as-is. Can you propose an additional modification to the doRelease.sh script to properly generate the docs? Also, any additional dependencies/etc needed for the release process should be added to the README, but it seems like nothing additional is required.

mgw6 commented 11 months ago

@DRuggeri Yes that is exactly the intent. This is the document generation tool that is currently recommended by Hashicorp. In my latest commit, I have updated the do_release.sh file to use the new document generation command. Let me know if there are any other necessary changes.

Where is the do_release.sh file actually triggered?

DRuggeri commented 11 months ago

Great, thanks for the update! The do_release.sh script is triggered by me when it's time to tag and release a new version of the provider. It's fairly simple in that it just ensures the test suite passes, performs the tagging, edits the release notes, and then does a push of all that up to GitHub so the GitHub actions can do the rest.