MON-82: Add some variable to be able to surround text message
This commit is contained in:
parent
17b507fa2d
commit
5dc7a7518e
@ -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 = ""
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user