compose-x / ecs_composex

Manage, Configure and Deploy your services and AWS services and applications from your docker-compose definitions
https://docs.compose-x.io
Mozilla Public License 2.0
168 stars 17 forks source link

[DOCS] x-elb2 Target's access path #777

Open siasin opened 2 months ago

siasin commented 2 months ago

According to the x-elbv2 doc, we were able to create a listener rule with an unique access path in our loadbalancer.

x-elbv2:
  public-alb:
    Lookup:
      loadbalancer:
        Tags:
          Name: my-test-alb
    MacroParameters:
      Ingress:
        ExtSources:
          - IPv4: "0.0.0.0/0"
            Description: ANY
    Properties:
      Scheme: internet-facing
      Type: application
    Listeners:
      - Port: 443
        Protocol: HTTPS
        Certificates:
         - CertificateArn: arn:aws:acm:eu-west-3:yyyy:certificate/xxxxxx
...
        Targets:
          - name: family:my-service
            access: /abc

We need to add an alternative path for the access path (e.g. or /abc/*). Right now, we can do the following in AWS console:

image

However, we don't want to edit the rule condition via console but to create this rule directly with x-elb2 definition when the stack is being deployed.

I found the following which might do the work. However, this will create 2 rules instead of one.

        Targets:
          - name: family:my-service
            access: /abc
          - name: family:my-service
            access: /abc/*

I couldn't find much explanation to define an access path with OR condition in the doc. Is this possible?