Skip to content

Commit

Permalink
fix #972 extension module fails when there is no cluster configured
Browse files Browse the repository at this point in the history
  • Loading branch information
robo-cap authored and hyder committed Dec 18, 2024
1 parent df9730e commit 3741987
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion module-extensions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
locals {
cluster_private_endpoint = ( var.create_cluster ?
coalesce(split(":", lookup(one(module.cluster[*].endpoints), "private_endpoint", ""))...) :
coalesce(split(":", lookup(local.existing_cluster_endpoints, "private_endpoint", ""))...)
( length(local.existing_cluster_endpoints) > 0 ?
coalesce(split(":", lookup(local.existing_cluster_endpoints, "private_endpoint", ""))...):
null
)
)
}

Expand Down

0 comments on commit 3741987

Please sign in to comment.