@@ -6,8 +6,7 @@ def grafana_tfvars(input):
66 "url" = "http://localhost:8080",
77 "auth" = ""
88 }"""
9- slack_contact_point = """
10- {
9+ slack_contact_point = """{
1110 url = "https://hooks.slack.com/<YOUR_SLACK_WEBHOOK_URL>"
1211 text = <<EOT
1312 {{ len .Alerts.Firing }} alerts are firing
@@ -21,8 +20,7 @@ def grafana_tfvars(input):
2120
2221 """
2322
24- mute_timing = """
25- {
23+ mute_timing = """{
2624 name = "My Mute Timing"
2725 start = "04:56"
2826 end = "04:57"
@@ -34,8 +32,7 @@ def grafana_tfvars(input):
3432
3533 """
3634
37- notification_policy_config = """
38- {
35+ notification_policy_config = """{
3936 group_by = ["..."]
4037 group_wait = "45s"
4138 group_interval = "6m"
@@ -44,9 +41,7 @@ def grafana_tfvars(input):
4441
4542 """
4643
47- policies = """
48- {
49- matchers = [
44+ policies = """{matchers = [
5045 { label = "mylabel", match = "=", value = "myvalue" },
5146 { label = "alertname", match = "=", value = "CPU Usage" },
5247 { label = "Name", match = "=~", value = "host.*|host-b.*" }
@@ -64,9 +59,10 @@ def grafana_tfvars(input):
6459 continue = false
6560 mute_timings = ["mute_timing_2"]
6661 group_by = ["group2_sub"]
67- }
62+ }
6863
6964 """
65+ subject = "{{ template \" default.title\" .}}"
7066
7167 if input .create_contact_point is None :
7268 tfvars_file = f'''
0 commit comments