Aws_ecs_task_definition

in the aws_ecs_task_definition resource there is the container_definitions parameter. is there a way to pass a json with variables, how the variables declaration and syntax of the json should be written?
thanks

Just pass it as an escaped string. Per the TF documentation here: https://www.terraform.io/docs/providers/aws/r/ecs_task_definition.html#container_definitions

I would probably use the built-in “file” to do anything larger: https://www.terraform.io/docs/configuration-0-11/interpolation.html#file-path

with the built it “file”, how do you use variables inside the json? it did not work for me.
I managed to overcome this with the “templatefile”