terraform-aws-ecs-web-app icon indicating copy to clipboard operation
terraform-aws-ecs-web-app copied to clipboard

EFS Volume configuration does not get passed on

Open xmj opened this issue 1 year ago • 0 comments

Describe the Bug

When specifying an EFS Volume configuration in var.volumes, this gets handed to the cloudposse/ecs-alb-service-task/aws module via its variable var.docker_volumes, in which the EFS part will be dropped.

If my reading of this repo is correct the bug was caused in

https://github.com/cloudposse/terraform-aws-ecs-web-app/commit/23c91053dc4be28268ec49d01de58cbd1a96a67c

through an automated update caused by a variable refactoring in the ecs-alb-service-task module. https://github.com/cloudposse/terraform-aws-ecs-alb-service-task/commit/4294ee2bd26f0fa82ea3d1a8abf5c62568a25b95

Expected Behavior

Passing the efs_volume_configuration list of maps will create an EFS Volume Configuration in the Task Definition

Steps to Reproduce

Create a VPC, Subnet, ALB, EFS volume, then try to pass the latter into a container.

A module call like this should create an EFS Volume configuration

module "web_app" {
  source = "cloudposse/ecs-web-app/aws"

  volumes = [{
    name = "service-storage"
    host_path = ""
    docker_volume_configuration = []

    efs_volume_configuration  = [
    {
      file_system_id     = aws_efs_file_system.foo.id
      root_directory     = "/"
      transit_encryption = "ENABLED"
      transit_encryption_port = null
      authorization_config = [
      {
        access_point_id = aws_efs_access_point.foo.id
        iam             = "ENABLED"
      }
      ]
    }
    ]
  }]
}

Screenshots

No response

Environment

  • OS: Fedora 37
  • Module: latest (1.7.0)

Additional Context

No response

xmj avatar Mar 02 '23 12:03 xmj