Skip to content

Commit 23a24c9

Browse files
authored
fix: modified logic to handle csi-driver addon bug (#528)
1 parent fd7caaa commit 23a24c9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

main.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,13 +473,11 @@ locals {
473473
# get the addons and their versions and create an addons map including the corresponding csi_driver_version
474474
addons = merge(
475475
{ for addon_name, addon_version in(var.addons != null ? var.addons : {}) : addon_name => addon_version if addon_version != null },
476-
local.csi_driver_version != null ? { vpc-block-csi-driver = local.csi_driver_version[0] } : {}
476+
length(local.csi_driver_version) > 0 ? { vpc-block-csi-driver = local.csi_driver_version[0] } : {}
477477
)
478478
}
479479

480-
481480
resource "ibm_container_addons" "addons" {
482-
483481
# Worker pool creation can start before the 'ibm_container_vpc_cluster' completes since there is no explicit
484482
# depends_on in 'ibm_container_vpc_worker_pool', just an implicit depends_on on the cluster ID. Cluster ID can exist before
485483
# 'ibm_container_vpc_cluster' completes, so hence need to add explicit depends on against 'ibm_container_vpc_cluster' here.

0 commit comments

Comments
 (0)