diff --git a/main.tf b/main.tf index f654c33..0044cd0 100644 --- a/main.tf +++ b/main.tf @@ -201,7 +201,9 @@ resource "aws_ecs_task_definition" "this" { type = "APPMESH" properties = { - AppPorts = var.container_port + AppPorts = join(",", concat([tostring(var.container_port)], [ + for x in var.extra_port_mappings : x.containerPort + ])) EgressIgnoredIPs = "169.254.170.2,169.254.169.254" IgnoredGID = "1337" ProxyEgressPort = 15001 diff --git a/variables.tf b/variables.tf index 20cbb93..83ad418 100644 --- a/variables.tf +++ b/variables.tf @@ -327,7 +327,7 @@ variable "efs_volumes" { variable "extra_port_mappings" { default = [] description = "Additional ports to be exposed from the container." - type = list(object({ + type = list(object({ hostPort = number containerPort = number protocol = optional(string, "tcp")