This gist provides a sample terraform configuration to use EFS volume in ECS task running on EC2:
- Create a security group
Afor serviceB - Create a security group for EFS to allow
B - Create EFS file system
Cand mount target on multiple subnets - Create ECS task
Dwith EFS volumeC - Create ECS service for ECS task
Cwith security groupA