sparse-intern-71089
06/13/2022, 6:17 PMprehistoric-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.