gorgeous-pillow-13604
10/17/2023, 8:38 PMaws:cloudformation:Stack (eks-cluster-nodes):
error: 1 error occurred:
* creating urn:pulumi:dev::pulumi-sandbox-k8s::eks:index:Cluster$aws:cloudformation/stack:Stack::eks-cluster-nodes: 1 error occurred:
* waiting for CloudFormation Stack (arn:aws:cloudformation:us-east-1:158719089730:stack/eks-cluster-557b1a8b/53a1e670-6d29-11ee-83dc-1257eb19d3d3) create: failed to create CloudFormation stack, rollback requested (ROLLBACK_COMPLETE): ["The following resource(s) failed to create: [NodeGroup]. Rollback requested by user." "Resource handler returned message: \"At least one Availability Zone or VPC Subnet is required. (Service: AutoScaling, Status Code: 400, Request ID: 5edc3134-4282-4cf3-b435-33dd1748f765)\" (RequestToken: 704960ef-620f-21b8-e25e-1cb2ccd2cc0a, HandlerErrorCode: InvalidRequest)"]
The relevant code in my index.ts is below - any help would be appreciated:
// Get the default VPC
const defaultVpc = pulumi.output(aws.ec2.getVpc({ default: true }));
// Get all subnets associated with the default VPC
const defaultVpcSubnets = defaultVpc.apply(vpc => {
return aws.ec2.getSubnetIds({ vpcId: vpc.id });
});
// Filter out the public subnets and export their IDs
const publicSubnetIds = defaultVpcSubnets.apply(subnets =>
Promise.all(subnets.ids.map(id => aws.ec2.getSubnet({ id })))
.then(subnets => subnets.filter(subnet => subnet.mapPublicIpOnLaunch).map(subnet => subnet.id))
);
// Filter out the private subnets and export their IDs
const privateSubnetIds = defaultVpcSubnets.apply(subnets =>
Promise.all(subnets.ids.map(id => aws.ec2.getSubnet({ id })))
.then(subnets => subnets.filter(subnet => !subnet.mapPublicIpOnLaunch).map(subnet => subnet.id))
);
// Create the EKS cluster
const eksCluster = new eks.Cluster("eks-cluster", {
// Put the cluster in the new VPC created earlier
vpcId: defaultVpc.id,
// Public subnets will be used for load balancers
publicSubnetIds: publicSubnetIds,
// Private subnets will be used for cluster nodes
privateSubnetIds: privateSubnetIds,
// Change configuration values to change any of the following settings
instanceType: eksNodeInstanceType,
desiredCapacity: desiredClusterSize,
minSize: minClusterSize,
maxSize: maxClusterSize,
// Do not give the worker nodes public IP addresses
nodeAssociatePublicIpAddress: false,
// Uncomment the next two lines for a private cluster (VPN access required)
// endpointPrivateAccess: true,
// endpointPublicAccess: false
});
little-cartoon-10569
10/17/2023, 9:56 PMgorgeous-pillow-13604
10/17/2023, 9:58 PMlittle-cartoon-10569
10/17/2023, 9:59 PMgorgeous-pillow-13604
10/17/2023, 10:01 PMlittle-cartoon-10569
10/17/2023, 10:02 PMgorgeous-pillow-13604
10/17/2023, 10:14 PMaws:ec2:Eip (ticketing-vpc-1):
error: 1 error occurred:
* creating EC2 EIP: AddressLimitExceeded: The maximum number of addresses has been reached.
status code: 400, request id: 3ff6b08a-a85c-45cd-8022-af0221bbc3f2
little-cartoon-10569
10/17/2023, 10:19 PM