Skip to content

Latest commit

 

History

History

notification_policy

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Notification Policy

Terraform module to configure Opsgenie Notification Policy

Usage

Create Opsgenie Notification Policy example

module "notification_policy" {
  source  = "cloudposse/incident-management/opsgenie//modules/notification_policy"
  # Cloud Posse recommends pinning every module to a specific version
  # version     = "x.x.x"

  notification_policy = {
    name    = module.label.id
    team_id = module.team.team_id

    filter = {
      type = "match-all-conditions"
      conditions = [{
        field          = "tags"
        operation      = "contains"
        expected_value = "recommendation:auto-close"
      }]
    }

    de_duplication_action  = {
      de_duplication_action_type = "frequency-based"
      count = 2
      duration = {
        time_unit = "minutes"
        time_amount = 5
      }
    }

    delay_action = {
      delay_option = "for-duration"
      duration = {
        time_unit = "minutes"
        time_amount = 10
      }
    }

    auto_close_action = {
      time_unit   = "minutes"
      time_amount = 5
    }
  }
}

Inputs

Note: notification_policy is a map for two reasons:

  • to be able to put whole configuration in yaml file
  • variables defined with type set are not robust enough (can't set default values)
Name Default Description Required
notification_policy {} This variable is used to configure Opsgenie Notification Policy. Yes

Outputs

Name Description
notification_policy_name The name of the Opsgenie Notification Policy.
notification_policy_id The ID of the Opsgenie Notification Policy.