MON-79 Allow custom filtering on tags
This commit is contained in:
parent
a6a1fdbfdc
commit
14a79613b4
@ -31,11 +31,16 @@ variable "delay" {
|
|||||||
default = 600
|
default = 600
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "use_filter_tags" {
|
variable "filter_tags_default" {
|
||||||
description = "Filter the data with service tags if true"
|
description = "Use default filter tags convention"
|
||||||
default = "true"
|
default = "true"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "filter_tags_custom" {
|
||||||
|
description = "Tags used for custom filtering when filter_tags_default is false"
|
||||||
|
default = "*"
|
||||||
|
}
|
||||||
|
|
||||||
# Azure Storage specific
|
# Azure Storage specific
|
||||||
variable "availability_threshold_critical" {
|
variable "availability_threshold_critical" {
|
||||||
description = "Minimum acceptable percent of availability for a storage"
|
description = "Minimum acceptable percent of availability for a storage"
|
||||||
|
|||||||
@ -2,7 +2,7 @@ data "template_file" "filter" {
|
|||||||
template = "$${filter}"
|
template = "$${filter}"
|
||||||
|
|
||||||
vars {
|
vars {
|
||||||
filter = "${var.use_filter_tags == "true" ? format("dd_monitoring:enabled,dd_azure_storage:enabled,env:%s", var.environment) : "subscription_id:${var.subscription_id}"}"
|
filter = "${var.filter_tags_default == "true" ? format("dd_monitoring:enabled,dd_azure_storage:enabled,env:%s", var.environment) : "${var.filter_tags_custom}"}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user