pulumi-eks
pulumi-eks copied to clipboard
Python/.NET/Go: Support passing `Cluster` directly as an input
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.
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.
Cannot close issue without required labels: kind/