Skip to main content

notification_policy

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"
}]
}

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)
NameDefaultDescriptionRequired
notification_policy{}This variable is used to configure Opsgenie Notification Policy.Yes

Outputs

NameDescription
notification_policy_nameThe name of the Opsgenie Notification Policy.
notification_policy_idThe ID of the Opsgenie Notification Policy.