@@ -135,6 +135,55 @@ Similar syntax as for ECS Services Ingress, allow you to define Ingress. See the
135135Listeners
136136=========
137137
138+ .. hint ::
139+
140+ Since version 1.1.8 you can define the listeners with a mapping, key being the port. For example
141+
142+ .. code-block ::
143+
144+ x-elbv2:
145+ lbA:
146+ Properties:
147+ Type: application
148+ Scheme: internet-facing
149+ DnsAliases:
150+ - Route53Zone: x-route53::public-domain-01
151+ Names:
152+ - test.bdd-testing.compose-x.io
153+ - someother.test.bdd-testing.compose-x.io
154+ Settings:
155+ S3Logs: bucket:/prefix
156+ timeout_seconds: 60
157+ desync_mitigation_mode: defensive
158+ drop_invalid_header_fields: True
159+ http2: False
160+ cross_zone: True
161+ Listeners:
162+ 80:
163+ Protocol: HTTP
164+ DefaultActions:
165+ - Redirect: HTTP_TO_HTTPS
166+ 443:
167+ Protocol: HTTP
168+ Certificates:
169+ - x-acm: public-acm-01
170+ Targets:
171+ - name: bignicefamily:app01
172+ access: /somewhere
173+ 8080:
174+ Protocol: HTTP
175+ Certificates:
176+ - x-acm: public-acm-01
177+ - CertificateArn: arn:aws:acm:eu-west-1:012345678912:certificate/102402a1-d0d2-46ff-b26b-33008f072ee8
178+ Targets:
179+ - name: bignicefamily:rproxy
180+ access: /
181+ - name: youtoo:rproxy
182+ access: /stupid
183+ - name: bignicefamily:app01
184+ access: thereisnospoon.ews-network.net:8080/abcd
185+
186+
138187 You can define in a very simple way your `Listener definition `_ and cross-reference other resources, here, the services
139188and ACM certificates you might be creating.
140189
@@ -149,6 +198,10 @@ The following properties are identical to the original CFN definition.
149198
150199`JSON Schema definition <https://github.com/compose-x/ecs_composex_specs/blob/main/ecs_composex_specs/x-elbv2.spec.json#L82 >`__
151200
201+ .. note ::
202+
203+ When using the dict/object format for Listener ports, the ``Port `` property defined is ignored as to avoid having conflicting values.
204+
152205.. hint ::
153206
154207 For certificates, you can also use **x-acm ** to refer to an ACM certificate you are creating with this stack.
@@ -611,7 +664,7 @@ as reference for your use-case.
611664.. _Type : https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-loadbalancer.html#cfn-elasticloadbalancingv2-loadbalancer-type
612665.. _Target Group : https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html
613666.. _Listener definition : https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html
614- .. _AuthenticateCognitoConfig : https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticatecognitoconfig-userpoolarn
667+ .. _AuthenticateCognitoConfig : https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticatecognitoconfig.html
615668.. _AuthenticateOidcConfig : https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticateoidcconfig.html
616669.. _LoadBalancerAttributes : https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-loadbalancer.html#cfn-elasticloadbalancingv2-loadbalancer-loadbalancerattributes
617670.. _Tags : https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-loadbalancer.html#cfn-elasticloadbalancingv2-loadbalancer-tags
0 commit comments