From 1c2c7f41fe1cccaa46751492b4cc90de9f6fb4b0 Mon Sep 17 00:00:00 2001 From: abolfazl1381 Date: Thu, 19 Dec 2024 16:45:16 +0330 Subject: [PATCH] fix(grafana_terraform): fix backslashes --- app/media/terraform.tfvars | 7 ++++--- app/template_generators/terraform/tfvars/grafana.py | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/media/terraform.tfvars b/app/media/terraform.tfvars index fe58a26..4e29150 100644 --- a/app/media/terraform.tfvars +++ b/app/media/terraform.tfvars @@ -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 } diff --git a/app/template_generators/terraform/tfvars/grafana.py b/app/template_generators/terraform/tfvars/grafana.py index fc0b7d6..dff6bc1 100644 --- a/app/template_generators/terraform/tfvars/grafana.py +++ b/app/template_generators/terraform/tfvars/grafana.py @@ -64,7 +64,7 @@ def grafana_tfvars(input): } """ - subject = "{{ template \"default.title\" .}}" + subject = "{{ template \\\"default.title\\\" .}}" message_template_content = """<