This message was deleted.
# general
s
This message was deleted.
w
Can you share the code snippet of how you pass
container_definition
?
h
Copy code
containerdeflist = [{
  "ipcMode": 'null',
  "executionRoleArn": "reacted",
  "containerDefinitions": [
    {
      "dnsSearchDomains": [],
      "logConfiguration": {
        "logDriver": "awslogs",
        "secretOptions": [],
        "options": {
          "awslogs-group": "redacted",
          "awslogs-region": "us-west-2",
          "awslogs-stream-prefix": "ecs"
        }
      },
      "entryPoint": [],
      "portMappings": [
        {
          "hostPort": 80,
          "protocol": "tcp",
          "containerPort": 80
        },
        {
          "hostPort": 443,
          "protocol": "tcp",
          "containerPort": 443
        },
        {
          "hostPort": 3000,
          "protocol": "tcp",
          "containerPort": 3000
        }
      ],
      "command": [],
This is just a snippet 
}]
Copy code
containerstring=createcdef(containerdeflist)
Copy code
task = aws.ecs.TaskDefinition(
    "test-task",
    container_definitions=[containerstring],

)
Copy code
def createcdef(containerdeflist):
    return json.dumps(containerdeflist)
Maybe I am doing this all wrong. Any help is appreciated.
I figured out the issue had to read up documentation again my containerdefinition was wrong this link was helpful
Copy code
<https://www.terraform.io/docs/providers/aws/r/ecs_task_definition.html>
Thanks for looking into this