cerner / splunk-pickaxe

A tool for syncing a repo of splunk objects with a splunk instance
Apache License 2.0
16 stars 15 forks source link

Allow email to be configured per environment #5

Closed ikottman closed 6 years ago

ikottman commented 6 years ago

Alerts and reports right now share the same email in all environments. It would be useful to be able to flex what email to send to per environment.

Example pickaxe.yml for a backwards compatible approach:

namespace:
  app: app_name_here
environments:
  dev: https://devurl.com
  production: https://produrl.com
environment_emails:
  dev: 
    - dev_support@foo.com
  production: 
    - production_support@foo.com

Either emails or environment_emails can be specified. Not both.

cleaner, but not backwards compatible approach:

namespace:
  app: app_name_here
environments:
  dev: 
    url: https://devurl.com
    email: dev_support@foo.com
  production:
    url: https://produrl.com
    email: production_support@foo.com

Using a hash also allows for additional configuration per environment in the future.

bbaugher commented 6 years ago

I like what you have for your new config. I think we could support the old configuration and your new suggested approach by inspecting the value for each environment. We could deprecated the old approach and eventually remove it.

bbaugher commented 6 years ago

This was completed by #7

bbaugher commented 6 years ago

This was released in 2.3.0