Closed
Description
module "task_definition" {
source = "mongodb/ecs-task-definition/aws"
version = "2.1.0"
# other params
volumesFrom = ["{\"sourceContainer\"= \"${var.project_name}-${var.services[1]}-container\"}"]
}
This is giving error as below :
Error: ECS Task Definition container_definitions is invalid: Error decoding JSON: json: cannot unmarshal string into Go struct field ContainerDefinition.VolumesFrom of type ecs.VolumeFrom
on .terraform/modules/wa_web_task_definition/main.tf line 132, in resource "aws_ecs_task_definition" "ecs_task_definition":
132: container_definitions = local.container_definitions
terraform version
Terraform v0.13.3
+ provider registry.terraform.io/hashicorp/aws v3.8.0
+ provider registry.terraform.io/hashicorp/null v2.1.2
+ provider registry.terraform.io/hashicorp/random v2.3.0
+ provider registry.terraform.io/hashicorp/template v2.1.2
Any idea on what's the correct way of using volumesFrom ? I could not find it any of your examples or docs.