-
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
Rule E3042 - Check at least one essential container is specified #1548
Rule E3042 - Check at least one essential container is specified #1548
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1548 +/- ##
==========================================
+ Coverage 87.60% 87.61% +0.01%
==========================================
Files 160 161 +1
Lines 8873 8898 +25
Branches 2124 2129 +5
==========================================
+ Hits 7773 7796 +23
- Misses 660 661 +1
- Partials 440 441 +1
Continue to review full report at Codecov.
|
@kddejong is there a better way to test rules that won't run afoul of Codecov? It seems the majority of rules employ the same method for testing, but it doesn't give good coverage. |
src/cfnlint/rules/resources/ecs/TaskDefinitionEssentialContainer.py
Outdated
Show resolved
Hide resolved
template syntax edge cases are handled well because they evaluate to true 👍 Parameters:
Parameter:
Type: String
Resources:
TaskDefinition:
Type: AWS::ECS::TaskDefinition
Properties:
ContainerDefinitions:
- Image: Image
Name: Name
Memory: 100
Essential: !Ref Parameter |
src/cfnlint/rules/resources/ecs/TaskDefinitionEssentialContainer.py
Outdated
Show resolved
Hide resolved
@Tro95 thanks for the new rule, documentation will be automatically generated right before the next release! |
Issue #, if available: #1547
Description of changes: Adds a new rule, E3042, that checks
AWS::ECS::TaskDefinition.ContainerDefinition
specifies at least one essential container. Not specifying an essential container (or having a container defaulting to essential) will cause a deployment failure. Reference: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinitions.html#cfn-ecs-taskdefinition-containerdefinition-essential.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.