From f96b1d89dda20572fda59f18d23f5b20e197f699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Respaut?= Date: Fri, 19 Jul 2019 11:02:36 +0200 Subject: [PATCH] AZ-97: Backport and bump to HCL2/tf0.12 --- cloud/azure/storage/inputs.tf | 123 +- cloud/azure/storage/modules.tf | 65 +- cloud/azure/storage/monitors-azure-storage.tf | 1331 +++++++++-------- cloud/azure/storage/outputs.tf | 75 +- cloud/azure/storage/versions.tf | 4 + 5 files changed, 819 insertions(+), 779 deletions(-) create mode 100644 cloud/azure/storage/versions.tf diff --git a/cloud/azure/storage/inputs.tf b/cloud/azure/storage/inputs.tf index 035e87f..f8a1acc 100644 --- a/cloud/azure/storage/inputs.tf +++ b/cloud/azure/storage/inputs.tf @@ -1,7 +1,7 @@ # Global Terraform variable "environment" { description = "Architecture environment" - type = "string" + type = string } # Global DataDog @@ -42,37 +42,37 @@ variable "filter_tags_custom_excluded" { # Azure Storage specific variables variable "availability_silenced" { description = "Groups to mute for Storage availability monitor" - type = "map" + type = map(string) default = {} } variable "availability_enabled" { description = "Flag to enable Storage availability monitor" - type = "string" + type = string default = "true" } variable "availability_extra_tags" { description = "Extra tags for Storage availability monitor" - type = "list" + type = list(string) default = [] } variable "availability_message" { description = "Custom message for Storage availability monitor" - type = "string" + type = string default = "" } variable "availability_time_aggregator" { description = "Monitor aggregator for Storage availability [available values: min, max or avg]" - type = "string" + type = string default = "max" } variable "availability_timeframe" { description = "Monitor timeframe for Storage availability [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" - type = "string" + type = string default = "last_5m" } @@ -88,37 +88,37 @@ variable "availability_threshold_warning" { variable "successful_requests_silenced" { description = "Groups to mute for Storage sucessful requests monitor" - type = "map" + type = map(string) default = {} } variable "successful_requests_enabled" { description = "Flag to enable Storage sucessful requests monitor" - type = "string" + type = string default = "true" } variable "successful_requests_extra_tags" { description = "Extra tags for Storage sucessful requests monitor" - type = "list" + type = list(string) default = [] } variable "successful_requests_message" { description = "Custom message for Storage sucessful requests monitor" - type = "string" + type = string default = "" } variable "successful_requests_time_aggregator" { description = "Monitor aggregator for Storage sucessful requests [available values: min, max or avg]" - type = "string" + type = string default = "max" } variable "successful_requests_timeframe" { description = "Monitor timeframe for Storage sucessful requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" - type = "string" + type = string default = "last_5m" } @@ -134,37 +134,37 @@ variable "successful_storage_requests_threshold_warning" { variable "latency_silenced" { description = "Groups to mute for Storage latency monitor" - type = "map" + type = map(string) default = {} } variable "latency_enabled" { description = "Flag to enable Storage latency monitor" - type = "string" + type = string default = "true" } variable "latency_extra_tags" { description = "Extra tags for Storage latency monitor" - type = "list" + type = list(string) default = [] } variable "latency_message" { description = "Custom message for Storage latency monitor" - type = "string" + type = string default = "" } variable "latency_time_aggregator" { description = "Monitor aggregator for Storage latency [available values: min, max or avg]" - type = "string" + type = string default = "min" } variable "latency_timeframe" { description = "Monitor timeframe for Storage latency [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" - type = "string" + type = string default = "last_5m" } @@ -180,37 +180,37 @@ variable "latency_threshold_warning" { variable "timeout_error_requests_silenced" { description = "Groups to mute for Storage timeout monitor" - type = "map" + type = map(string) default = {} } variable "timeout_error_requests_enabled" { description = "Flag to enable Storage timeout monitor" - type = "string" + type = string default = "true" } variable "timeout_error_requests_extra_tags" { description = "Extra tags for Storage timeout monitor" - type = "list" + type = list(string) default = [] } variable "timeout_error_requests_message" { description = "Custom message for Storage timeout monitor" - type = "string" + type = string default = "" } variable "timeout_error_requests_time_aggregator" { description = "Monitor aggregator for Storage timeout [available values: min, max or avg]" - type = "string" + type = string default = "min" } variable "timeout_error_requests_timeframe" { description = "Monitor timeframe for Storage timeout [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" - type = "string" + type = string default = "last_5m" } @@ -226,37 +226,37 @@ variable "timeout_error_requests_threshold_warning" { variable "network_error_requests_silenced" { description = "Groups to mute for Storage network errors monitor" - type = "map" + type = map(string) default = {} } variable "network_error_requests_enabled" { description = "Flag to enable Storage network errors monitor" - type = "string" + type = string default = "true" } variable "network_error_requests_extra_tags" { description = "Extra tags for Storage network errors monitor" - type = "list" + type = list(string) default = [] } variable "network_error_requests_message" { description = "Custom message for Storage network errors monitor" - type = "string" + type = string default = "" } variable "network_error_requests_time_aggregator" { description = "Monitor aggregator for Storage network errors [available values: min, max or avg]" - type = "string" + type = string default = "min" } variable "network_error_requests_timeframe" { description = "Monitor timeframe for Storage network errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" - type = "string" + type = string default = "last_5m" } @@ -272,37 +272,37 @@ variable "network_error_requests_threshold_warning" { variable "throttling_error_requests_silenced" { description = "Groups to mute for Storage throttling error monitor" - type = "map" + type = map(string) default = {} } variable "throttling_error_requests_enabled" { description = "Flag to enable Storage throttling error monitor" - type = "string" + type = string default = "true" } variable "throttling_error_requests_extra_tags" { description = "Extra tags for Storage throttling error monitor" - type = "list" + type = list(string) default = [] } variable "throttling_error_requests_message" { description = "Custom message for Storage throttling error monitor" - type = "string" + type = string default = "" } variable "throttling_error_requests_time_aggregator" { description = "Monitor aggregator for Storage throttling errors [available values: min, max or avg]" - type = "string" + type = string default = "min" } variable "throttling_error_requests_timeframe" { description = "Monitor timeframe for Storage throttling errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" - type = "string" + type = string default = "last_5m" } @@ -318,37 +318,37 @@ variable "throttling_error_requests_threshold_warning" { variable "server_other_error_requests_silenced" { description = "Groups to mute for Storage server other errors monitor" - type = "map" + type = map(string) default = {} } variable "server_other_error_requests_enabled" { description = "Flag to enable Storage server other errors monitor" - type = "string" + type = string default = "true" } variable "server_other_error_requests_extra_tags" { description = "Extra tags for Storage server other errors monitor" - type = "list" + type = list(string) default = [] } variable "server_other_error_requests_message" { description = "Custom message for Storage server other errors monitor" - type = "string" + type = string default = "" } variable "server_other_error_requests_time_aggregator" { description = "Monitor aggregator for Storage other errors [available values: min, max or avg]" - type = "string" + type = string default = "min" } variable "server_other_error_requests_timeframe" { description = "Monitor timeframe for Storage server other errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" - type = "string" + type = string default = "last_5m" } @@ -364,37 +364,37 @@ variable "server_other_error_requests_threshold_warning" { variable "client_other_error_requests_silenced" { description = "Groups to mute for Storage other errors monitor" - type = "map" + type = map(string) default = {} } variable "client_other_error_requests_enabled" { description = "Flag to enable Storage other errors monitor" - type = "string" + type = string default = "true" } variable "client_other_error_requests_extra_tags" { description = "Extra tags for Storage other errors monitor" - type = "list" + type = list(string) default = [] } variable "client_other_error_requests_message" { description = "Custom message for Storage other errors monitor" - type = "string" + type = string default = "" } variable "client_other_error_requests_time_aggregator" { description = "Monitor aggregator for Storage other errors [available values: min, max or avg]" - type = "string" + type = string default = "min" } variable "client_other_error_requests_timeframe" { description = "Monitor timeframe for Storage other errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" - type = "string" + type = string default = "last_5m" } @@ -410,37 +410,37 @@ variable "client_other_error_requests_threshold_warning" { variable "authorization_error_requests_silenced" { description = "Groups to mute for Storage authorization errors monitor" - type = "map" + type = map(string) default = {} } variable "authorization_error_requests_enabled" { description = "Flag to enable Storage authorization errors monitor" - type = "string" + type = string default = "true" } variable "authorization_error_requests_extra_tags" { description = "Extra tags for Storage authorization errors monitor" - type = "list" + type = list(string) default = [] } variable "authorization_error_requests_message" { description = "Custom message for Storage authorization errors monitor" - type = "string" + type = string default = "" } variable "authorization_error_requests_time_aggregator" { description = "Monitor aggregator for Storage authorization errors [available values: min, max or avg]" - type = "string" + type = string default = "min" } variable "authorization_error_requests_timeframe" { description = "Monitor timeframe for Storage authorization errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" - type = "string" + type = string default = "last_5m" } @@ -456,36 +456,37 @@ variable "authorization_error_requests_threshold_warning" { variable "status_time_aggregator" { description = "Monitor aggregator for Storage Services status [available values: min, max or avg]" - type = "string" + type = string default = "max" } variable "status_timeframe" { description = "Monitor timeframe for Storage Services status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" - type = "string" + type = string default = "last_5m" } variable "status_enabled" { description = "Flag to enable App Services status monitor" - type = "string" + type = string default = "true" } variable "status_message" { description = "Custom message for storage Services status monitor" - type = "string" + type = string default = "" } variable "status_silenced" { description = "Groups to mute for App Services status monitor" - type = "map" + type = map(string) default = {} } variable "status_extra_tags" { description = "Extra tags for App Services status monitor" - type = "list" + type = list(string) default = [] } + diff --git a/cloud/azure/storage/modules.tf b/cloud/azure/storage/modules.tf index faf64fa..4ba508d 100644 --- a/cloud/azure/storage/modules.tf +++ b/cloud/azure/storage/modules.tf @@ -1,87 +1,88 @@ module "filter-tags" { source = "../../../common/filter-tags" - environment = "${var.environment}" + environment = var.environment resource = "azure_storage" - filter_tags_use_defaults = "${var.filter_tags_use_defaults}" - filter_tags_custom = "${var.filter_tags_custom}" - filter_tags_custom_excluded = "${var.filter_tags_custom_excluded}" + filter_tags_use_defaults = var.filter_tags_use_defaults + filter_tags_custom = var.filter_tags_custom + filter_tags_custom_excluded = var.filter_tags_custom_excluded extra_tags = ["transaction_type:all"] } module "filter-tags-success" { source = "../../../common/filter-tags" - environment = "${var.environment}" + environment = var.environment resource = "azure_storage" - filter_tags_use_defaults = "${var.filter_tags_use_defaults}" - filter_tags_custom = "${var.filter_tags_custom}" - filter_tags_custom_excluded = "${var.filter_tags_custom_excluded}" + filter_tags_use_defaults = var.filter_tags_use_defaults + filter_tags_custom = var.filter_tags_custom + filter_tags_custom_excluded = var.filter_tags_custom_excluded extra_tags = ["transaction_type:all,responsetype:success"] } module "filter-tags-timeout-error" { source = "../../../common/filter-tags" - environment = "${var.environment}" + environment = var.environment resource = "azure_storage" - filter_tags_use_defaults = "${var.filter_tags_use_defaults}" - filter_tags_custom = "${var.filter_tags_custom}" - filter_tags_custom_excluded = "${var.filter_tags_custom_excluded}" + filter_tags_use_defaults = var.filter_tags_use_defaults + filter_tags_custom = var.filter_tags_custom + filter_tags_custom_excluded = var.filter_tags_custom_excluded extra_tags = ["transaction_type:all,responsetype:ServerTimeoutError"] } module "filter-tags-network-error" { source = "../../../common/filter-tags" - environment = "${var.environment}" + environment = var.environment resource = "azure_storage" - filter_tags_use_defaults = "${var.filter_tags_use_defaults}" - filter_tags_custom = "${var.filter_tags_custom}" - filter_tags_custom_excluded = "${var.filter_tags_custom_excluded}" + filter_tags_use_defaults = var.filter_tags_use_defaults + filter_tags_custom = var.filter_tags_custom + filter_tags_custom_excluded = var.filter_tags_custom_excluded extra_tags = ["transaction_type:all,responsetype:NetworkError"] } module "filter-tags-throttling-error" { source = "../../../common/filter-tags" - environment = "${var.environment}" + environment = var.environment resource = "azure_storage" - filter_tags_use_defaults = "${var.filter_tags_use_defaults}" - filter_tags_custom = "${var.filter_tags_custom}" - filter_tags_custom_excluded = "${var.filter_tags_custom_excluded}" + filter_tags_use_defaults = var.filter_tags_use_defaults + filter_tags_custom = var.filter_tags_custom + filter_tags_custom_excluded = var.filter_tags_custom_excluded extra_tags = ["transaction_type:all,responsetype:ServerBusyError"] } module "filter-tags-server-other-error" { source = "../../../common/filter-tags" - environment = "${var.environment}" + environment = var.environment resource = "azure_storage" - filter_tags_use_defaults = "${var.filter_tags_use_defaults}" - filter_tags_custom = "${var.filter_tags_custom}" - filter_tags_custom_excluded = "${var.filter_tags_custom_excluded}" + filter_tags_use_defaults = var.filter_tags_use_defaults + filter_tags_custom = var.filter_tags_custom + filter_tags_custom_excluded = var.filter_tags_custom_excluded extra_tags = ["transaction_type:all,responsetype:ServerOtherError"] } module "filter-tags-client-other-error" { source = "../../../common/filter-tags" - environment = "${var.environment}" + environment = var.environment resource = "azure_storage" - filter_tags_use_defaults = "${var.filter_tags_use_defaults}" - filter_tags_custom = "${var.filter_tags_custom}" - filter_tags_custom_excluded = "${var.filter_tags_custom_excluded}" + filter_tags_use_defaults = var.filter_tags_use_defaults + filter_tags_custom = var.filter_tags_custom + filter_tags_custom_excluded = var.filter_tags_custom_excluded extra_tags = ["transaction_type:all,responsetype:ClientOtherError"] } module "filter-tags-authorization-error" { source = "../../../common/filter-tags" - environment = "${var.environment}" + environment = var.environment resource = "azure_storage" - filter_tags_use_defaults = "${var.filter_tags_use_defaults}" - filter_tags_custom = "${var.filter_tags_custom}" - filter_tags_custom_excluded = "${var.filter_tags_custom_excluded}" + filter_tags_use_defaults = var.filter_tags_use_defaults + filter_tags_custom = var.filter_tags_custom + filter_tags_custom_excluded = var.filter_tags_custom_excluded extra_tags = ["transaction_type:all,responsetype:AuthorizationError"] } + diff --git a/cloud/azure/storage/monitors-azure-storage.tf b/cloud/azure/storage/monitors-azure-storage.tf index 2c45a9f..c083dc8 100644 --- a/cloud/azure/storage/monitors-azure-storage.tf +++ b/cloud/azure/storage/monitors-azure-storage.tf @@ -1,112 +1,116 @@ resource "datadog_monitor" "storage_status" { - count = "${var.status_enabled == "true" ? 1 : 0}" + count = var.status_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Storage is down" - message = "${coalesce(var.status_message, var.message)}" + message = coalesce(var.status_message, var.message) query = < ${var.successful_storage_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.successful_storage_requests_threshold_critical}" - warning = "${var.successful_storage_requests_threshold_warning}" - } - silenced = "${var.successful_requests_silenced}" +thresholds = { +critical = var.successful_storage_requests_threshold_critical +warning = var.successful_storage_requests_threshold_warning +} - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false - require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 +silenced = var.successful_requests_silenced - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.successful_requests_extra_tags}"] +type = "metric alert" +notify_no_data = false +notify_audit = false +timeout_h = 0 +include_tags = true +locked = false +require_full_window = false +new_host_delay = var.new_host_delay +evaluation_delay = var.evaluation_delay +renotify_interval = 0 + +tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.successful_requests_extra_tags] } resource "datadog_monitor" "fileservices_requests_error" { - count = "${var.successful_requests_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Storage File service too few successful requests {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.successful_requests_message, var.message)}" +count = var.successful_requests_enabled == "true" ? 1 : 0 +name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Storage File service too few successful requests {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" +message = coalesce(var.successful_requests_message, var.message) - query = < ${var.successful_storage_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.successful_storage_requests_threshold_critical}" - warning = "${var.successful_storage_requests_threshold_warning}" - } - silenced = "${var.successful_requests_silenced}" +thresholds = { +critical = var.successful_storage_requests_threshold_critical +warning = var.successful_storage_requests_threshold_warning +} - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false - require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 +silenced = var.successful_requests_silenced - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.successful_requests_extra_tags}"] +type = "metric alert" +notify_no_data = false +notify_audit = false +timeout_h = 0 +include_tags = true +locked = false +require_full_window = false +new_host_delay = var.new_host_delay +evaluation_delay = var.evaluation_delay +renotify_interval = 0 + +tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.successful_requests_extra_tags] } resource "datadog_monitor" "queueservices_requests_error" { - count = "${var.successful_requests_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Storage Queue service too few successful requests {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.successful_requests_message, var.message)}" +count = var.successful_requests_enabled == "true" ? 1 : 0 +name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Storage Queue service too few successful requests {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" +message = coalesce(var.successful_requests_message, var.message) - query = < ${var.successful_storage_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.successful_storage_requests_threshold_critical}" - warning = "${var.successful_storage_requests_threshold_warning}" + + thresholds = { + critical = var.successful_storage_requests_threshold_critical + warning = var.successful_storage_requests_threshold_warning } - silenced = "${var.successful_requests_silenced}" + silenced = var.successful_requests_silenced type = "metric alert" notify_no_data = false @@ -246,131 +254,135 @@ resource "datadog_monitor" "queueservices_requests_error" { include_tags = true locked = false require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" + new_host_delay = var.new_host_delay + evaluation_delay = var.evaluation_delay renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.successful_requests_extra_tags}"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.successful_requests_extra_tags] } resource "datadog_monitor" "tableservices_requests_error" { - count = "${var.successful_requests_enabled == "true" ? 1 : 0}" + count = var.successful_requests_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Storage Table service too few successful requests {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.successful_requests_message, var.message)}" + message = coalesce(var.successful_requests_message, var.message) query = < ${var.successful_storage_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.successful_storage_requests_threshold_critical}" - warning = "${var.successful_storage_requests_threshold_warning}" + + thresholds = { + critical = var.successful_storage_requests_threshold_critical + warning = var.successful_storage_requests_threshold_warning } - silenced = "${var.successful_requests_silenced}" + silenced = var.successful_requests_silenced - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false + type = "metric alert" + notify_no_data = false + notify_audit = false + timeout_h = 0 + include_tags = true + locked = false require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 + new_host_delay = var.new_host_delay + evaluation_delay = var.evaluation_delay + renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.successful_requests_extra_tags}"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.successful_requests_extra_tags] } resource "datadog_monitor" "blobservices_latency" { - count = "${var.latency_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Storage Blob service too high end to end latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}" - message = "${coalesce(var.latency_message, var.message)}" + count = var.latency_enabled == "true" ? 1 : 0 + name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Storage Blob service too high end to end latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}" + message = coalesce(var.latency_message, var.message) query = < ${var.latency_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.latency_threshold_critical}" - warning = "${var.latency_threshold_warning}" - } - silenced = "${var.latency_silenced}" +thresholds = { +critical = var.latency_threshold_critical +warning = var.latency_threshold_warning +} - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false - require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 +silenced = var.latency_silenced - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.latency_extra_tags}"] +type = "metric alert" +notify_no_data = false +notify_audit = false +timeout_h = 0 +include_tags = true +locked = false +require_full_window = false +new_host_delay = var.new_host_delay +evaluation_delay = var.evaluation_delay +renotify_interval = 0 + +tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.latency_extra_tags] } resource "datadog_monitor" "fileservices_latency" { - count = "${var.latency_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Storage File service too high end to end latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}" - message = "${coalesce(var.latency_message, var.message)}" +count = var.latency_enabled == "true" ? 1 : 0 +name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Storage File service too high end to end latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}" +message = coalesce(var.latency_message, var.message) - query = < ${var.latency_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.latency_threshold_critical}" - warning = "${var.latency_threshold_warning}" - } - silenced = "${var.latency_silenced}" +thresholds = { +critical = var.latency_threshold_critical +warning = var.latency_threshold_warning +} - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false - require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 +silenced = var.latency_silenced + +type = "metric alert" +notify_no_data = false +notify_audit = false +timeout_h = 0 +include_tags = true +locked = false +require_full_window = false +new_host_delay = var.new_host_delay +evaluation_delay = var.evaluation_delay +renotify_interval = 0 lifecycle { ignore_changes = ["silenced"] } - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.latency_extra_tags}"] +tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.latency_extra_tags] } resource "datadog_monitor" "queueservices_latency" { - count = "${var.latency_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Storage Queue service too high end to end latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}" - message = "${coalesce(var.latency_message, var.message)}" +count = var.latency_enabled == "true" ? 1 : 0 +name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Storage Queue service too high end to end latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}" +message = coalesce(var.latency_message, var.message) - query = < ${var.latency_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.latency_threshold_critical}" - warning = "${var.latency_threshold_warning}" + + thresholds = { + critical = var.latency_threshold_critical + warning = var.latency_threshold_warning } - silenced = "${var.latency_silenced}" + silenced = var.latency_silenced type = "metric alert" notify_no_data = false @@ -379,134 +391,138 @@ resource "datadog_monitor" "queueservices_latency" { include_tags = true locked = false require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" + new_host_delay = var.new_host_delay + evaluation_delay = var.evaluation_delay renotify_interval = 0 lifecycle { ignore_changes = ["silenced"] } - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.latency_extra_tags}"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.latency_extra_tags] } resource "datadog_monitor" "tableservices_latency" { - count = "${var.latency_enabled == "true" ? 1 : 0}" + count = var.latency_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Storage Table service too high end to end latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}" - message = "${coalesce(var.latency_message, var.message)}" + message = coalesce(var.latency_message, var.message) query = < ${var.latency_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.latency_threshold_critical}" - warning = "${var.latency_threshold_warning}" + + thresholds = { + critical = var.latency_threshold_critical + warning = var.latency_threshold_warning } - silenced = "${var.latency_silenced}" + silenced = var.latency_silenced - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false + type = "metric alert" + notify_no_data = false + notify_audit = false + timeout_h = 0 + include_tags = true + locked = false require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 + new_host_delay = var.new_host_delay + evaluation_delay = var.evaluation_delay + renotify_interval = 0 lifecycle { ignore_changes = ["silenced"] } - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.latency_extra_tags}"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.latency_extra_tags] } resource "datadog_monitor" "blob_timeout_error_requests" { - count = "${var.timeout_error_requests_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Blob Storage too many timeout errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.timeout_error_requests_message, var.message)}" + count = var.timeout_error_requests_enabled == "true" ? 1 : 0 + name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Blob Storage too many timeout errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + message = coalesce(var.timeout_error_requests_message, var.message) query = < ${var.timeout_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.timeout_error_requests_threshold_critical}" - warning = "${var.timeout_error_requests_threshold_warning}" - } - silenced = "${var.timeout_error_requests_silenced}" +thresholds = { +critical = var.timeout_error_requests_threshold_critical +warning = var.timeout_error_requests_threshold_warning +} - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false - require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 +silenced = var.timeout_error_requests_silenced - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.timeout_error_requests_extra_tags}"] +type = "metric alert" +notify_no_data = false +notify_audit = false +timeout_h = 0 +include_tags = true +locked = false +require_full_window = false +new_host_delay = var.new_host_delay +evaluation_delay = var.evaluation_delay +renotify_interval = 0 + +tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.timeout_error_requests_extra_tags] } resource "datadog_monitor" "file_timeout_error_requests" { - count = "${var.timeout_error_requests_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure File Storage too many timeout errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.timeout_error_requests_message, var.message)}" +count = var.timeout_error_requests_enabled == "true" ? 1 : 0 +name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure File Storage too many timeout errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" +message = coalesce(var.timeout_error_requests_message, var.message) - query = < ${var.timeout_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.timeout_error_requests_threshold_critical}" - warning = "${var.timeout_error_requests_threshold_warning}" - } - silenced = "${var.timeout_error_requests_silenced}" +thresholds = { +critical = var.timeout_error_requests_threshold_critical +warning = var.timeout_error_requests_threshold_warning +} - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false - require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 +silenced = var.timeout_error_requests_silenced - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.timeout_error_requests_extra_tags}"] +type = "metric alert" +notify_no_data = false +notify_audit = false +timeout_h = 0 +include_tags = true +locked = false +require_full_window = false +new_host_delay = var.new_host_delay +evaluation_delay = var.evaluation_delay +renotify_interval = 0 + +tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.timeout_error_requests_extra_tags] } resource "datadog_monitor" "queue_timeout_error_requests" { - count = "${var.timeout_error_requests_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Queue Storage too many timeout errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.timeout_error_requests_message, var.message)}" +count = var.timeout_error_requests_enabled == "true" ? 1 : 0 +name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Queue Storage too many timeout errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" +message = coalesce(var.timeout_error_requests_message, var.message) - query = < ${var.timeout_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.timeout_error_requests_threshold_critical}" - warning = "${var.timeout_error_requests_threshold_warning}" + + thresholds = { + critical = var.timeout_error_requests_threshold_critical + warning = var.timeout_error_requests_threshold_warning } - silenced = "${var.timeout_error_requests_silenced}" + silenced = var.timeout_error_requests_silenced type = "metric alert" notify_no_data = false @@ -515,126 +531,130 @@ resource "datadog_monitor" "queue_timeout_error_requests" { include_tags = true locked = false require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" + new_host_delay = var.new_host_delay + evaluation_delay = var.evaluation_delay renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.timeout_error_requests_extra_tags}"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.timeout_error_requests_extra_tags] } resource "datadog_monitor" "table_timeout_error_requests" { - count = "${var.timeout_error_requests_enabled == "true" ? 1 : 0}" + count = var.timeout_error_requests_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Table Storage too many timeout errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.timeout_error_requests_message, var.message)}" + message = coalesce(var.timeout_error_requests_message, var.message) query = < ${var.timeout_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.timeout_error_requests_threshold_critical}" - warning = "${var.timeout_error_requests_threshold_warning}" + + thresholds = { + critical = var.timeout_error_requests_threshold_critical + warning = var.timeout_error_requests_threshold_warning } - silenced = "${var.timeout_error_requests_silenced}" + silenced = var.timeout_error_requests_silenced - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false + type = "metric alert" + notify_no_data = false + notify_audit = false + timeout_h = 0 + include_tags = true + locked = false require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 + new_host_delay = var.new_host_delay + evaluation_delay = var.evaluation_delay + renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.timeout_error_requests_extra_tags}"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.timeout_error_requests_extra_tags] } resource "datadog_monitor" "blob_network_error_requests" { - count = "${var.network_error_requests_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Blob Storage too many network errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.network_error_requests_message, var.message)}" + count = var.network_error_requests_enabled == "true" ? 1 : 0 + name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Blob Storage too many network errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + message = coalesce(var.network_error_requests_message, var.message) query = < ${var.network_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.network_error_requests_threshold_critical}" - warning = "${var.network_error_requests_threshold_warning}" - } - silenced = "${var.network_error_requests_silenced}" +thresholds = { +critical = var.network_error_requests_threshold_critical +warning = var.network_error_requests_threshold_warning +} - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false - require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 +silenced = var.network_error_requests_silenced - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.network_error_requests_extra_tags}"] +type = "metric alert" +notify_no_data = false +notify_audit = false +timeout_h = 0 +include_tags = true +locked = false +require_full_window = false +new_host_delay = var.new_host_delay +evaluation_delay = var.evaluation_delay +renotify_interval = 0 + +tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.network_error_requests_extra_tags] } resource "datadog_monitor" "file_network_error_requests" { - count = "${var.network_error_requests_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure File Storage too many network errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.network_error_requests_message, var.message)}" +count = var.network_error_requests_enabled == "true" ? 1 : 0 +name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure File Storage too many network errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" +message = coalesce(var.network_error_requests_message, var.message) - query = < ${var.network_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.network_error_requests_threshold_critical}" - warning = "${var.network_error_requests_threshold_warning}" - } - silenced = "${var.network_error_requests_silenced}" +thresholds = { +critical = var.network_error_requests_threshold_critical +warning = var.network_error_requests_threshold_warning +} - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false - require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 +silenced = var.network_error_requests_silenced - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.network_error_requests_extra_tags}"] +type = "metric alert" +notify_no_data = false +notify_audit = false +timeout_h = 0 +include_tags = true +locked = false +require_full_window = false +new_host_delay = var.new_host_delay +evaluation_delay = var.evaluation_delay +renotify_interval = 0 + +tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.network_error_requests_extra_tags] } resource "datadog_monitor" "queue_network_error_requests" { - count = "${var.network_error_requests_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Queue Storage too many network errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.network_error_requests_message, var.message)}" +count = var.network_error_requests_enabled == "true" ? 1 : 0 +name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Queue Storage too many network errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" +message = coalesce(var.network_error_requests_message, var.message) - query = < ${var.network_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.network_error_requests_threshold_critical}" - warning = "${var.network_error_requests_threshold_warning}" + + thresholds = { + critical = var.network_error_requests_threshold_critical + warning = var.network_error_requests_threshold_warning } - silenced = "${var.network_error_requests_silenced}" + silenced = var.network_error_requests_silenced type = "metric alert" notify_no_data = false @@ -643,136 +663,138 @@ resource "datadog_monitor" "queue_network_error_requests" { include_tags = true locked = false require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" + new_host_delay = var.new_host_delay + evaluation_delay = var.evaluation_delay renotify_interval = 0 - lifecycle { ignore_changes = ["silenced"] } - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.network_error_requests_extra_tags}"] - + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.network_error_requests_extra_tags] } resource "datadog_monitor" "table_network_error_requests" { - count = "${var.network_error_requests_enabled == "true" ? 1 : 0}" + count = var.network_error_requests_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Table Storage too many network errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.network_error_requests_message, var.message)}" + message = coalesce(var.network_error_requests_message, var.message) query = < ${var.network_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.network_error_requests_threshold_critical}" - warning = "${var.network_error_requests_threshold_warning}" + + thresholds = { + critical = var.network_error_requests_threshold_critical + warning = var.network_error_requests_threshold_warning } - silenced = "${var.network_error_requests_silenced}" + silenced = var.network_error_requests_silenced - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false + type = "metric alert" + notify_no_data = false + notify_audit = false + timeout_h = 0 + include_tags = true + locked = false require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 + new_host_delay = var.new_host_delay + evaluation_delay = var.evaluation_delay + renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.network_error_requests_extra_tags}"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.network_error_requests_extra_tags] } resource "datadog_monitor" "blob_throttling_error_requests" { - count = "${var.throttling_error_requests_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Blob Storage too many throttling errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.throttling_error_requests_message, var.message)}" + count = var.throttling_error_requests_enabled == "true" ? 1 : 0 + name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Blob Storage too many throttling errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + message = coalesce(var.throttling_error_requests_message, var.message) query = < ${var.throttling_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.throttling_error_requests_threshold_critical}" - warning = "${var.throttling_error_requests_threshold_warning}" - } - silenced = "${var.throttling_error_requests_silenced}" +thresholds = { +critical = var.throttling_error_requests_threshold_critical +warning = var.throttling_error_requests_threshold_warning +} - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false - require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 +silenced = var.throttling_error_requests_silenced + +type = "metric alert" +notify_no_data = false +notify_audit = false +timeout_h = 0 +include_tags = true +locked = false +require_full_window = false +new_host_delay = var.new_host_delay +evaluation_delay = var.evaluation_delay +renotify_interval = 0 lifecycle { ignore_changes = ["silenced"] } - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.throttling_error_requests_extra_tags}"] +tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.throttling_error_requests_extra_tags] } resource "datadog_monitor" "file_throttling_error_requests" { - count = "${var.throttling_error_requests_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Storage too many throttling errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.throttling_error_requests_message, var.message)}" +count = var.throttling_error_requests_enabled == "true" ? 1 : 0 +name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Storage too many throttling errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" +message = coalesce(var.throttling_error_requests_message, var.message) - query = < ${var.throttling_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.throttling_error_requests_threshold_critical}" - warning = "${var.throttling_error_requests_threshold_warning}" - } - silenced = "${var.throttling_error_requests_silenced}" +thresholds = { +critical = var.throttling_error_requests_threshold_critical +warning = var.throttling_error_requests_threshold_warning +} - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false - require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 +silenced = var.throttling_error_requests_silenced - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.throttling_error_requests_extra_tags}"] +type = "metric alert" +notify_no_data = false +notify_audit = false +timeout_h = 0 +include_tags = true +locked = false +require_full_window = false +new_host_delay = var.new_host_delay +evaluation_delay = var.evaluation_delay +renotify_interval = 0 + +tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.throttling_error_requests_extra_tags] } resource "datadog_monitor" "queue_throttling_error_requests" { - count = "${var.throttling_error_requests_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Storage too many throttling errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.throttling_error_requests_message, var.message)}" +count = var.throttling_error_requests_enabled == "true" ? 1 : 0 +name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Storage too many throttling errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" +message = coalesce(var.throttling_error_requests_message, var.message) - query = < ${var.throttling_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.throttling_error_requests_threshold_critical}" - warning = "${var.throttling_error_requests_threshold_warning}" + + thresholds = { + critical = var.throttling_error_requests_threshold_critical + warning = var.throttling_error_requests_threshold_warning } - silenced = "${var.throttling_error_requests_silenced}" + silenced = var.throttling_error_requests_silenced type = "metric alert" notify_no_data = false @@ -781,126 +803,130 @@ resource "datadog_monitor" "queue_throttling_error_requests" { include_tags = true locked = false require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" + new_host_delay = var.new_host_delay + evaluation_delay = var.evaluation_delay renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.throttling_error_requests_extra_tags}"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.throttling_error_requests_extra_tags] } resource "datadog_monitor" "table_throttling_error_requests" { - count = "${var.throttling_error_requests_enabled == "true" ? 1 : 0}" + count = var.throttling_error_requests_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Storage too many throttling errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.throttling_error_requests_message, var.message)}" + message = coalesce(var.throttling_error_requests_message, var.message) query = < ${var.throttling_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.throttling_error_requests_threshold_critical}" - warning = "${var.throttling_error_requests_threshold_warning}" + + thresholds = { + critical = var.throttling_error_requests_threshold_critical + warning = var.throttling_error_requests_threshold_warning } - silenced = "${var.throttling_error_requests_silenced}" + silenced = var.throttling_error_requests_silenced - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false + type = "metric alert" + notify_no_data = false + notify_audit = false + timeout_h = 0 + include_tags = true + locked = false require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 + new_host_delay = var.new_host_delay + evaluation_delay = var.evaluation_delay + renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.throttling_error_requests_extra_tags}"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.throttling_error_requests_extra_tags] } resource "datadog_monitor" "blob_server_other_error_requests" { - count = "${var.server_other_error_requests_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Blob Storage too many server_other errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.server_other_error_requests_message, var.message)}" + count = var.server_other_error_requests_enabled == "true" ? 1 : 0 + name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Blob Storage too many server_other errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + message = coalesce(var.server_other_error_requests_message, var.message) query = < ${var.server_other_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.server_other_error_requests_threshold_critical}" - warning = "${var.server_other_error_requests_threshold_warning}" - } - silenced = "${var.server_other_error_requests_silenced}" +thresholds = { +critical = var.server_other_error_requests_threshold_critical +warning = var.server_other_error_requests_threshold_warning +} - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false - require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 +silenced = var.server_other_error_requests_silenced - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.server_other_error_requests_extra_tags}"] +type = "metric alert" +notify_no_data = false +notify_audit = false +timeout_h = 0 +include_tags = true +locked = false +require_full_window = false +new_host_delay = var.new_host_delay +evaluation_delay = var.evaluation_delay +renotify_interval = 0 + +tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.server_other_error_requests_extra_tags] } resource "datadog_monitor" "file_server_other_error_requests" { - count = "${var.server_other_error_requests_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure File Storage too many server_other errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.server_other_error_requests_message, var.message)}" +count = var.server_other_error_requests_enabled == "true" ? 1 : 0 +name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure File Storage too many server_other errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" +message = coalesce(var.server_other_error_requests_message, var.message) - query = < ${var.server_other_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.server_other_error_requests_threshold_critical}" - warning = "${var.server_other_error_requests_threshold_warning}" - } - silenced = "${var.server_other_error_requests_silenced}" +thresholds = { +critical = var.server_other_error_requests_threshold_critical +warning = var.server_other_error_requests_threshold_warning +} - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false - require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 +silenced = var.server_other_error_requests_silenced - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.server_other_error_requests_extra_tags}"] +type = "metric alert" +notify_no_data = false +notify_audit = false +timeout_h = 0 +include_tags = true +locked = false +require_full_window = false +new_host_delay = var.new_host_delay +evaluation_delay = var.evaluation_delay +renotify_interval = 0 + +tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.server_other_error_requests_extra_tags] } resource "datadog_monitor" "queue_server_other_error_requests" { - count = "${var.server_other_error_requests_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Queue Storage too many server_other errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.server_other_error_requests_message, var.message)}" +count = var.server_other_error_requests_enabled == "true" ? 1 : 0 +name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Queue Storage too many server_other errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" +message = coalesce(var.server_other_error_requests_message, var.message) - query = < ${var.server_other_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.server_other_error_requests_threshold_critical}" - warning = "${var.server_other_error_requests_threshold_warning}" + + thresholds = { + critical = var.server_other_error_requests_threshold_critical + warning = var.server_other_error_requests_threshold_warning } - silenced = "${var.server_other_error_requests_silenced}" + silenced = var.server_other_error_requests_silenced type = "metric alert" notify_no_data = false @@ -909,136 +935,138 @@ resource "datadog_monitor" "queue_server_other_error_requests" { include_tags = true locked = false require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" + new_host_delay = var.new_host_delay + evaluation_delay = var.evaluation_delay renotify_interval = 0 - lifecycle { ignore_changes = ["silenced"] } - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.server_other_error_requests_extra_tags}"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.server_other_error_requests_extra_tags] } resource "datadog_monitor" "table_server_other_error_requests" { - count = "${var.server_other_error_requests_enabled == "true" ? 1 : 0}" + count = var.server_other_error_requests_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Table Storage too many server_other errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.server_other_error_requests_message, var.message)}" + message = coalesce(var.server_other_error_requests_message, var.message) query = < ${var.server_other_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.server_other_error_requests_threshold_critical}" - warning = "${var.server_other_error_requests_threshold_warning}" + + thresholds = { + critical = var.server_other_error_requests_threshold_critical + warning = var.server_other_error_requests_threshold_warning } - silenced = "${var.server_other_error_requests_silenced}" + silenced = var.server_other_error_requests_silenced - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false + type = "metric alert" + notify_no_data = false + notify_audit = false + timeout_h = 0 + include_tags = true + locked = false require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 + new_host_delay = var.new_host_delay + evaluation_delay = var.evaluation_delay + renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.server_other_error_requests_extra_tags}"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.server_other_error_requests_extra_tags] } resource "datadog_monitor" "blob_client_other_error_requests" { - count = "${var.client_other_error_requests_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Blob Storage too many client_other errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.client_other_error_requests_message, var.message)}" + count = var.client_other_error_requests_enabled == "true" ? 1 : 0 + name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Blob Storage too many client_other errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + message = coalesce(var.client_other_error_requests_message, var.message) query = < ${var.client_other_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.client_other_error_requests_threshold_critical}" - warning = "${var.client_other_error_requests_threshold_warning}" - } - silenced = "${var.client_other_error_requests_silenced}" +thresholds = { +critical = var.client_other_error_requests_threshold_critical +warning = var.client_other_error_requests_threshold_warning +} - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false - require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 +silenced = var.client_other_error_requests_silenced - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.client_other_error_requests_extra_tags}"] +type = "metric alert" +notify_no_data = false +notify_audit = false +timeout_h = 0 +include_tags = true +locked = false +require_full_window = false +new_host_delay = var.new_host_delay +evaluation_delay = var.evaluation_delay +renotify_interval = 0 + +tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.client_other_error_requests_extra_tags] } resource "datadog_monitor" "file_client_other_error_requests" { - count = "${var.client_other_error_requests_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure File Storage too many client_other errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.client_other_error_requests_message, var.message)}" +count = var.client_other_error_requests_enabled == "true" ? 1 : 0 +name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure File Storage too many client_other errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" +message = coalesce(var.client_other_error_requests_message, var.message) - query = < ${var.client_other_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.client_other_error_requests_threshold_critical}" - warning = "${var.client_other_error_requests_threshold_warning}" - } - silenced = "${var.client_other_error_requests_silenced}" +thresholds = { +critical = var.client_other_error_requests_threshold_critical +warning = var.client_other_error_requests_threshold_warning +} - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false - require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 +silenced = var.client_other_error_requests_silenced lifecycle { ignore_changes = ["silenced"] } - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.client_other_error_requests_extra_tags}"] +type = "metric alert" +notify_no_data = false +notify_audit = false +timeout_h = 0 +include_tags = true +locked = false +require_full_window = false +new_host_delay = var.new_host_delay +evaluation_delay = var.evaluation_delay +renotify_interval = 0 +tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.client_other_error_requests_extra_tags] } resource "datadog_monitor" "queue_client_other_error_requests" { - count = "${var.client_other_error_requests_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Queue Storage too many client_other errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.client_other_error_requests_message, var.message)}" +count = var.client_other_error_requests_enabled == "true" ? 1 : 0 +name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Queue Storage too many client_other errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" +message = coalesce(var.client_other_error_requests_message, var.message) - query = < ${var.client_other_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.client_other_error_requests_threshold_critical}" - warning = "${var.client_other_error_requests_threshold_warning}" + + thresholds = { + critical = var.client_other_error_requests_threshold_critical + warning = var.client_other_error_requests_threshold_warning } - silenced = "${var.client_other_error_requests_silenced}" + silenced = var.client_other_error_requests_silenced type = "metric alert" notify_no_data = false @@ -1047,134 +1075,138 @@ resource "datadog_monitor" "queue_client_other_error_requests" { include_tags = true locked = false require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" + new_host_delay = var.new_host_delay + evaluation_delay = var.evaluation_delay renotify_interval = 0 lifecycle { ignore_changes = ["silenced"] } - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.client_other_error_requests_extra_tags}"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.client_other_error_requests_extra_tags] } resource "datadog_monitor" "table_client_other_error_requests" { - count = "${var.client_other_error_requests_enabled == "true" ? 1 : 0}" + count = var.client_other_error_requests_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Table Storage too many client_other errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.client_other_error_requests_message, var.message)}" + message = coalesce(var.client_other_error_requests_message, var.message) query = < ${var.client_other_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.client_other_error_requests_threshold_critical}" - warning = "${var.client_other_error_requests_threshold_warning}" + + thresholds = { + critical = var.client_other_error_requests_threshold_critical + warning = var.client_other_error_requests_threshold_warning } - silenced = "${var.client_other_error_requests_silenced}" + silenced = var.client_other_error_requests_silenced - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false + type = "metric alert" + notify_no_data = false + notify_audit = false + timeout_h = 0 + include_tags = true + locked = false require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 + new_host_delay = var.new_host_delay + evaluation_delay = var.evaluation_delay + renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.client_other_error_requests_extra_tags}"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.client_other_error_requests_extra_tags] } resource "datadog_monitor" "blob_authorization_error_requests" { - count = "${var.authorization_error_requests_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Blob Storage too many authorization errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.authorization_error_requests_message, var.message)}" + count = var.authorization_error_requests_enabled == "true" ? 1 : 0 + name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Blob Storage too many authorization errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + message = coalesce(var.authorization_error_requests_message, var.message) query = < ${var.authorization_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.authorization_error_requests_threshold_critical}" - warning = "${var.authorization_error_requests_threshold_warning}" - } - silenced = "${var.authorization_error_requests_silenced}" +thresholds = { +critical = var.authorization_error_requests_threshold_critical +warning = var.authorization_error_requests_threshold_warning +} - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false - require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 +silenced = var.authorization_error_requests_silenced - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.authorization_error_requests_extra_tags}"] +type = "metric alert" +notify_no_data = false +notify_audit = false +timeout_h = 0 +include_tags = true +locked = false +require_full_window = false +new_host_delay = var.new_host_delay +evaluation_delay = var.evaluation_delay +renotify_interval = 0 + +tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.authorization_error_requests_extra_tags] } resource "datadog_monitor" "file_authorization_error_requests" { - count = "${var.authorization_error_requests_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure File Storage too many authorization errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.authorization_error_requests_message, var.message)}" +count = var.authorization_error_requests_enabled == "true" ? 1 : 0 +name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure File Storage too many authorization errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" +message = coalesce(var.authorization_error_requests_message, var.message) - query = < ${var.authorization_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.authorization_error_requests_threshold_critical}" - warning = "${var.authorization_error_requests_threshold_warning}" - } - silenced = "${var.authorization_error_requests_silenced}" +thresholds = { +critical = var.authorization_error_requests_threshold_critical +warning = var.authorization_error_requests_threshold_warning +} - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false - require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 +silenced = var.authorization_error_requests_silenced + +type = "metric alert" +notify_no_data = false +notify_audit = false +timeout_h = 0 +include_tags = true +locked = false +require_full_window = false +new_host_delay = var.new_host_delay +evaluation_delay = var.evaluation_delay +renotify_interval = 0 lifecycle { ignore_changes = ["silenced"] } - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.authorization_error_requests_extra_tags}"] +tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.authorization_error_requests_extra_tags] } resource "datadog_monitor" "queue_authorization_error_requests" { - count = "${var.authorization_error_requests_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Queue Storage too many authorization errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.authorization_error_requests_message, var.message)}" +count = var.authorization_error_requests_enabled == "true" ? 1 : 0 +name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Queue Storage too many authorization errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" +message = coalesce(var.authorization_error_requests_message, var.message) - query = < ${var.authorization_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.authorization_error_requests_threshold_critical}" - warning = "${var.authorization_error_requests_threshold_warning}" + + thresholds = { + critical = var.authorization_error_requests_threshold_critical + warning = var.authorization_error_requests_threshold_warning } - silenced = "${var.authorization_error_requests_silenced}" + silenced = var.authorization_error_requests_silenced type = "metric alert" notify_no_data = false @@ -1183,41 +1215,42 @@ resource "datadog_monitor" "queue_authorization_error_requests" { include_tags = true locked = false require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" + new_host_delay = var.new_host_delay + evaluation_delay = var.evaluation_delay renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.authorization_error_requests_extra_tags}"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.authorization_error_requests_extra_tags] } resource "datadog_monitor" "table_authorization_error_requests" { - count = "${var.authorization_error_requests_enabled == "true" ? 1 : 0}" + count = var.authorization_error_requests_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Azure Table Storage too many authorization errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = "${coalesce(var.authorization_error_requests_message, var.message)}" + message = coalesce(var.authorization_error_requests_message, var.message) query = < ${var.authorization_error_requests_threshold_critical} - EOQ +EOQ - thresholds { - critical = "${var.authorization_error_requests_threshold_critical}" - warning = "${var.authorization_error_requests_threshold_warning}" + + thresholds = { + critical = var.authorization_error_requests_threshold_critical + warning = var.authorization_error_requests_threshold_warning } - silenced = "${var.authorization_error_requests_silenced}" + silenced = var.authorization_error_requests_silenced - type = "metric alert" - notify_no_data = false - notify_audit = false - timeout_h = 0 - include_tags = true - locked = false + type = "metric alert" + notify_no_data = false + notify_audit = false + timeout_h = 0 + include_tags = true + locked = false require_full_window = false - new_host_delay = "${var.new_host_delay}" - evaluation_delay = "${var.evaluation_delay}" - renotify_interval = 0 + new_host_delay = var.new_host_delay + evaluation_delay = var.evaluation_delay + renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.authorization_error_requests_extra_tags}"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", var.authorization_error_requests_extra_tags] } diff --git a/cloud/azure/storage/outputs.tf b/cloud/azure/storage/outputs.tf index 880acf1..8e4c820 100644 --- a/cloud/azure/storage/outputs.tf +++ b/cloud/azure/storage/outputs.tf @@ -1,184 +1,185 @@ output "storage_status_id" { description = "id for monitor storage_status" - value = "${datadog_monitor.storage_status.*.id}" + value = datadog_monitor.storage_status.*.id } output "blobservices_availability_id" { description = "id for monitor blobservices_availability" - value = "${datadog_monitor.blobservices_availability.*.id}" + value = datadog_monitor.blobservices_availability.*.id } output "fileservices_availability_id" { description = "id for monitor fileservices_availability" - value = "${datadog_monitor.fileservices_availability.*.id}" + value = datadog_monitor.fileservices_availability.*.id } output "queueservices_availability_id" { description = "id for monitor queueservices_availability" - value = "${datadog_monitor.queueservices_availability.*.id}" + value = datadog_monitor.queueservices_availability.*.id } output "table_availability_id" { description = "id for monitor table_availability" - value = "${datadog_monitor.table_availability.*.id}" + value = datadog_monitor.table_availability.*.id } output "blobservices_requests_error_id" { description = "id for monitor blobservices_requests_error" - value = "${datadog_monitor.blobservices_requests_error.*.id}" + value = datadog_monitor.blobservices_requests_error.*.id } output "fileservices_requests_error_id" { description = "id for monitor fileservices_requests_error" - value = "${datadog_monitor.fileservices_requests_error.*.id}" + value = datadog_monitor.fileservices_requests_error.*.id } output "queueservices_requests_error_id" { description = "id for monitor queueservices_requests_error" - value = "${datadog_monitor.queueservices_requests_error.*.id}" + value = datadog_monitor.queueservices_requests_error.*.id } output "tableservices_requests_error_id" { description = "id for monitor tableservices_requests_error" - value = "${datadog_monitor.tableservices_requests_error.*.id}" + value = datadog_monitor.tableservices_requests_error.*.id } output "blobservices_latency_id" { description = "id for monitor blobservices_latency" - value = "${datadog_monitor.blobservices_latency.*.id}" + value = datadog_monitor.blobservices_latency.*.id } output "fileservices_latency_id" { description = "id for monitor fileservices_latency" - value = "${datadog_monitor.fileservices_latency.*.id}" + value = datadog_monitor.fileservices_latency.*.id } output "queueservices_latency_id" { description = "id for monitor queueservices_latency" - value = "${datadog_monitor.queueservices_latency.*.id}" + value = datadog_monitor.queueservices_latency.*.id } output "tableservices_latency_id" { description = "id for monitor tableservices_latency" - value = "${datadog_monitor.tableservices_latency.*.id}" + value = datadog_monitor.tableservices_latency.*.id } output "blob_timeout_error_requests_id" { description = "id for monitor blob_timeout_error_requests" - value = "${datadog_monitor.blob_timeout_error_requests.*.id}" + value = datadog_monitor.blob_timeout_error_requests.*.id } output "file_timeout_error_requests_id" { description = "id for monitor file_timeout_error_requests" - value = "${datadog_monitor.file_timeout_error_requests.*.id}" + value = datadog_monitor.file_timeout_error_requests.*.id } output "queue_timeout_error_requests_id" { description = "id for monitor queue_timeout_error_requests" - value = "${datadog_monitor.queue_timeout_error_requests.*.id}" + value = datadog_monitor.queue_timeout_error_requests.*.id } output "table_timeout_error_requests_id" { description = "id for monitor table_timeout_error_requests" - value = "${datadog_monitor.table_timeout_error_requests.*.id}" + value = datadog_monitor.table_timeout_error_requests.*.id } output "blob_network_error_requests_id" { description = "id for monitor blob_network_error_requests" - value = "${datadog_monitor.blob_network_error_requests.*.id}" + value = datadog_monitor.blob_network_error_requests.*.id } output "file_network_error_requests_id" { description = "id for monitor file_network_error_requests" - value = "${datadog_monitor.file_network_error_requests.*.id}" + value = datadog_monitor.file_network_error_requests.*.id } output "queue_network_error_requests_id" { description = "id for monitor queue_network_error_requests" - value = "${datadog_monitor.queue_network_error_requests.*.id}" + value = datadog_monitor.queue_network_error_requests.*.id } output "table_network_error_requests_id" { description = "id for monitor table_network_error_requests" - value = "${datadog_monitor.table_network_error_requests.*.id}" + value = datadog_monitor.table_network_error_requests.*.id } output "blob_throttling_error_requests_id" { description = "id for monitor blob_throttling_error_requests" - value = "${datadog_monitor.blob_throttling_error_requests.*.id}" + value = datadog_monitor.blob_throttling_error_requests.*.id } output "file_throttling_error_requests_id" { description = "id for monitor file_throttling_error_requests" - value = "${datadog_monitor.file_throttling_error_requests.*.id}" + value = datadog_monitor.file_throttling_error_requests.*.id } output "queue_throttling_error_requests_id" { description = "id for monitor queue_throttling_error_requests" - value = "${datadog_monitor.queue_throttling_error_requests.*.id}" + value = datadog_monitor.queue_throttling_error_requests.*.id } output "table_throttling_error_requests_id" { description = "id for monitor table_throttling_error_requests" - value = "${datadog_monitor.table_throttling_error_requests.*.id}" + value = datadog_monitor.table_throttling_error_requests.*.id } output "blob_server_other_error_requests_id" { description = "id for monitor blob_server_other_error_requests" - value = "${datadog_monitor.blob_server_other_error_requests.*.id}" + value = datadog_monitor.blob_server_other_error_requests.*.id } output "file_server_other_error_requests_id" { description = "id for monitor file_server_other_error_requests" - value = "${datadog_monitor.file_server_other_error_requests.*.id}" + value = datadog_monitor.file_server_other_error_requests.*.id } output "queue_server_other_error_requests_id" { description = "id for monitor queue_server_other_error_requests" - value = "${datadog_monitor.queue_server_other_error_requests.*.id}" + value = datadog_monitor.queue_server_other_error_requests.*.id } output "table_server_other_error_requests_id" { description = "id for monitor table_server_other_error_requests" - value = "${datadog_monitor.table_server_other_error_requests.*.id}" + value = datadog_monitor.table_server_other_error_requests.*.id } output "blob_client_other_error_requests_id" { description = "id for monitor blob_client_other_error_requests" - value = "${datadog_monitor.blob_client_other_error_requests.*.id}" + value = datadog_monitor.blob_client_other_error_requests.*.id } output "file_client_other_error_requests_id" { description = "id for monitor file_client_other_error_requests" - value = "${datadog_monitor.file_client_other_error_requests.*.id}" + value = datadog_monitor.file_client_other_error_requests.*.id } output "queue_client_other_error_requests_id" { description = "id for monitor queue_client_other_error_requests" - value = "${datadog_monitor.queue_client_other_error_requests.*.id}" + value = datadog_monitor.queue_client_other_error_requests.*.id } output "table_client_other_error_requests_id" { description = "id for monitor table_client_other_error_requests" - value = "${datadog_monitor.table_client_other_error_requests.*.id}" + value = datadog_monitor.table_client_other_error_requests.*.id } output "blob_authorization_error_requests_id" { description = "id for monitor blob_authorization_error_requests" - value = "${datadog_monitor.blob_authorization_error_requests.*.id}" + value = datadog_monitor.blob_authorization_error_requests.*.id } output "file_authorization_error_requests_id" { description = "id for monitor file_authorization_error_requests" - value = "${datadog_monitor.file_authorization_error_requests.*.id}" + value = datadog_monitor.file_authorization_error_requests.*.id } output "queue_authorization_error_requests_id" { description = "id for monitor queue_authorization_error_requests" - value = "${datadog_monitor.queue_authorization_error_requests.*.id}" + value = datadog_monitor.queue_authorization_error_requests.*.id } output "table_authorization_error_requests_id" { description = "id for monitor table_authorization_error_requests" - value = "${datadog_monitor.table_authorization_error_requests.*.id}" + value = datadog_monitor.table_authorization_error_requests.*.id } + diff --git a/cloud/azure/storage/versions.tf b/cloud/azure/storage/versions.tf new file mode 100644 index 0000000..ac97c6a --- /dev/null +++ b/cloud/azure/storage/versions.tf @@ -0,0 +1,4 @@ + +terraform { + required_version = ">= 0.12" +}