aws-cloudformation / cfn-lint

CloudFormation Linter
MIT No Attribution
2.43k stars 585 forks source link

AWS::Events::Rule should allow both ['EventPattern', 'ScheduleExpression'] and should not throw an E3014 #3687

Closed jpfreeley closed 6 days ago

jpfreeley commented 6 days ago

CloudFormation Lint Version

1.12.4

What operating system are you using?

ubnutu

Describe the bug

a resource definition for AWS::Events::Rule which contains both ['EventPattern', 'ScheduleExpression'] deploys just fine and without issue in AWS and therefore, an E3014 should not be thrown by cfn-lint.

This E3014 exception was introduced via https://github.com/aws-cloudformation/cfn-lint/blob/7b0ad9795df5f9a49a585b6c2368a476c286c217/src/cfnlint/data/schemas/patches/extensions/all/aws_events_rule/manual.json

Expected behavior

do not throw an E3014 if both ['EventPattern', 'ScheduleExpression'] are present in AWS::Events::Rule

Reproduction template

UpdateRule: Type: AWS::Events::Rule Properties: Description: 'Rule to trigger subscription filter manager lambda on SSM parameter update events' EventPattern: source: ["aws.ssm"] detail-type: ["Parameter Store Change"] detail: name:

jpfreeley commented 6 days ago

Thanks! That was speedy!