Skip to content

Commit 3741987

Browse files
robo-caphyder
authored andcommitted
fix #972 extension module fails when there is no cluster configured
1 parent df9730e commit 3741987

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

module-extensions.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
locals {
55
cluster_private_endpoint = ( var.create_cluster ?
66
coalesce(split(":", lookup(one(module.cluster[*].endpoints), "private_endpoint", ""))...) :
7-
coalesce(split(":", lookup(local.existing_cluster_endpoints, "private_endpoint", ""))...)
7+
( length(local.existing_cluster_endpoints) > 0 ?
8+
coalesce(split(":", lookup(local.existing_cluster_endpoints, "private_endpoint", ""))...):
9+
null
10+
)
811
)
912
}
1013

0 commit comments

Comments
 (0)