-
Notifications
You must be signed in to change notification settings - Fork 597
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
v1.10.0: Possible false-positive for E3054: 'RequiresCompatibilities' is a required property
#3592
Comments
This rule crosses into the ECSService:
Type: AWS::ECS::Service
Properties:
LaunchType: FARGATE as part of this comment and replicated through some testing. |
Here you go: ECSCluster:
Type: AWS::ECS::Cluster
Properties:
ClusterSettings:
- Name: containerInsights
Value: enabled
CapacityProviders:
- FARGATE
ECSService:
Type: AWS::ECS::Service
Properties:
Cluster: !Ref ECSCluster
TaskDefinition: !GetAtt ECSTaskDefinition.TaskDefinitionArn
DesiredCount: 1
LaunchType: FARGATE
PropagateTags: SERVICE
NetworkConfiguration:
AwsvpcConfiguration:
SecurityGroups:
- !GetAtt SecurityGroup.GroupId
Subnets:
- <Subnet>
EnableExecuteCommand: true
ECSTaskDefinition:
Type: AWS::ECS::TaskDefinition
Properties:
NetworkMode: awsvpc
TaskRoleArn: !GetAtt TaskRole.Arn
ExecutionRoleArn: !GetAtt ExecutionRole.Arn
Cpu: 512
Memory: 1024
RuntimePlatform:
CpuArchitecture: ARM64
ContainerDefinitions:
- Name: ContainerName
Image: <IMAGE>
LogConfiguration:
LogDriver: awslogs
Options:
awslogs-region: !Ref AWS::Region
awslogs-group: !Ref LogGroup
awslogs-stream-prefix: !Ref AWS::StackName |
According to https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html#cfn-ecs-taskdefinition-requirescompatibilities, you do not need
|
Looks like This will succeed without
When removing NetworkMode you will get the error |
This caveat only seems to apply to |
This PR will remove this error when NetworkMode is |
Thank you! |
CloudFormation Lint Version
1.10.0
What operating system are you using?
Windows 11
Describe the bug
After updating to
1.10.0
i get the following error forAWS::ECS::TaskDefinition
:Expected behavior
cfn-lint doesn't give that error, since i can deploy the stack.
Reproduction template
The text was updated successfully, but these errors were encountered: