Closed nitrocode closed 3 years ago
/test all
When applying this change:
- container_definitions = "[${module.container_definition.json_map_encoded},${module.datadog_container_definition.json_map_encoded}]"
+ container_definitions = jsonencode([module.container_definition.json_map_encoded, module.datadog_container_definition.json_map_encoded])
I get the error:
Error: ECS Task Definition container_definitions is invalid: Error decoding JSON: json: cannot unmarshal string into Go value of type ecs.ContainerDefinition
on ../../modules/fargate_container/main.tf line 130, in resource "aws_ecs_task_definition" "this":
130: container_definitions = jsonencode([module.container_definition.json_map_encoded, module.datadog_container_definition.json_map_encoded])
If you apply the example terraform module, do you get the same error?
If you apply the example terraform module, do you get the same error?
I only tried in my own setup running terraform v0.13.6
Can you create a new issue with a minimum viable reproducible example ?
@DavidGamba I'm getting the same error. Were you able to find a fix?
I just kept the line as it was before, this only affects the tests and the documentation, if you keep using it the old way you won't have any issues.
container_definitions = "[${module.container_definition.json_map_encoded},${module.datadog_container_definition.json_map_encoded}]"
This pull request is now in conflict. Could you fix it @nitrocode? 🙏
Equivalent done via https://github.com/cloudposse/terraform-aws-ecs-container-definition/pull/139
Fix thanks to https://github.com/cloudposse/terraform-aws-ecs-container-definition/pull/131#issuecomment-817907504