cloudformation-coverage-roadmap icon indicating copy to clipboard operation
cloudformation-coverage-roadmap copied to clipboard

Fn::Contains should be a supported Condition (as well as Fn::EachMemberIn, Fn::EachMemberEquals)

Open rigsbyt opened this issue 2 years ago • 0 comments

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, 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.

Other Details

No response

rigsbyt avatar Mar 19 '24 17:03 rigsbyt