Skip to content

Commit

Permalink
fix(cert-manager): simplify computation logic
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Lefevre <[email protected]>
  • Loading branch information
ArchiFleKs committed Nov 8, 2020
1 parent 1dbe16c commit f9ed868
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cert-manager.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion modules/aws/cert-manager.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f9ed868

Please sign in to comment.