Cloudformation only supports Equals / And / Or / Not as intrisics for Conditions
However there are additional intrinsic functions representing Conditions supported in the Rules section, such as Contains, EachMemberIn, and EachMemberEquals.
Notably, the CDK documentation represents these the same, ie there is no indication of a distinction between conditionAnd vs conditionContains; but if you attempt to use a Contains condition in the Conditions block, you will get an error at changeset creation.
I have a use case where I want to condition resource creation on the presence of a string in a SSM StringList Parameter evaluated at deploy-time. I am currently unable to do this.
My only workaround is leveraging a transform/macro which evaluates and replaces these conditions at macro-time.
Name of the resource
Other
Resource name
Fn::Condition intrinsic function
Description
Cloudformation only supports Equals / And / Or / Not as intrisics for Conditions
However there are additional intrinsic functions representing Conditions supported in the Rules section, such as
Contains
,EachMemberIn
, andEachMemberEquals
.Notably, the CDK documentation represents these the same, ie there is no indication of a distinction between
conditionAnd
vsconditionContains
; but if you attempt to use aContains
condition in the Conditions block, you will get an error at changeset creation.I have a use case where I want to condition resource creation on the presence of a string in a SSM StringList Parameter evaluated at deploy-time. I am currently unable to do this.
My only workaround is leveraging a transform/macro which evaluates and replaces these conditions at macro-time.
Other Details
No response