From 2a7592d098031b7994719c9de4454462c829bcee Mon Sep 17 00:00:00 2001 From: Georgi Ivanov Date: Mon, 23 Sep 2024 17:10:02 +0100 Subject: [PATCH] names are singular due to: https://github.com/hashicorp/terraform-provider-kubernetes/issues/2066 --- k8s-readonly.tf | 20 ++++++++++---------- k8s-readwrite.tf | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/k8s-readonly.tf b/k8s-readonly.tf index a1122b7..da0a238 100644 --- a/k8s-readonly.tf +++ b/k8s-readonly.tf @@ -43,13 +43,13 @@ resource "kubernetes_deployment_v1" "apiary_hms_readonly" { service_account_name = kubernetes_service_account_v1.hms_readonly[0].metadata.0.name automount_service_account_token = true - dynamic "tolerations" { + dynamic "toleration" { for_each = var.hms_ro_tolerations content { - effect = lookup(tolerations.value, "effect", null) - key = lookup(tolerations.value, "key", null) - operator = lookup(tolerations.value, "operator", null) - value = lookup(tolerations.value, "value", null) + effect = lookup(toleration.value, "effect", null) + key = lookup(toleration.value, "key", null) + operator = lookup(toleration.value, "operator", null) + value = lookup(toleration.value, "value", null) } } @@ -58,13 +58,13 @@ resource "kubernetes_deployment_v1" "apiary_hms_readonly" { content { node_affinity { required_during_scheduling_ignored_during_execution { - dynamic "node_selector_terms" { - for_each = lookup(affinity.value, "node_selector_terms", []) + dynamic "node_selector_term" { + for_each = lookup(affinity.value, "node_selector_term", []) content { match_expressions { - key = lookup(node_selector_terms.value, "key", null) - operator = lookup(node_selector_terms.value, "operator", null) - values = lookup(node_selector_terms.value, "values", []) + key = lookup(node_selector_term.value, "key", null) + operator = lookup(node_selector_term.value, "operator", null) + values = lookup(node_selector_term.value, "values", []) } } } diff --git a/k8s-readwrite.tf b/k8s-readwrite.tf index 97bc6e1..aee28f6 100644 --- a/k8s-readwrite.tf +++ b/k8s-readwrite.tf @@ -43,13 +43,13 @@ resource "kubernetes_deployment_v1" "apiary_hms_readwrite" { service_account_name = kubernetes_service_account_v1.hms_readwrite[0].metadata.0.name automount_service_account_token = true - dynamic "tolerations" { + dynamic "toleration" { for_each = var.hms_rw_tolerations content { - effect = lookup(tolerations.value, "effect", null) - key = lookup(tolerations.value, "key", null) - operator = lookup(tolerations.value, "operator", null) - value = lookup(tolerations.value, "value", null) + effect = lookup(toleration.value, "effect", null) + key = lookup(toleration.value, "key", null) + operator = lookup(toleration.value, "operator", null) + value = lookup(toleration.value, "value", null) } } @@ -58,13 +58,13 @@ resource "kubernetes_deployment_v1" "apiary_hms_readwrite" { content { node_affinity { required_during_scheduling_ignored_during_execution { - dynamic "node_selector_terms" { - for_each = lookup(affinity.value, "node_selector_terms", []) + dynamic "node_selector_term" { + for_each = lookup(affinity.value, "node_selector_term", []) content { match_expressions { - key = lookup(node_selector_terms.value, "key", null) - operator = lookup(node_selector_terms.value, "operator", null) - values = lookup(node_selector_terms.value, "values", []) + key = lookup(node_selector_term.value, "key", null) + operator = lookup(node_selector_term.value, "operator", null) + values = lookup(node_selector_term.value, "values", []) } } }