diff --git a/cloud/aws/elasticache/memcached/memory.tf b/cloud/aws/elasticache/memcached/locals.tf similarity index 88% rename from cloud/aws/elasticache/memcached/memory.tf rename to cloud/aws/elasticache/memcached/locals.tf index 0d41eeb..310de51 100644 --- a/cloud/aws/elasticache/memcached/memory.tf +++ b/cloud/aws/elasticache/memcached/locals.tf @@ -1,9 +1,5 @@ -variable "memory" { - type = "map" - - description = "Mapping between Elasticache size and Memory." - - default = { +locals { + memory = { cache.t2.micro = "595926712" cache.t2.small = "1664299827" cache.t2.medium = "3457448673" diff --git a/cloud/aws/elasticache/memcached/monitors-memcached.tf b/cloud/aws/elasticache/memcached/monitors-memcached.tf index 71b83e3..ea2ebec 100644 --- a/cloud/aws/elasticache/memcached/monitors-memcached.tf +++ b/cloud/aws/elasticache/memcached/monitors-memcached.tf @@ -122,7 +122,7 @@ resource "datadog_monitor" "memcached_free_memory" { query = < ( ${var.cpu_high_threshold_critical} / ${var.core[var.elasticache_size]} ) + ) > ( ${var.cpu_high_threshold_critical} / ${local.core[var.elasticache_size]} ) EOF thresholds { @@ -177,7 +177,7 @@ resource "datadog_monitor" "redis_free_memory" { query = <