I thought `pulumi.All` would create an order on re...
# golang
b
I thought
pulumi.All
would create an order on resource creation, but yet following does not work as expected:
Copy code
cluster, err := CreateCluster(ctx, config)
	if err != nil {
		return err
	}
	
	// "<http://github.com/pulumi/pulumi-eks/sdk/v2/go/eks|github.com/pulumi/pulumi-eks/sdk/v2/go/eks>"
	// NodeGroup1/NodeGroup2/NodeGroup3 are of type *eks.ManagedNodeGroup
	
	pulumi.All(cluster.NodeGroup1, cluster.NodeGroup2, cluster.NodeGroup3).ApplyT(func(_ []interface{}) error {
		err = SetupNamespaces(ctx, config, cluster)
		if err != nil {
			return err
		}
		return SetupServices(ctx, config, cluster)
	})
in
CreateCluster
I create an EKS cluster with 3 managed nodegroups. Only after those three created, I would like to call
SetupNamespaces
and
SetupServices
. However, it is happening in parallel. How do I specify this order?
l
It will take a while before the Kubernetes API will be functional. I would create 2 separate stacks. • 1 for the EKS cluster • 1 to configure your cluster resources
b
noted, thank you @late-chef-72896
l
np