-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[ecs-patterns]: load balancer name of ApplicationLoadBalancerProps not working when creating ApplicationMultipleTargetGroupsEc2Service #23535
Copy link
Copy link
Closed
Labels
@aws-cdk/aws-ecs-patternsRelated to ecs-patterns libraryRelated to ecs-patterns librarybugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp2
Description
Describe the bug
I'm creating an ecs service with multiple target groups using ecs_pattern module.
alb_props = ecs_patterns.ApplicationLoadBalancerProps(
name="custom-alb-name",
domain_name="*.example.com",
domain_zone=route53.HostedZone.from_hosted_zone_attributes(
self, "HostedZone",
hosted_zone_id="xxxxxx",
zone_name="example.com"
),
listeners=[
listener_1, listener2
],
public_load_balancer=False
)
ecs_service = ecs_patterns.ApplicationMultipleTargetGroupsEc2Service(
self, "ECS-ID",
service_name="service-name",
cluster=cluster-name-ref,
task_definition=task_definition,
load_balancers=[alb_props],
target_groups=[target_props_1, target_prop_2],
cpu=1024,
memory_reservation_mib=2048,
desired_count=1
)
Expected Behavior
The expected name of load balancer name should be "custom-alb-name"
Current Behavior
Load balancer name is auto-generated
Reproduction Steps
- Create cdk
- Wiring code like snip above
- Run
cdk deploy
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.54.0
Framework Version
No response
Node.js Version
v16.15.0
OS
Window
Language
Python
Language Version
python 3.11.1
Other information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-ecs-patternsRelated to ecs-patterns libraryRelated to ecs-patterns librarybugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp2