-
Notifications
You must be signed in to change notification settings - Fork 13
Adapt provider to generate docs automatically #132
Conversation
Signed-off-by: Tomas Karasek <tom.to.the.k@gmail.com>
Signed-off-by: Tomas Karasek <tom.to.the.k@gmail.com>
Signed-off-by: Tomas Karasek <tom.to.the.k@gmail.com>
Signed-off-by: Tomas Karasek <tom.to.the.k@gmail.com>
Signed-off-by: Tomas Karasek <tom.to.the.k@gmail.com>
Signed-off-by: Tomas Karasek <tom.to.the.k@gmail.com>
@displague take a look please. You don't have to go thought the whole diff, just check how generated metal_device doc look: For some reason the doc generation doesn't pick the nested attributes, although they are described, e.g. the network: Anyway, all there is to define a resource doc is
These inputs will be processed to create If you OK the format of I am not sure if the doc generation should be done with |
We can include a The expectation is that anyone making a PR to supply resource updates will also update the docs when needed. |
|
kreuzwerker/terraform-provider-docker#193 points out some other issues we should be aware of:
hashicorp/terraform-plugin-docs#69 is a little concerning. |
Generally, @t0mk, I think we can merge and move forward. If we lose some detail in the docs, we will drive for fixes or changes in terraform-plugin-docs. It seems we'll have everything we need to generate (rather than hand maintain) good docs. |
The issue linked to this PR has been transferred to equinix/terraform-provider-equinix: equinix/terraform-provider-equinix#201 This draft is outdated and the migration to the new provider repository introduces more complexity than a fresh start. I will add a reference to this draft in the transferred issue to take advantage of the conversation and the templates already created |
fixes equinix/terraform-provider-equinix#201
This PR migrates docs from the old style to template-style, so that the provider can take advantage of https://github.com/hashicorp/terraform-plugin-docs and generate TF website documentation automatically.
It's mainly about creating content in
templates/
andexamples/
dirs, and moving generic resource/datasource description from markdown files indocs/
to the resourceDescription
attribute in code.What needs to be done
metal/
. Use content from existing docs.examples/resources/..
andexamples/datasources/..
. Use content from existing docs.//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
The docs can also be generated manually with
tfplugindocs validate && tfplugindocs generate
.