serverless-aws-alias icon indicating copy to clipboard operation
serverless-aws-alias copied to clipboard

[/Resources/TOPIC_NAME/DependsOn/0] 'null' values are not allowed in templates

Open lkolchin opened this issue 4 years ago • 0 comments

Here is what I've got in the serverless.yaml

      # Dist list subscription for prod alerts
      AlertTopicSubscription:
        Type: AWS::SNS::Subscription
        Condition: CreateResourcesProdStage
        Properties:
          Endpoint: ${self:custom.alarms_emails.prod_dist_list1}
          Protocol: email
          TopicArn: ${self:provider.AlertTopic}

Getting an error during deployment even if condition is false:

Serverless Error ---------------------------------------

[/Resources/AlertTopicSubscription/DependsOn/0] 'null' values are not allowed in templates

Because - Plugin generated this Erroneous resource in compiled-cloudformation-template-alias.json:

  AlertTopicSubscription:
    Type: AWS::SNS::Subscription
    Condition: CreateResourcesProdStage
    Properties:
      Endpoint: {}
      Protocol: email
      TopicArn: arn:aws:sns:ap-southeast-2:2222222222:market-base-infra-topics-sandbox-alerts
    DependsOn:
      - null
      - null

Bug to fix?

lkolchin avatar Oct 11 '19 01:10 lkolchin