serverless-step-functions icon indicating copy to clipboard operation
serverless-step-functions copied to clipboard

Allow !Sub/Fn::Sub in alarm topics

Open taschmidt opened this issue 4 years ago • 1 comments

This is a Feature Proposal

Description

For feature proposals:

  • I need to use an SNS topic ARN that's external to my stack (or any stack). In my current setup, I can build it up using !Sub like so: !Sub arn:aws:sns:${AWS::Region}:${AWS::AccountId}:foo-sns-topic

This would be valid in a CloudFormation template but I can't do it using this plugin. I know the docs say to use the serverless pseudo params plugin but I've been moving away from that since that plugin has been deprecated in favor of simply using CF intrinics.

If I try this here:

alarms:
  topics:
    alarm: !Sub ...

I get the following error:

ValidationError: child "topics" fails because [child "alarm" fails because ["alarm" must be a string, "Fn::Sub" is not allowed, "Fn::Sub" is not allowed, "Fn::Sub" is not allowed, "Fn::Sub" is not allowed]]

taschmidt avatar Apr 15 '21 18:04 taschmidt

+1

lucas-subli avatar Jan 08 '22 05:01 lucas-subli