aws-samples/ecs-refarch-cloudformation

Assigning multiple TargetGroupArn to a listener

nkkaushik opened this issue · 0 comments

Hi,

I want to run multiple services on ALB using path based routing and I want to assign multiple TargetGroupArn to the listener (as highlighted below), please suggest the right way or provide any CF script to launch multiple services on single ALB.

Thanks

ALBListener:
Type: AWS::ElasticLoadBalancingV2::Listener
DependsOn: ECSServiceRole
Properties:
DefaultActions:
- Type: forward
TargetGroupArn: !Ref 'ECSTG', !Ref 'ECSTest2TG']
LoadBalancerArn: !Ref 'ECSALB'
Port: '80'
Protocol: HTTP