TF: autogenerate ref docs#790
Conversation
44044fa to
9e4cc76
Compare
6815727 to
4565706
Compare
d13a4a1 to
7d54a2b
Compare
| } | ||
| sort.Strings(sortedNames) | ||
|
|
||
| fmt.Fprintln(fp, referenceDocsTitle) |
There was a problem hiding this comment.
non-blocking: I'd prefer using a set of go templates and functions, this would be more readable
There was a problem hiding this comment.
Agreed 👍
I'll change it to use a template
There was a problem hiding this comment.
Can you please take another look?
2b55777 to
7788206
Compare
ptgott
left a comment
There was a problem hiding this comment.
Thanks for putting this together! I agree with Hugo re: the template comment, but also that it's fine to leave it for later.
| title: Terraform provider resources | ||
| description: Terraform provider resources reference | ||
| --- | ||
|
|
There was a problem hiding this comment.
One thing we should definitely do is indicate that this page was automatically generated using this script and include the teleport-plugins URL. In the docs, content pages include commands using this syntax:
{/*comment text*/}
We should also use mdx for the file extension, not md, to keep this consistent with the rest of the docs (I'm actually not sure if the docs engine cares, so this is just to be safe.)
There was a problem hiding this comment.
Can you please take another look?
There was a problem hiding this comment.
The comment will need to go below the frontmatter block for this to render properly, but otherwise looks great!
7788206 to
a52e516
Compare
a52e516 to
2d35a7b
Compare
| {/* Content generated by teleport-plugins/terraform/gen/main.go DO NOT EDIT */} | ||
| --- | ||
| title: Terraform provider resources | ||
| description: Terraform provider resources reference | ||
| --- | ||
|
|
There was a problem hiding this comment.
| {/* Content generated by teleport-plugins/terraform/gen/main.go DO NOT EDIT */} | |
| --- | |
| title: Terraform provider resources | |
| description: Terraform provider resources reference | |
| --- | |
| --- | |
| title: Terraform provider resources | |
| description: Terraform provider resources reference | |
| --- | |
| {/* Content generated by teleport-plugins/terraform/gen/main.go DO NOT EDIT */} |
Otherwise the title won't render
Generates a
reference.mdwhich should then be copied tohttps://github.com/gravitational/teleport/blob/branch/v12/docs/pages/reference/terraform-provider.mdx
Which is exposed here: https://goteleport.com/docs/reference/terraform-provider/
There are some changes because of new fields and login rule reference was moved (to keep an ordered list of resources).
Fixes gravitational/teleport#22083