Skip to content

Commit c31e570

Browse files
committed
Fix ECS def'n
1 parent 2a8f86e commit c31e570

File tree

1 file changed

+5
-3
lines changed
  • operations/deployment/terraform/modules/aws/ecs

1 file changed

+5
-3
lines changed

operations/deployment/terraform/modules/aws/ecs/aws_ecs.tf

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,17 @@ resource "aws_ecs_task_definition" "aws_ecs_task_ignore_definition" {
8181
cpu = local.aws_ecs_task_cpu[count.index]
8282
memory = local.aws_ecs_task_mem[count.index]
8383
execution_role_arn = local.ecsTaskExecutionRole
84-
container_definitions = sensitive(jsonencode([
84+
container_definitions = sensitive(jsonencode([
8585
{
86-
"name": "simple-web-server",
86+
"name": var.aws_ecs_task_name != "" ? local.aws_ecs_task_name[count.index] : "${local.aws_ecs_task_name[count.index]}${count.index}",
8787
"image": "nginx:alpine",
8888
"essential": true,
8989
"portMappings": [
9090
{
9191
"containerPort": 80,
92-
"protocol": "http"
92+
"protocol": "tcp",
93+
"hostPort": 80,
94+
"appProtocol": "http"
9395
}
9496
]
9597
}

0 commit comments

Comments
 (0)