pulumi / pulumi-eks

A Pulumi component for easily creating and managing an Amazon EKS Cluster
https://www.pulumi.com/registry/packages/eks/
Apache License 2.0
168 stars 77 forks source link

Pulumi fails with exception when using CreationRoleProvider in non-nodejs Pulumi programs #1123

Open rquitales opened 2 months ago

rquitales commented 2 months ago

What happened?

We are currently blocked by https://github.com/pulumi/pulumi/issues/15926 as we are unable to provide a constructed AWS provider across the MLC boundary.

This means that all Go, Java, Python, Java Pulumi programs must instead use the Cluster.ProviderCredentialOpts option instead (ref: https://www.pulumi.com/registry/packages/eks/api-docs/cluster/#providercredentialopts_go). This is a wrapper that will construct the required provider.

Example

The following error is produced if a non-nodejs Pulumi program provides CreationRoleProvider to cluster resources.

   TypeError: provider.getPackage is not a function: TypeError: provider.getPackage is not a function
        at convertToProvidersMap (/snapshot/eks/node_modules/@pulumi/pulumi/resource.js:334:25)
        at new Resource (/snapshot/eks/node_modules/@pulumi/pulumi/resource.js:205:133)
        at new CustomResource (/snapshot/eks/node_modules/@pulumi/pulumi/resource.js:400:9)
        at new Cluster (/snapshot/eks/node_modules/@pulumi/aws/eks/cluster.js:200:9)
        at createCore (/snapshot/eks/bin/cluster.js:331:24)
        at createCluster (/snapshot/eks/bin/cluster.js:827:18)
        at new ClusterInternal (/snapshot/eks/bin/cluster.js:906:25)
        at Object.construct (/snapshot/eks/bin/cmd/provider/cluster.js:21:29)
        at Provider.construct (/snapshot/eks/bin/cmd/provider/index.js:131:24)
        at Server.<anonymous> (/snapshot/eks/node_modules/@pulumi/pulumi/provider/server.js:315:52)

Output of pulumi about

-

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