MON-82: Add some variable to be able to surround text message

This commit is contained in:
Jérôme Respaut 2017-11-06 10:20:10 +01:00
parent 17b507fa2d
commit 5dc7a7518e
2 changed files with 12 additions and 0 deletions

View File

@ -5,3 +5,13 @@ variable "oncall_24x7" {
variable "oncall_office_hours" {
type = "string"
}
variable "prepend_text" {
type = "string"
default = ""
}
variable "append_text" {
type = "string"
default = ""
}

View File

@ -1,9 +1,11 @@
data "template_file" "alerting-message" {
template = <<EOF
$${prepend_text}
{{#is_alert}}$${oncall_24x7}{{/is_alert}}
{{#is_recovery}}$${oncall_24x7}{{/is_recovery}}
{{#is_warning}}$${oncall_office_hours}{{/is_warning}}
{{#is_warning_recovery}}$${oncall_office_hours}{{/is_warning_recovery}}
$${append_text}
EOF
vars {