Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Support load balancer config in x-aws-cloudformation overlay for private subnets #1319

Description

@dpca

Hello!

I'm trying to set up some internally-facing docker services using the docker ECS integration, and am currently creating my own load balancer within our private VPC and then defining it using x-aws-loadbalancer. I'm wondering if instead of this, could I put the CloudFormation into the x-aws-cloudformation overlay and maintain everything with the docker compose lifecycle? I think that would be very clean and simplify our setup quite a bit. I've tried using the x-aws-cloudformation overlay with a resource entry like the following to manually set the load balancer:

x-aws-cloudformation:
  Resources:
    LoadBalancer:
      Properties:
        Scheme: internal
        SecurityGroups:
          - sg-id
          - Ref: DefaultNetwork
        Subnets:
          - subnet-1
          - subnet-2
        Type: application
      Type: AWS::ElasticLoadBalancingV2::LoadBalancer

x-aws-vpc: vpc-id

but I get the error message:

VPC vpc-id should have at least 2 associated public subnets in different availability zones

Is there any possibility of supporting load balancer configuration in the overlay like this? Essentially I think this would require skipping the automated load balancer setup if LoadBalancer is present in the x-aws-cloudformation Resources entry. Alternatively, having private VPC support would also solve this issue because I wouldn't need to set up a custom LoadBalancer entry, although I saw #1064 so I assume this probably won't be supported.

Thanks for taking a look! I really appreciate docker and the ECS integration is awesome, so I'm hoping to see if I can find a nice way around this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions