无法为terraform中的ECS容器配置AWS CloudWatch日志
我无法在terraform中为ECS容器配置AWS CloudWatch日志。我得到:无法为terraform中的ECS容器配置AWS CloudWatch日志,terraform,terraform-provider-aws,Terraform,Terraform Provider Aws,我无法在terraform中为ECS容器配置AWS CloudWatch日志。我得到: CannotStartContainerError: Error response from daemon: failed to initialize logging driver: failed to create Cloudwatch log stream: RequestError: send request failed caused by: Post https://logs.ue-west-1.a
CannotStartContainerError: Error response from daemon: failed to initialize logging driver: failed to create Cloudwatch log stream: RequestError: send request failed caused by: Post https://logs.ue-west-1.amazonaws.com/: dial tcp: lookup logs.ue-west-1.am
我的容器定义:
[{
"essential": false,
"memory": 500,
"name": "client",
"cpu": 500,
"image": "some_image",
"portMappings": [
{
"containerPort": 3000,
"hostPort": 3000
}
],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "example-production-client",
"awslogs-stream-prefix": "example-production-client",
"awslogs-region": "ue-west-1"
}
}
}]
我的地形定义如下:
resource "aws_cloudwatch_log_group" "example-production-client" {
name = "example-production-client"
tags = {
Environment = "production"
}
}
resource "aws_cloudwatch_log_stream" "example-production-client" {
name = "example-production-client"
log_group_name = aws_cloudwatch_log_group.example-production-client.name
}
我错过了什么?您是否经历过同样的情况?似乎您键入了错误的区域,请将该区域更改为“us-west-1”或“eu-west-1”-
"awslogs-region": "eu-west-1"