diff --git a/README.adoc b/README.adoc index dfcb4226..5af92d47 100644 --- a/README.adoc +++ b/README.adoc @@ -40,14 +40,14 @@ The following providers are used by this module: - [[provider_random]] <> (>= 3) +- [[provider_null]] <> (>= 3) + - [[provider_kubernetes]] <> (>= 2) - [[provider_utils]] <> (>= 1) - [[provider_argocd]] <> (>= 5) -- [[provider_null]] <> (>= 3) - === Resources The following resources are used by this module: @@ -358,10 +358,10 @@ Description: The admin password for Grafana. [cols="a,a",options="header,autowidth"] |=== |Name |Version +|[[provider_random]] <> |>= 3 |[[provider_null]] <> |>= 3 |[[provider_argocd]] <> |>= 5 |[[provider_kubernetes]] <> |>= 2 -|[[provider_random]] <> |>= 3 |[[provider_utils]] <> |>= 1 |=== diff --git a/locals.tf b/locals.tf index 2548f114..4d69ed52 100644 --- a/locals.tf +++ b/locals.tf @@ -94,24 +94,27 @@ locals { alertmanager_template_files = length(local.alertmanager.slack_routes) > 0 ? { "slack.tmpl" = <<-EOT - {{ define "slack.title" -}} - [{{ .Status | toUpper }} - {{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{- end -}} - ] {{ .CommonLabels.alertname }} - {{ end }} - {{ define "slack.text" -}} - {{ range .Alerts }} - *Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}` - {{- if .Annotations.description }} - *Severity:* `{{ .Labels.severity }}` - *Description:* {{ .Annotations.description }} - {{- end }} - *Graph:* <{{ .GeneratorURL }}|:chart_with_upwards_trend:> - *Labels:* - {{ range .Labels.SortedPairs }} - *{{ .Name }}:* `{{ .Value }}` - {{ end }} - {{ end }} - {{ end }} + {{ define "slack.title" -}} + [{{ .Status | toUpper }} + {{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{- end -}} + ] {{ .CommonLabels.alertname }} + {{ end }} + {{ define "slack.text" -}} + {{ range .Alerts }} + *Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}` + {{- if .Annotations.description }} + *Severity:* `{{ .Labels.severity }}` + *Description:* {{ .Annotations.description }} + {{- end }} + *Graph:* <{{ .GeneratorURL }}|:chart_with_upwards_trend:> + *Labels:* + {{ range .Labels.SortedPairs }} - *{{ .Name }}:* `{{ .Value }}` + {{ end }} + {{- if .Annotations.runbook_url }} + *Runbook URL:* <{{ .Annotations.runbook_url }}|Click here> + {{- end }} + {{ end }} + {{ end }} EOT } : {}