Skip to content

Commit

Permalink
fix(grafana_terraform): fix backslashes
Browse files Browse the repository at this point in the history
  • Loading branch information
abolfazl8131 committed Dec 19, 2024
1 parent cb37f64 commit 1c2c7f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions app/media/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
grafana_connection = {
"url" = "http://localhost:8080",
"auth" = ""
}
}



# Grafana_Contact_Point Variables
create_contact_point = true
contact_point_name = "My Contact Point"
use_email = true
use_email = false
use_slack = true
email_contact_point = {
addresses = ["one@company.org", "two@company.org"]
message = "{ len .Alerts.Firing } firing."
subject = "{{ template "default.title" .}}"
subject = "{{ template \"default.title\" .}}"
single_email = true
disable_resolve_message = false
}
Expand Down
5 changes: 3 additions & 2 deletions app/template_generators/terraform/tfvars/grafana.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def grafana_tfvars(input):
}
"""
subject = "{{ template \"default.title\" .}}"
subject = "{{ template \\\"default.title\\\" .}}"
message_template_content = """<<EOT
{{ define "Alert Instance Template" }}
Firing: {{ .Labels.alertname }}
Expand All @@ -81,7 +81,8 @@ def grafana_tfvars(input):
# Grafana_Contact_Point Variables
create_contact_point = false
contact_point_name = "My Contact Point"
use_email = false
use_slack = false
email_contact_point = {{
addresses = ["one@company.org", "two@company.org"]
message = "{{ len .Alerts.Firing }} firing."
Expand Down

0 comments on commit 1c2c7f4

Please sign in to comment.