This message was deleted.
# aws
s
This message was deleted.
b
can you share your code?
b
I'm using the new
pulumi-eks
Go package to create the cluster:
Copy code
// Create EKS Cluster
		eksCluster, err := eks.NewCluster(ctx, "eks-cluster", &eks.ClusterArgs{
			InstanceType:    pulumi.String("t2.medium"),
			DesiredCapacity: <http://pulumi.Int|pulumi.Int>(2),
			MaxSize:         <http://pulumi.Int|pulumi.Int>(2),
			MinSize:         <http://pulumi.Int|pulumi.Int>(1),
		})
		if err != nil {
			return err
		}
eksctl
from AWS seems to provide a
--zone
flag for passing in the desired zones: https://aws.amazon.com/premiumsupport/knowledge-center/eks-cluster-creation-errors/. Hoping something similar is available for Pulumi.
b
are you using the default VPC?
if you're using the default VPC, the EKS module will put nodes in all of the availability zones the VPC has subnets in. You'll need to specify the subnets for each AZ using the
ClusterVPCConfig
https://www.pulumi.com/docs/reference/pkg/aws/eks/cluster/#clustervpcconfig
you can grab the subnet IDs like so
Copy code
subnet, err := ec2.GetSubnetIds(ctx, &ec2.GetSubnetIdsArgs{VpcId: vpc.Id})
		if err != nil {
			return err
		}
You'll need to use a filter to filter by AZ https://www.pulumi.com/docs/reference/pkg/aws/ec2/getsubnetids/#getsubnetidsfilter
b
this seems to have done the job. Thanks, @billowy-army-68599!
b
👍