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

Emit upstream provider overview to $provider/docs folder #2082

Closed
Tracked by #2083
guineveresaenger opened this issue Jun 11, 2024 · 0 comments · Fixed by #2068
Closed
Tracked by #2083

Emit upstream provider overview to $provider/docs folder #2082

guineveresaenger opened this issue Jun 11, 2024 · 0 comments · Fixed by #2068
Assignees
Labels
kind/enhancement Improvements or new features resolution/fixed This issue was fixed

Comments

@guineveresaenger
Copy link
Contributor

Add functionality in the bridge to obtain upstream provider config docs and emit them to a docs folder in the provider so the registry can consume these docs.

@guineveresaenger guineveresaenger self-assigned this Jun 11, 2024
@guineveresaenger guineveresaenger added the kind/enhancement Improvements or new features label Jun 11, 2024
guineveresaenger added a commit that referenced this issue Jun 14, 2024
This pull request is the scaffold implementation of generating
installation docs for bridged providers from upstream source.

In this change, a new "language" called `registry-docs` is added to the
bridge. (Note that "language" in this case is a bit of a misnomer - it
is the `tfgen` CLI's input for determining which generating tactic to
use - this is why `schema` is a language as well).

This change reads the upstream `index.md` file and emits it as a Pulumi
[package installation instruction
file](https://www.pulumi.com/docs/using-pulumi/pulumi-packages/how-to-author/#overview-installation--configuration)
to a top-level folder called `docs/` (the current registry standard). We
also emit a minimal `_index.md` file. When these files exist in a
provider, the registry will use those instead of the hard coded files
existing in the registry currently.

This pull request includes a fair bit of TODOs in the docs parser -
currently only the Hugo front matter is implemented, to show the
scaffold. Transformations for this document to be Pulumi-friendly will
follow in a separate PR.

This change does not affect any current use of the bridge - to flip it
on, we'd add another Make target to a provider's Makefile, e.g.
`./bin/pulumi-tfgen-openstack registry-docs --out docs/`. I'd like us to
consider adding this change despite the TODOs, so we can keep the
changes somewhat atomic and reduce merge conflicts.

Closes #2082.
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants