ACloudGuru / serverless-plugin-aws-alerts

A Serverless Framework plugin that creates CloudWatch alarms for functions.
MIT License
531 stars 149 forks source link

Added option to create dashboards only in specific stages #157

Closed Marcholio closed 3 years ago

Marcholio commented 3 years ago

What did you implement:

Implements #109

Allows creation of dashboards only in specific stages.

How did you implement it:

Added support for specifying dashboards option as follows:

dashboards:
  stages:
    - production
    - staging
  templates:
    - default
    - vertical

How can we verify it:

  1. Modify the example project with following config:
    dashboards:
      stages:
        - production
      templates:
        - default
  2. Install updated plugin version yarn add -D Marcholio/serverless-plugin-aws-alerts#master
  3. Run dry run deployment to staging stage. Verify that the stack file does not contain dashboard configuration and CLI outputs Info: Not deploying dashboards on stage staging
  4. Run dry run deployment to production stage. Verify that the stack file contains dashboard configuration.

Todos: