Skip to content

Commit

Permalink
Fixed HTTPS Load Balancer Listener Rule (widdix#72)
Browse files Browse the repository at this point in the history
Now will apply the same Conditions property as the HTTP Listener.
This allows the LoadBalancerHostPattern parameter to be used to
route traffic on the ALB.
  • Loading branch information
5290charlie authored and michaelwittig committed May 22, 2017
1 parent b240c97 commit ab211d9
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions ecs/service-cluster-alb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,25 @@ Resources:
Actions:
- Type: forward
TargetGroupArn: !Ref LoadBalancerTargetGroup
Conditions:
- Field: path-pattern
Values:
- !Sub '/${LoadBalancerPath}/*'
Conditions: !If
- HasLoadBalancerPath
- !If
- HasLoadBalancerHostPattern
- - Field: host-header
Values:
- !Ref LoadBalancerHostPattern
- Field: path-pattern
Values:
- !Sub '/${LoadBalancerPath}/*'
- - Field: path-pattern
Values:
- !Sub '/${LoadBalancerPath}/*'
- !If
- HasLoadBalancerHostPattern
- - Field: host-header
Values:
- !Ref LoadBalancerHostPattern
- [] # neither LoadBalancerHostPattern nor LoadBalancerPath specified
ListenerArn:
'Fn::ImportValue': !Sub '${ParentClusterStack}-HttpsListener'
Priority: !Ref LoadBalancerPriority
Expand Down

0 comments on commit ab211d9

Please sign in to comment.