Skip to main content

alert_policy

Alert Policy

Terraform module to configure Opsgenie Alert Policy

Usage

Create Opsgenie Alert Policy example

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

alert_policy = {
name = "alert-policy"

tags = ["test1", "test2"]
priority = "P1"

filter = {
type = "match-all-conditions"
conditions = [
{
field = "source"
operation = "matches"
expected_value = ".*prod.*"
},
{
field = "tags"
operation = "contains"
expected_value = "severity:critical"
}
]
}
}
}

Inputs

Note: alert_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
alert_policy{}This variable is used to configure Opsgenie Alert Policy.Yes

Outputs

NameDescription
alert_policy_idThe ID of the Opsgenie Alert Policy.
alert_policy_nameName of the Opsgenie Alert Policy.
alert_policy_filterFilters of the Opsgenie Alert Policy.
alert_policy_tagsTags of the Opsgenie Alert Policy.
alert_policy_priorityPriority of the Opsgenie Alert Policy.
alert_policy_respondersResponders of the Opsgenie Alert Policy.