diff --git a/app/models/backend/ecs/v2/service_stack.rb b/app/models/backend/ecs/v2/service_stack.rb index 8382a328..dd1f273e 100644 --- a/app/models/backend/ecs/v2/service_stack.rb +++ b/app/models/backend/ecs/v2/service_stack.rb @@ -4,7 +4,11 @@ class Builder < CloudFormation::Builder def build_resources deps = [] if use_alb? - deps = ['LBListenerRuleHTTP', 'LBListenerRuleHTTPS'] + deps = ['LBListenerRuleHTTP'] + + if listener&.endpoint&.https_listener_id&.present? + deps << 'LBListenerRuleHTTPS' + end end add_resource("AWS::ECS::Service", "ECSService", { depends_on: deps }) do |j| j.Cluster district.name