Skip to content

SNS notifier swallows errors related to missing templates used in the config #3528

@emanlodovice

Description

@emanlodovice

What did you do?
When the sns configuration has attributes referencing templates that does not exist Notify will fail but the error says that its because the topic_arn is blank.

Error message:

Invalid parameter: TopicArn Reason: An ARN must have at least 6 elements, not 1

What did you expect to see?
When the sns configuration has attributes referencing templates that does not exist the error should tell me that Notify failed because of this missing template, not something about the topic_arn.

  • Alertmanager configuration file:
    - name: 'test'
      sns_configs:
        - topic_arn: "arn:aws:sns:us-west-2:123456:TestTopic"
          send_resolved: false
          sigv4:
            region: "us-west-2"
          attributes:
            tags: '{{ template "__unknown_template" .Alerts.Firing }}'

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