I have the following config for ECS using terraform and apex.
resource "aws_ecs_task_definition" "task" {
...
container_definitions = <<DEFINITION
[
{
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "${aws_cloudwatch_log_group.test_log_group.arn}",
"awslogs-region": "${var.region}",
"awslogs-stream-prefix": "/ecs"
}
}
}
]
DEFINITION
}
And the cloudwatch resource configuration:
resource "aws_cloudwatch_log_group" "test_log_group" {
name = "test_log_group"
retention_in_days = 30
}
When running apex infra apply
, I get the following error! Tried with different character sets, with and without special characters, etc. Nothing worked. Hope some one can help me out:
ClientException: Log driver awslogs option 'awslogs-group' contains invalid characters.