Skip to content

Commit

Permalink
fix container port bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zahornyak committed May 17, 2024
1 parent f2c0343 commit ecfd861
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module "service_container_definition" {

container_depends_on = lookup(each.value, "container_depends_on", null)

port_mappings = lookup(each.value, "port_mappings", null) != null ? lookup(each.value, "port_mappings", null) : [
port_mappings = lookup(each.value, "port_mappings", null) != null || lookup(each.value, "containerPort", null) == null ? lookup(each.value, "port_mappings", []) : [
{
containerPort = lookup(each.value, "containerPort", null)
protocol = lookup(each.value, "protocol", "tcp")
Expand Down

0 comments on commit ecfd861

Please sign in to comment.