Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip http rule reviewapp #803

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions app/models/backend/ecs/v2/service_stack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ class Builder < CloudFormation::Builder
def build_resources
deps = []
if use_alb?
deps = ['LBListenerRuleHTTP']
deps = []
if !service&.heritage&.review?
deps << 'LBListenerRuleHTTP'
end

if listener&.endpoint&.https_listener_id&.present?
deps << 'LBListenerRuleHTTPS'
Expand Down Expand Up @@ -180,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
Loading