我有一个我AWS ECS Task definition
喜欢的 json 文件:
[
{
"name": "my-name",
"image": "url",
"cpu": 2,
"dnsSearchDomains": null,
"network_configuration":"awsvpc",
"entryPoint": null,
"portMappings": [
{
"hostPort": 8080,
"protocol": "tcp",
"containerPort": 8080
}
],
"command": null,
"linuxParameters": null,
"environment": [],
"resourceRequirements": null,
"ulimits": null,
"dnsServers": null,
"mountPoints": [
{
"readOnly": null,
"containerPath": "/fldr",
"sourceVolume": "fldr"
}
],
"workingDirectory": null,
"secrets": null,
"dockerSecurityOptions": null,
"memoryReservation": 128,
"volumesFrom": [],
"stopTimeout": null,
"startTimeout": null,
"firelensConfiguration": null,
"dependsOn": null,
"disableNetworking": null,
"interactive": null,
"healthCheck": null,
"essential": true,
"links": null,
"hostname": null,
"extraHosts": null,
"pseudoTerminal": null,
"user": null,
"readonlyRootFilesystem": null,
"dockerLabels": null,
"systemControls": null,
"privileged": null,
"logConfiguration": {
"logDriver": "awslogs",
"awslogs-region": "eu-west-1",
"awslogs-group": "my-cw-group"
}
}
]
尽管有awslogs-region
这样的定义awslogs-group
:
"logConfiguration": {
"logDriver": "awslogs",
"awslogs-region": "eu-west-1",
"awslogs-group": "my-cw-group"
}
当我运行terraform apply
它返回:
Error: ClientException: Log driver awslogs requires options: awslogs-region, awslogs-group
我在 StackOverflow 和 Github 都找不到相关问题。