pulumi / pulumi-terraform-bridge

A library allowing Terraform providers to be bridged into Pulumi.
Apache License 2.0
194 stars 43 forks source link

Notes in attribute descriptions are attached to a subfield, not the nested section #2086

Open guineveresaenger opened 3 months ago

guineveresaenger commented 3 months ago

What happened?

https://www.pulumi.com/registry/packages/aws/api-docs/cloudfront/publickey/#name_nodejs shows a NOTE section under namePrefix that in the upstream docs is a note intended for the entire section.

Example

https://www.pulumi.com/registry/packages/aws/api-docs/autoscaling/group/#triggers_nodejs is another example. There's quite a few.

Output of pulumi about

n/a

Additional context

https://github.com/pulumi/pulumi-terraform-bridge/issues/530 was where this was originally reported.

When we parse docs, we make the assumption that unless there is space, the end of a section, a new header, or a new resource entry, that any text in the upstream doc belongs to the current attribute description being parsed. This even can be true for NOTEs but in the cases linked, it should be appended to the section, or the top-level attribute, not the final subfield listed upstream.

Additionally, we do not currently attach extra information to attribute fields and non-top-level Description sections, making extra design or rethinking necessary.

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).