NetworkLoadBalancedFargateService: (Passed subnets are not getting picked while creating the LoadBalancer) #29812
Labels
@aws-cdk/aws-ecs
Related to Amazon Elastic Container
@aws-cdk/aws-ecs-patterns
Related to ecs-patterns library
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
var NLBService = new NetworkLoadBalancedFargateService(this, “NLBService”, new NetworkLoadBalancedFargateServiceProps {
MemoryLimitMiB = 512,
TaskDefinition = taskDefinition,
Cluster = cluster,
CircuitBreaker = new DeploymentCircuitBreaker {
Enable = true,
Rollback = true
},
ServiceName = “NLBService”,
PublicLoadBalancer = false,
TaskSubnets = new SubnetSelection {
Subnets = new [] { Subnet.FromSubnetId(this, "subnet", "subnet-12345678”9) }
}
});
This is my code subnet passed via SubnetSelection is getting passed to ECS service, but Loadbalancer picks all the subnets from VPC, and its not taking the subnets from the list which is passed in above code.
Expected Behavior
Expected behaviour is it should pick the passed subnet while creating the NetWork LoadBalancer.
Current Behavior
Passed subnets are not getting picked while creating the LoadBalancer
Reproduction Steps
Above code is producing the issue
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.134.0 (build 265d769)
Framework Version
No response
Node.js Version
v20.12.0
OS
Linux
Language
.NET
Language Version
6
Other information
No response
The text was updated successfully, but these errors were encountered: