MON-80 Now support use_filter_tags
This commit is contained in:
parent
c1563c3318
commit
9186c69150
@ -8,6 +8,11 @@ variable "client_name" {
|
||||
type = "string"
|
||||
}
|
||||
|
||||
variable "use_filter_tags" {
|
||||
description = "Filter the data with service tags if true"
|
||||
default = "true"
|
||||
}
|
||||
|
||||
variable "subscription_id" {
|
||||
description = "Subscription ID used to tag monitors"
|
||||
type = "string"
|
||||
|
||||
@ -1,3 +1,11 @@
|
||||
data "template_file" "filter" {
|
||||
template = "$${filter}"
|
||||
|
||||
vars {
|
||||
filter = "${var.use_filter_tags == "true" ? format("dd_monitoring:enabled,dd_azure_appservices:enabled,subscription_id:%s,env:%s", var.subscription_id,var.environment) : var.subscription_id}"
|
||||
}
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "too_many_jobs_failed" {
|
||||
name = "[${var.environment}] IOT Hub Too many jobs failed on {{name}}"
|
||||
message = "${var.message}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user