MON-105 update tagging convention and add extra tags

This commit is contained in:
Quentin Manfroi 2018-09-18 15:20:20 +02:00
parent ee5a4cf236
commit ff338dad60
2 changed files with 14 additions and 2 deletions

View File

@ -55,6 +55,12 @@ variable "postgresql_connection_enabled" {
default = "true"
}
variable "postgresql_connection_extra_tags" {
description = "Extra tags for PostgreSQL connection connects monitor"
type = "list"
default = []
}
variable "postgresql_connection_message" {
description = "Custom message for PostgreSQL connection monitor"
type = "string"
@ -100,6 +106,12 @@ variable "postgresql_lock_enabled" {
default = "true"
}
variable "postgresql_lock_extra_tags" {
description = "Extra tags for PostgreSQL lock connects monitor"
type = "list"
default = []
}
variable "postgresql_lock_message" {
description = "Custom message for PostgreSQL lock monitor"
type = "string"

View File

@ -26,7 +26,7 @@ resource "datadog_monitor" "postgresql_connection_too_high" {
silenced = "${var.postgresql_connection_silenced}"
tags = ["env:${var.environment}", "resource:postgresql"]
tags = ["env:${var.environment}", "type:database", "provider:postgres", "resource:postgresql", "team:claranet", "created-by:terraform", "${var.postgresql_connection_extra_tags}"]
}
resource "datadog_monitor" "postgresql_too_many_locks" {
@ -57,5 +57,5 @@ resource "datadog_monitor" "postgresql_too_many_locks" {
silenced = "${var.posgresql_lock_silenced}"
tags = ["env:${var.environment}", "resource:postgresql"]
tags = ["env:${var.environment}", "type:database", "provider:postgres", "resource:postgresql", "team:claranet", "created-by:terraform", "${var.postgresql_lock_extra_tags}"]
}