generated from cloudposse/terraform-example-module
-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
main.tf
51 lines (42 loc) · 1.04 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
provider "opsgenie" {
api_key = var.opsgenie_provider_api_key
}
module "alert_policy" {
source = "../../modules/alert_policy"
alert_policy = {
name = module.this.id
tags = ["test1", "test2"]
priority = "P1"
responders = [
{
id = module.team.team_id
type = "team"
}
]
filter = {
type = "match-all-conditions"
conditions = [
{
# Possible values are "message", "alias", "description", "source", "entity", "tags", "actions", "details", "extra-properties", "recipients", "teams", "priority"
field = "source"
operation = "matches"
expected_value = ".*prod.*"
},
{
field = "tags"
operation = "contains"
expected_value = "severity:critical"
}
]
}
}
context = module.this.context
}
module "team" {
source = "../../modules/team"
team = {
name = module.this.id
description = "team-description"
}
context = module.this.context
}