ecs_composex icon indicating copy to clipboard operation
ecs_composex copied to clipboard

[DOCS] x-elb2 Target's access path

Open siasin opened this issue 1 year ago • 0 comments

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?

siasin avatar Sep 02 '24 13:09 siasin