terraform-aws-ecs-fargate-task-definition icon indicating copy to clipboard operation
terraform-aws-ecs-fargate-task-definition copied to clipboard

The given value is not suitable for child module variable "containers" defined at .terraform/modules/test/variables.tf:47,1-22: all list elements must have the same type.

Open mhrznamn068 opened this issue 2 years ago • 5 comments

module "td" { source = "../../" name_prefix = "multiple-containers"

containers = [ module.container-definition-1.json_map_object, module.container-definition-2.json_map_object, ] }

mhrznamn068 avatar May 05 '22 15:05 mhrznamn068

Also ran into this issue. It seems the module is unable to support multiple container definitions.

bion avatar Sep 14 '22 00:09 bion

Running into the same issue here as well.

paambaati avatar Apr 20 '23 06:04 paambaati

Workaround

download module in local and change containers variable type to any

variable "containers" { type = any description = "Container definitions to use for the task. If this is used, all other container options will be ignored." default = [] }

use local module

mhrznamn068 avatar Apr 20 '23 06:04 mhrznamn068

Updated as @mhrznamn068 suggested in version 1.0.32.

jnonino avatar Apr 20 '23 07:04 jnonino

See #56 - I was able to deploy Datadog Agent as sidecar using this method.

JaredDarling avatar Sep 21 '23 18:09 JaredDarling