Open homanchou opened 4 years ago
Good question. There's a good chance you can't. Looks like CloudFormation doesn't allow it, so the only way to make patterns like this is by using the API directly.
A custom resource would be the way to go.
facing the same problem, can't use null value on the rule patterns
the same issue for me
If anyone would like to see support for this feature - I suggest reaching out to the CloudFormation coverage roadmap and creating an issue there if one doesn't exist yet. If CloudFormation were to implement this that would help us to create a better solution
I wish this feature were supported.
Crazy that it’s not
From: brianarpie-forme @.> Sent: Thursday, January 12, 2023 4:56 PM To: aws/aws-cdk @.> Cc: Thomas Finney @.>; Manual @.> Subject: Re: [aws/aws-cdk] aws-events: Support 'null' values for event matching (#8660)
I wish this feature were supported.
— Reply to this email directly, view it on GitHubhttps://github.com/aws/aws-cdk/issues/8660#issuecomment-1381084125, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFCQCL5C6OASFN4ESQQWWMTWSCD2JANCNFSM4ODBY77Q. You are receiving this because you are subscribed to this thread.Message ID: @.***>
I'm trying to use AWS CDK to create an eventbridge rule.
The custom event will have a detail payload where I only want to match on events where order_item_id is null.
Here is the rule in cdk:
And according to aws documentation, this is allowed:
https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html
However, when deploying with cdk I get this error:
And here is the cdk synth for the area around the rule:
Indeed it is null... which apparently isn't allowed in yaml template, but then how do I express this in CDK?
Reproduction Steps
create a rule that tries to match a null value for detail key
Error Log
Environment
**CLI Version :
Framework Version:
**Node.js Version:
Other
This is :bug: Bug Report