MON-79 add subscription_id to filter on
This commit is contained in:
parent
4e0be10d97
commit
3cbd81df8a
@ -9,8 +9,8 @@ module "datadog-monitors-azure-storage" {
|
||||
source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//cloud/azure/storage?ref={revision}"
|
||||
|
||||
message = "${module.datadog-message-alerting.alerting-message}"
|
||||
|
||||
environment = "${var.environment}"
|
||||
subscription_id = "${var.subscription_id}"
|
||||
}
|
||||
```
|
||||
|
||||
@ -35,6 +35,7 @@ Inputs
|
||||
|------|-------------|:----:|:-----:|:-----:|
|
||||
| delay | Delay in seconds for the metric evaluation | string | `600` | no |
|
||||
| environment | Architecture environment | string | - | yes |
|
||||
| subscription_id | Azure account id used as filter for monitors | string | - | yes |
|
||||
| message | Message sent when a monitor is triggered | string | - | yes |
|
||||
| use_filter_tags | Filter the data with service tags if true | string | `true` | no |
|
||||
| availability_threshold_critical | Minimum threshold of availability | string | `90` | no |
|
||||
|
||||
@ -4,6 +4,11 @@ variable "environment" {
|
||||
type = "string"
|
||||
}
|
||||
|
||||
variable "subscription_id" {
|
||||
description = "Azure account id used as filter for monitors"
|
||||
type = "string"
|
||||
}
|
||||
|
||||
variable "provider" {
|
||||
description = "Cloud provider which the monitor and its based metric depend on"
|
||||
type = "string"
|
||||
|
||||
@ -2,7 +2,7 @@ data "template_file" "filter" {
|
||||
template = "$${filter}"
|
||||
|
||||
vars {
|
||||
filter = "${var.use_filter_tags == "true" ? format("dd_monitoring:enabled,dd_azure_storage:enabled,env:%s", var.environment) : "*"}"
|
||||
filter = "${var.use_filter_tags == "true" ? format("dd_monitoring:enabled,dd_azure_storage:enabled,env:%s", var.environment) : "subscription_id:${var.subscription_id}"}"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user