docker-archive / compose-cli

Easily run your Compose application to the cloud with compose-cli
Apache License 2.0
957 stars 255 forks source link

Limit EFS volume creation to public subnets #2231

Open komatom opened 1 year ago

komatom commented 1 year ago

There is a problem with EFS volumes when you have a lot of subnets - they can't be created. Actually by now it can only work if you have a network with only 3 public subnets in the 3 AWS availability zones without any additional subnets.

fixes #2164 , helps #1739

This helps by identifying the public subnets, and creates mount targets only for them, it expects the following:

  1. you have 3 public subnets and N number of additional
  2. there is routing table associated with the 3 public subnets, and separate routing table left as default for any number of other private subnets
  3. private routing table is the main table

Since there is no proper way of setting the subnets used by the volumes, I am proposing this so at least it tries to create the EFS mounts properly when you have a lot of subnets.