It is possible to have a CF stack for an ECS service (e.g. blue/green) and separate stack for the front ELBv2? I've tried having the ELB TargetGroup in the ECS stack and the load balancer and listener in another stack, but the Cloud Formation reports and error when building the target group
"The target group with targetGroupArn xxxxxx does not have an associated load balancer."
Yet there is nothing in the target group resource that defines any load balancer for it to depend on:
ELB2TargetGroup:
Type: AWS::ElasticLoadBalancingV2::TargetGroup
Properties:
HealthCheckIntervalSeconds: 60
UnhealthyThresholdCount: 10
HealthCheckPath: /
Port: !Ref ALBPort
Protocol: !Ref ALBProtocol
VpcId:
Fn::ImportValue: !Sub "${ECSClusterStack}-ClusterVPC"