pulumi-eks icon indicating copy to clipboard operation
pulumi-eks copied to clipboard

Python/.NET/Go: Support passing `Cluster` directly as an input

Open justinvp opened this issue 4 years ago • 1 comments

In the TypeScript API, there are a few places that accept a cluster argument typed as Cluster | CoreData (CoreData is an interface representing the outputs of the cluster):

https://github.com/pulumi/pulumi-eks/blob/26c027a9e6396a4e9346e720b80684871c94d215/nodejs/eks/nodegroup.ts#L260

In the schematized API, this is currently typed as a CoreData type, which means you need to pass it as follows (Python):

cluster=cluster.core

Ideally, we'd be able to pass the cluster itself, just like in TypeScript:

cluster=cluster

I haven't tried this yet, but it may all "just work" if the proper registrations are in place for Cluster.

justinvp avatar Dec 04 '20 22:12 justinvp

For Python, it's possible to pass it like cluster=cluster.core because the cluster argument accepts either a Mapping or CoreDataArgs input type and output types are subclasses of Dict.

But for languages like .NET, it'll require manually converting a CoreData output into a CoreDataArgs input, which is not ideal.

justinvp avatar Dec 16 '20 13:12 justinvp

Cannot close issue without required labels: kind/

pulumi-bot avatar Nov 21 '22 09:11 pulumi-bot