AWS::ECS::Service needs DependsOn AWS::ElasticLoadBalancingV2::ListenerRule #1160
Labels
@aws-cdk/aws-ecs
Related to Amazon Elastic Container
@aws-cdk/aws-elasticloadbalancing
Related to Amazon Elastic Load Balancing
good first issue
Related to contributions. See CONTRIBUTING.md
When creating a service and adding it to a load balancer the CloudFormation template fails to deploy with the above error. Example code:
This is probably happening because the
AWS::ECS::Service
resource needs aDependsOn
to theAWS::ElasticLoadBalancingV2::ListenerRule
resource. Otherwise it is a race condition that causes a failure if the service resource creation starts before the listener rule is ready.The text was updated successfully, but these errors were encountered: