-
Notifications
You must be signed in to change notification settings - Fork 253
Customizing EFS Mount Targets using Cloud Formation and EFS Security Group #1184
Comments
|
But... how does one go about accessing SubnetNNNNNN in a Cloud Formation overlay? The capabilities available in a Compose file to access the Subnet ID's and use them to construct object names are limited One question -- Can one write this:
It's not clear from the documentation on the Docker website whether this is possible. Hurm... |
FYI -- I have worked out some crazy code using Terraform to generate a Cloud Formation overlay then to inject that into the Compose file. But -- as I thought about this -- I'm curious about why do the mount targets have the DefaultNetwork security group? This security group looks to be pretty generic, and is not designed for the use of an EFS Mount Target. Such a security group should focus solely on the NFS protocol, and limit access from CIDR's associated with the VPC. That's not what the DefaultNetwork security group does. This security group is much more appropriate for EFS Mount Targets. The cloud formation overlay I wrote attaches this security group to the mount targets, and then I can easily NFS mount the EFS partition from an EC2 instance.
|
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. |
This issue has been automatically closed because it had not recent activity during the stale period. |
Description
The name for Mount Targets generated for EFS volumes have a coded string making it impossible to create an override in an Cloud Formation overlay.
Further, it seems the Security Group is incorrectly set up.
Example:
The name includes a coded value for SubnetNNNNN. It looks to be impossible to create an overlay to target these items.
The other issue is that these Mount Targets use DefaultNetwork as the security group. That security group is configured in a funny way that prevents desired usage of the EFS mount.
Steps to reproduce the issue:
Describe the results you received:
The result is that running
docker compose convert
on the Compose file shows me a Cloud Formation template that I cannot customize.I have determined that one can modify the DefaultNetwork security group with ingress for more CIDR's and then the mount attempt works. But because of how the Cloud Formation template is structured, I cannot add another security group to the Mount Targets.
I could write an overlay to modify DefaultNetwork but that security group is used by many other things. It's best to target modifying the security group settings of the EFS mount targets.
Describe the results you expected:
I want to launch an EC2 instance that can mount an EFS partition being used by a Compose file. e.g. If the EFS partition has the directory tree for a Wordpress site, to be able to use SSHFS to access that EFS volume to edit files.
In other words, the expectation is that the EFS Mount Target would have a Security Group allowing NFS within the VPC.
This is somewhat related to an issue I filed earlier about mounting the same EFS partition from different Compose files -- #1085
Additional information you deem important (e.g. issue happens only occasionally):
This always happens
Output of
docker version
:Output of
docker context show
:You can also run
docker context inspect context-name
to give us more details but don't forget to remove sensitive content.Output of
docker info
:Additional environment details (AWS ECS, Azure ACI, local, etc.):
I'm running against AWS ECS from a macOS 10.15.7 machine
The text was updated successfully, but these errors were encountered: