pulumi / docs

All things Pulumi docs!
https://pulumi.com
Apache License 2.0
127 stars 223 forks source link

Transformation Resource Option Page Doesn't Provide a Complete Example #11652

Open RobbieMcKinstry opened 2 years ago

RobbieMcKinstry commented 2 years ago

What happened?

While triaging a user-reported issue today, I came across the Transformation resource option page. I noticed this page doesn't contain a complete example, only a snippet.

Specifically, the example shows code for a component resource named MyVpcComponent. However, it doesn't provide the definition of MyVpcComponent. This opens up the possibility for confusion; users might not understand what they have to do with the component options. For example, you could implement MyVpcComponent incorrectly as follows:

class MyVpcComponent extends pulumi.ComponentResource {
    constructor(name, opts) {
        super("pkg:index:MyVpcComponent", name, {}, {});
    }
}

Steps to reproduce

  1. Visit the transformation resource option page.
  2. Observe the code provided.
  3. Note that it isn't a full example in any language and cannot be run.

Expected Behavior

I expected all identifiers in the example program to be defined.

Actual Behavior

MyVpcComponent is undefined.

Output of pulumi about

No response

Additional context

No response

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).

susanev commented 2 years ago

@RobbieMcKinstry im going to remove the needs triage label on this, if yall would like this content updated, someone from the platform team is more than likely going to need to open a pr. id be happy to review or help however i can.