Skip to content

Commit 7a642d6

Browse files
ghaddowmarcincuber
authored andcommitted
Feature/fix dynamic port mapping (#3)
* improve tag support and expose host port * fix formatting * fix for dynamic port mapping
1 parent 9da8c6b commit 7a642d6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ resource "aws_ecs_task_definition" "task" {
142142
"portMappings": [
143143
{
144144
"containerPort": ${var.task_container_port},
145+
%{if var.task_host_port != 0~}
145146
"hostPort": ${var.task_host_port},
147+
%{~endif}
146148
"protocol":"tcp"
147149
}
148150
],

0 commit comments

Comments
 (0)