telia-oss / terraform-aws-ecs-fargate

Terraform module which creates Fargate ECS resources on AWS.
https://registry.terraform.io/modules/telia-oss/ecs-fargate/aws
MIT License
82 stars 75 forks source link

Less strict sidecar container definition type #82

Closed k1rd3rf closed 1 year ago

k1rd3rf commented 1 year ago

Getting error:

Error: Invalid value for input variable ... all list elements must have the same type. when the list of container definitions doesnt have exactly the same keys in the map.

An alternative is to declare the whole container definition type using object({ ... }), but its a bit tedious to maintain.

larstobi commented 1 year ago

Are you using this correctly? You should send in a list of definitions, and the list can contain any object whatsoever. If you are not sending in a list, then you could be wrongly sending in another object, but it needs to be a list of objects to work.

Can you show an example of this not working?

k1rd3rf commented 1 year ago

I have created a couple of commits in https://github.com/TeliaSoneraNorge/rapidshop-b2c-aws/pull/163/commits to show how it fails.