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

Closed

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.

Activity

  1. flaviostutz commented on Mar 10, 2021

    @flaviostutz
    Contributor

    I got this error some time ago when using a custom VPC (not the default VPC). Maybe you have something in this direction here...

  2. ndeloof commented on Mar 12, 2021

    @ndeloof
    Collaborator

    x-aws-cloudformation is an opaque attribute for ECS integration, to be applied as a patch to the compose->CF converted templated. So we can't use it to retrieve subnet information and change the conversion process.

    #1411 could be a better option

  3. stale commented on Sep 19, 2021

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  4. stale commented on Sep 26, 2021

    @stale

    This issue has been automatically closed because it had not recent activity during the stale period.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions