From f9ed868d723b7139ae2df8bb17681d65668e1f87 Mon Sep 17 00:00:00 2001 From: Kevin Lefevre Date: Sun, 8 Nov 2020 02:01:32 +0100 Subject: [PATCH] fix(cert-manager): simplify computation logic Signed-off-by: Kevin Lefevre --- cert-manager.tf | 2 +- modules/aws/cert-manager.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cert-manager.tf b/cert-manager.tf index 2d02a946e..d68a6e4f2 100644 --- a/cert-manager.tf +++ b/cert-manager.tf @@ -104,7 +104,7 @@ resource "time_sleep" "cert-manager_sleep" { } resource "kubectl_manifest" "cert-manager_cluster_issuers" { - count = (local.cert-manager["enabled"] ? 1 : 0) * (local.cert-manager["enable_default_cluster_issuers"] ? 1 : 0) * length(data.kubectl_path_documents.cert-manager_cluster_issuers.documents) + count = local.cert-manager["enabled"] && local.cert-manager["enable_default_cluster_issuers"] ? length(data.kubectl_path_documents.cert-manager_cluster_issuers.documents) : 0 yaml_body = element(data.kubectl_path_documents.cert-manager_cluster_issuers.documents, count.index) depends_on = [ helm_release.cert-manager, diff --git a/modules/aws/cert-manager.tf b/modules/aws/cert-manager.tf index cf6d33954..79e410b08 100644 --- a/modules/aws/cert-manager.tf +++ b/modules/aws/cert-manager.tf @@ -158,7 +158,7 @@ resource "time_sleep" "cert-manager_sleep" { } resource "kubectl_manifest" "cert-manager_cluster_issuers" { - count = (local.cert-manager["enabled"] ? 1 : 0) * (local.cert-manager["enable_default_cluster_issuers"] ? 1 : 0) * length(data.kubectl_path_documents.cert-manager_cluster_issuers.documents) + count = local.cert-manager["enabled"] && local.cert-manager["enable_default_cluster_issuers"] ? length(data.kubectl_path_documents.cert-manager_cluster_issuers.documents) : 0 yaml_body = element(data.kubectl_path_documents.cert-manager_cluster_issuers.documents, count.index) depends_on = [ helm_release.cert-manager,