diff --git a/cloud/aws/elasticache/common/monitors-elasticache.tf b/cloud/aws/elasticache/common/monitors-elasticache.tf index 6d53ade..c826d4c 100644 --- a/cloud/aws/elasticache/common/monitors-elasticache.tf +++ b/cloud/aws/elasticache/common/monitors-elasticache.tf @@ -10,6 +10,10 @@ resource "datadog_monitor" "elasticache_eviction" { ) > 0 EOF + lifecycle { + ignore_changes = ["type"] + } + notify_no_data = false evaluation_delay = "${var.delay}" renotify_interval = 0 @@ -37,6 +41,10 @@ resource "datadog_monitor" "elasticache_max_connection" { ) >= 65000 EOF + lifecycle { + ignore_changes = ["type"] + } + notify_no_data = true evaluation_delay = "${var.delay}" renotify_interval = 0 @@ -64,6 +72,10 @@ resource "datadog_monitor" "elasticache_no_connection" { ) <= 0 EOF + lifecycle { + ignore_changes = ["type"] + } + notify_no_data = true evaluation_delay = "${var.delay}" renotify_interval = 0 @@ -91,6 +103,10 @@ resource "datadog_monitor" "elasticache_swap" { ) > ${var.swap_threshold_critical} EOF + lifecycle { + ignore_changes = ["type"] + } + thresholds { warning = "${var.swap_threshold_warning}" critical = "${var.swap_threshold_critical}" @@ -124,6 +140,10 @@ resource "datadog_monitor" "elasticache_free_memory" { < ${var.free_memory_threshold_critical} EOF + lifecycle { + ignore_changes = ["type"] + } + thresholds { warning = "${var.free_memory_threshold_warning}" critical = "${var.free_memory_threshold_critical}" @@ -156,6 +176,10 @@ resource "datadog_monitor" "elasticache_eviction_growing" { > ${var.eviction_growing_threshold_critical} EOF + lifecycle { + ignore_changes = ["type"] + } + thresholds { warning = "${var.eviction_growing_threshold_warning}" critical = "${var.eviction_growing_threshold_critical}" diff --git a/cloud/aws/elasticache/memcached/monitors-memcached.tf b/cloud/aws/elasticache/memcached/monitors-memcached.tf index 37d109b..b87854c 100644 --- a/cloud/aws/elasticache/memcached/monitors-memcached.tf +++ b/cloud/aws/elasticache/memcached/monitors-memcached.tf @@ -67,6 +67,10 @@ resource "datadog_monitor" "memcached_get_hits" { ) < ${var.get_hits_threshold_critical} EOF + lifecycle { + ignore_changes = ["type"] + } + thresholds { warning = "${var.get_hits_threshold_warning}" critical = "${var.get_hits_threshold_critical}" @@ -99,6 +103,10 @@ resource "datadog_monitor" "memcached_cpu_high" { ) > ${var.cpu_high_threshold_critical} EOF + lifecycle { + ignore_changes = ["type"] + } + thresholds { warning = "${var.cpu_high_threshold_warning}" critical = "${var.cpu_high_threshold_critical}" diff --git a/cloud/aws/elasticache/redis/monitors-redis.tf b/cloud/aws/elasticache/redis/monitors-redis.tf index 08f35ef..2ecc561 100644 --- a/cloud/aws/elasticache/redis/monitors-redis.tf +++ b/cloud/aws/elasticache/redis/monitors-redis.tf @@ -67,6 +67,10 @@ resource "datadog_monitor" "redis_cache_hits" { ) * 100 < ${var.cache_hits_threshold_critical} EOF + lifecycle { + ignore_changes = ["type"] + } + thresholds { warning = "${var.cache_hits_threshold_warning}" critical = "${var.cache_hits_threshold_critical}" @@ -99,6 +103,10 @@ resource "datadog_monitor" "redis_cpu_high" { ) > ${var.cpu_high_threshold_critical} EOF + lifecycle { + ignore_changes = ["type"] + } + notify_no_data = true evaluation_delay = "${var.delay}" renotify_interval = 0 @@ -126,6 +134,10 @@ resource "datadog_monitor" "redis_replication_lag" { ) > ${var.replication_lag_threshold_critical} EOF + lifecycle { + ignore_changes = ["type"] + } + thresholds { warning = "${var.replication_lag_threshold_warning}" critical = "${var.replication_lag_threshold_critical}" @@ -159,6 +171,10 @@ resource "datadog_monitor" "redis_commands" { ) <= 0 EOF + lifecycle { + ignore_changes = ["type"] + } + notify_no_data = true evaluation_delay = "${var.delay}" renotify_interval = 0