Open josb opened 1 year ago
This is useful, but I don't like the name. When I saw the issue title, I thought it might be a way to have a condition that invalidates the template (which is an interesting idea!). I'd go for Fn::Remove
or something like that.
I think I'd prefer something like
Fn::Filter:
- !Ref BucketARNs
- $Item != NONE
Honestly I am not picky about the name/syntax, I picked Reject
for symmetry with Select
and because in Ruby there are reject
and select
methods that are complimentary. Filter
would be fine, too, and access to the Item
looks like a useful enhancement.
Community Note
Tell us about your request
Fn::Reject
intrinsic function.Tell us about the problem you are trying to solve. What are you trying to do, and why is it hard?
Right now one has to use
Fn::Transform
to e.g. remove a part of aCommanDelimitedList
parameter.Today's use case was a parameter named
BucketARNs
with the contentsTo be able to pass this to
!Ref
, theNONE
needed to be removed.Are you currently working around this issue?
By using a Ruby
Fn::Transform
macro.What is the expect behavior with this new feature
Code:
Returns:
Additional context
None.
Attachments
None.