diff --git a/k8s-readonly.tf b/k8s-readonly.tf index 674da89..9d5e438 100644 --- a/k8s-readonly.tf +++ b/k8s-readonly.tf @@ -201,10 +201,8 @@ resource "kubernetes_deployment_v1" "apiary_hms_readonly" { } dynamic "env" { - for_each = { - for k, v in var.hms_ro_datanucleus_connection_pool_config : - k => v if v != null - } + for_each = var.hms_ro_datanucleus_connection_pool_config + content { name = env.key value = env.value diff --git a/k8s-readwrite.tf b/k8s-readwrite.tf index 4dc81ae..fca0bf5 100644 --- a/k8s-readwrite.tf +++ b/k8s-readwrite.tf @@ -241,10 +241,8 @@ resource "kubernetes_deployment_v1" "apiary_hms_readwrite" { } dynamic "env" { - for_each = { - for k, v in var.hms_rw_datanucleus_connection_pool_config : - k => v if v != null - } + for_each = var.hms_rw_datanucleus_connection_pool_config + content { name = env.key value = env.value