Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Figure out how to get CRD documentation from Terraform #92

Open
muvaf opened this issue Oct 7, 2021 · 5 comments
Open

Figure out how to get CRD documentation from Terraform #92

muvaf opened this issue Oct 7, 2021 · 5 comments
Labels
beta enhancement New feature or request wontfix This will not be worked on

Comments

@muvaf
Copy link
Member

muvaf commented Oct 7, 2021

What problem are you facing?

Currently fields don't have any documentation since most of TF providers do not fill Description field of the Schema objects.

How could Terrajet help solve your problem?

We should investigate how https://registry.terraform.io/providers/hashicorp/aws/latest/docs and other docs are produced and see how we can add description comments to generated fields.

@muvaf muvaf added the enhancement New feature or request label Oct 7, 2021
@muvaf muvaf changed the title Generate CRD documentation Figure out how to get CRD documentation from Terraform Oct 7, 2021
@muvaf muvaf added the beta label Oct 7, 2021
@luebken luebken added this to the Terrajet-Beta milestone Oct 7, 2021
@muvaf muvaf removed their assignment Nov 18, 2021
@negz
Copy link
Member

negz commented Nov 23, 2021

https://github.com/crossplane-contrib/provider-jet-gcp/blob/release-0.1-preview/apis/cloudplatform/v1alpha1/zz_project_types.go

It seems like in some cases we do have this - I just noticed provider-jet-gcp seems to. Is this because they fill the Description when others don't?

On a related note, I was coming here to report that sometimes this commentary is misleading. For example at: https://doc.crds.dev/github.com/crossplane-contrib/provider-jet-gcp/cloudplatform.gcp.jet.crossplane.io/Project/v1alpha1@v0.1.0-preview

The numeric ID of the organization this project belongs to. Changing this forces a new project to be created. Only one of org_id or folder_id may be specified. If the org_id is specified then the project is created at the top level. Changing this forces the project to be migrated to the newly specified organization.

I don't think we'll actually recreate a new project as this documentation states.

@turkenh
Copy link
Member

turkenh commented Dec 3, 2021

Just came across this issue and I think I've found where terraform documentation for provider resources are coming from:

All content seems to be living as markdown files under webside/docs in each provider repo:

https://github.com/hashicorp/terraform-provider-aws/tree/main/website/docs
https://github.com/hashicorp/terraform-provider-google/tree/master/website/docs
https://github.com/hashicorp/terraform-provider-azurerm/tree/main/website/docs

For example, documentation for aws_instance is here: https://github.com/hashicorp/terraform-provider-aws/blob/main/website/docs/r/instance.html.markdown

@muvaf
Copy link
Member Author

muvaf commented Dec 3, 2021

I just noticed provider-jet-gcp seems to. Is this because they fill the Description when others don't?

@negz Yes, that's the case. GCP fills Description while AWS doesn't.

I don't think we'll actually recreate a new project as this documentation states.

Here is the fix crossplane-contrib/provider-jet-gcp#10

@luebken luebken removed this from the Terrajet-Beta milestone Jan 25, 2022
@ulucinar
Copy link
Collaborator

A relevant proposal's reference: crossplane/crossplane#2956

@stale
Copy link

stale bot commented Aug 13, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Aug 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beta enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

5 participants