Skip to content

Commit

Permalink
do not add http rule for reviewapp
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsiaw committed Feb 6, 2024
1 parent d7688b4 commit e456b80
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app/models/backend/ecs/v2/service_stack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,13 @@ def build_classic_elb
end

def build_alb_listener
add_resource("AWS::ElasticLoadBalancingV2::ListenerRule", "LBListenerRuleHTTP") do |j|
j.Actions [{"TargetGroupArn" => ref("LBTargetGroup1"), "Type" => "forward"}]
j.Conditions(listener.rule_conditions.map { |c| {"Field" => c["type"], "Values" => [c["value"]]} })
j.ListenerArn listener.endpoint.http_listener_id
j.Priority listener.rule_priority
if !service&.heritage&.review?
add_resource("AWS::ElasticLoadBalancingV2::ListenerRule", "LBListenerRuleHTTP") do |j|
j.Actions [{"TargetGroupArn" => ref("LBTargetGroup1"), "Type" => "forward"}]
j.Conditions(listener.rule_conditions.map { |c| {"Field" => c["type"], "Values" => [c["value"]]} })
j.ListenerArn listener.endpoint.http_listener_id
j.Priority listener.rule_priority
end
end

if listener.endpoint.https_listener_id.present?
Expand Down

0 comments on commit e456b80

Please sign in to comment.