famous-leather-72830
06/13/2022, 6:17 PMeks.ManagedNodeGroup
from @pulumi/eks
in a separate project from where the cluster was created (via eks.Cluster
from @pulumi/eks
)? From what it looks like in the API docs and the code itself, ManagedNodeGroup requires a direct cluster object, and its various properties, as well as it uses the same cluster for the parent
property. I have tried a magnitude of things to simulate this behaviour via StackReference
kubeconfig and providers, but to no avail. I am at my wit's end quite frankly.
references:
https://github.com/pulumi/pulumi-eks/blob/master/nodejs/eks/nodegroup.ts#L842
https://www.pulumi.com/docs/guides/crosswalk/aws/eks/prehistoric-london-9917
06/13/2022, 8:42 PMCluster
object via a StackReference
. Maybe there’s another way? I’m not sure what your goal is, but supposing you wanted to make the ManagedNodeGroup
optional, you could create a ComponentResource with an eks.Cluster
object a required argument, and publish it as a module. Then, in your main program, create it based on a conditional:
if ( args.createManagedNodeGroup ) {
new MyManagedNodeGroup('name', {cluster: cluster, ...}, {opts});
}
Then you have something reusable.