cloudposse / terraform-aws-ecs-container-definition

Terraform module to generate well-formed JSON documents (container definitions) that are passed to the aws_ecs_task_definition Terraform resource
https://cloudposse.com/accelerate
Apache License 2.0
340 stars 245 forks source link

PortMappings variable definition has repeated name argument which fails to initialize #173

Closed jpulgar4 closed 1 year ago

jpulgar4 commented 1 year ago

Describe the Bug

In the variables definition file, for portMappings, there is a repeated name argument. This causes terraform init with version 0.61.0 to fail.

Expected Behavior

A terraform init with version 0.61.0 should go through with no errors.

Steps to Reproduce

Set version of the module to 0.61.0 and run a terraform init.

Screenshots

╷
│ Error: Invalid type specification
│ 
│   on .terraform/modules/haproxy.ecs_container/variables.tf line 107, in variable "container_definition":
│  102:     portMappings = optional(list(object({
│  103:       name          = optional(string)
│  104:       containerPort = number
│  105:       hostPort      = optional(number)
│  106:       protocol      = optional(string)
│  107:       name          = optional(string)
│  108:       appProtocol   = optional(string)
│  109:     })))
│ 
│ Object constructor map keys must be unique.
╵

Environment

Additional Context

No response

jpulgar4 commented 1 year ago

Fixed by #170 or #171

rwe-dtroup commented 1 year ago

Fixed by #170 or #171

Can we get one of them merged please?