Skip to content

Allow !Sub/Fn::Sub in alarm topics #417

@taschmidt

Description

@taschmidt

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]]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions