could someone help me understand the new `cdk` pro...
# help
s
could someone help me understand the new
cdk
property in 1.0? like when defining a new EventBus, there’s
rules.myRule.pattern
and
rules.myRule.cdk.rule.eventPattern
. why are there two ways to define a pattern?
f
rules.myRule.pattern
is the preferred way.
It was a typo in the doc. Fixed.
That said,
rules.myRule.cdk.rule.eventPattern
will also work if
rules.myRule.pattern
is not passed in.
The design decision was such that, SST will “lift” commonly used props out of the
cdk
field for convenience. But you can always dive into the
cdk
field to turn every single knob.
s
Gotcha. Thanks Frank, makes sense!