pulumi / pulumi

Pulumi - Infrastructure as Code in any programming language 🚀
https://www.pulumi.com
Apache License 2.0
20.47k stars 1.06k forks source link

Go programgen example has an incorrect module: `index` #16461

Open iwahbe opened 1 week ago

iwahbe commented 1 week ago

What happened?

As part of https://github.com/pulumi/pulumi-ns1/pull/482, I found this programgen diff: https://github.com/pulumi/pulumi-ns1/pull/482/commits/4a50819a06142139232892958b36fbea34dcbd28.

Example

See the above diff:

 //
-// "github.com/pulumi/pulumi-external/sdk/go/external"
+// "github.com/pulumi/pulumi-external/sdk/v1/go/external"
 // "github.com/pulumi/pulumi-ns1/sdk/v3/go/ns1"
 // "github.com/pulumi/pulumi-std/sdk/go/std"
 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 //
 // )
 //
 // func main() {
 //     pulumi.Run(func(ctx *pulumi.Context) error {
 //         _, err := ns1.NewZone(ctx, "example", &ns1.ZoneArgs{
 //             Zone: pulumi.String("terraform.example.io"),
 //         })
 //         if err != nil {
 //             return err
 //         }
 //         ...
 //         // Some other non-NS1 provider that returns a zone with a trailing dot and a domain with a leading dot.
-//         _, err = external.NewSource(ctx, "baz", &external.SourceArgs{
+//         _, err = index.NewSource(ctx, "baz", &index.SourceArgs{

Output of pulumi about

NA

Additional context

This is a regression.

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

Frassle commented 5 days ago

@iwahbe do you have a version range for what version of Pulumi this did work in?

iwahbe commented 5 days ago

We are running on latest, so this broke when the GH runner's version of Pulumi upgraded, between 4 days and 1 week ago. I'm guessing this broke in the last 2 releases.

I can't point to specific versions right now, we have shipped that fix in CI but it wasn't rolled out last week.