-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Container logging validation #1787
Labels
Comments
Could you share the failing/working template snippet as well? |
The resource itself - failing: "TaskDefinition": {
"Type": "AWS::ECS::TaskDefinition",
"Properties": {
"NetworkMode": "awsvpc",
"ExecutionRoleArn": {
"Fn::GetAtt": ["ExecutionRole", "Arn"]
},
"ContainerDefinitions": [
{
"Essential": true,
"Image": {
"Fn::Join": [
"",
[
{ "Ref": "AWS::AccountId" },
".dkr.ecr.",
{ "Ref": "AWS::Region" },
".amazonaws.com/",
{ "Ref": "ApplicationName" }
]
]
},
"Name": { "Ref": "ApplicationName" },
"PortMappings": [
{
"ContainerPort": 4433,
"Protocol": "tcp"
}
],
"LogConfiguration": {
"LogDriver": "awslogs",
"Options": {
}
}
]
}
}
} Working: "TaskDefinition": {
"Type": "AWS::ECS::TaskDefinition",
"Properties": {
"NetworkMode": "awsvpc",
"ExecutionRoleArn": {
"Fn::GetAtt": [ "ExecutionRole", "Arn" ]
},
"ContainerDefinitions": [
{
"Essential": true,
"Image": {
"Fn::Join": [
"",
[
{ "Ref": "AWS::AccountId" },
".dkr.ecr.",
{ "Ref": "AWS::Region" },
".amazonaws.com/",
{ "Ref": "ApplicationName" }
]
]
},
"Name": { "Ref": "ApplicationName" },
"PortMappings": [
{
"ContainerPort": 4433,
"Protocol": "tcp"
}
],
"LogConfiguration": {
"LogDriver": "awslogs",
"Options": {
"awslogs-group": "something",
"awslogs-region": {
"Ref": "AWS::Region"
}
}
}
]
}
}
} |
Added a rule for v1 that will validate the log configuration when using aws logs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cfn-lint version: 0.41.0
Description of issue.
Lint request: validate container logging configuration.
I got an error when deploying:
It looks like this would have to be implemented as a specific check since it doesn't exist in the spec.
The text was updated successfully, but these errors were encountered: