From 20a8193accb584b841905d6934e3c42cf1c37f00 Mon Sep 17 00:00:00 2001 From: Paul Bastide Date: Fri, 1 Dec 2023 13:57:13 -0500 Subject: [PATCH] fix: resolve the zone instead of the region Signed-off-by: Paul Bastide --- modules/1_vpc_gateway/files/public_gateway.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/1_vpc_gateway/files/public_gateway.sh b/modules/1_vpc_gateway/files/public_gateway.sh index 2ecd651..322c2fe 100644 --- a/modules/1_vpc_gateway/files/public_gateway.sh +++ b/modules/1_vpc_gateway/files/public_gateway.sh @@ -84,17 +84,17 @@ do if [ -z "${Z1_HAS_PG}" ] && [ "${Z1_COUNT}" != "0" ] && [ "ZONE_${VPC_ZONE}" = "ZONE_${Z1_ZONE}" ] then echo "Adding a public gateway to the zone - ${VPC_ZONE}" - ibmcloud is public-gateway-create ${Z1_ZONE}-z1-gw ${VPC_NAME} ${ZONE} --resource-group-name ${RESOURCE_GROUP} + ibmcloud is public-gateway-create ${REGION}-z1-gw ${VPC_NAME} ${Z1_ZONE} --resource-group-name ${RESOURCE_GROUP} Z1_HAS_PG="true" elif [ -z "${Z2_HAS_PG}" ] && [ "${Z2_COUNT}" != "0" ] && [ "ZONE_${VPC_ZONE}" = "ZONE_${Z2_ZONE}" ] then echo "Adding a public gateway to the zone - ${VPC_ZONE}" - ibmcloud is public-gateway-create ${Z2_ZONE}-z2-gw ${VPC_NAME} ${ZONE} --resource-group-name ${RESOURCE_GROUP} + ibmcloud is public-gateway-create ${REGION}-z2-gw ${VPC_NAME} ${Z2_ZONE} --resource-group-name ${RESOURCE_GROUP} Z2_HAS_PG="true" elif [ -z "${Z3_HAS_PG}" ] && [ "${Z3_COUNT}" != "0" ] && [ "ZONE_${VPC_ZONE}" = "ZONE_${Z3_ZONE}" ] then echo "Adding a public gateway to the zone - ${VPC_ZONE}" - ibmcloud is public-gateway-create ${Z3_ZONE}-z3-gw ${VPC_NAME} ${ZONE} --resource-group-name ${RESOURCE_GROUP} + ibmcloud is public-gateway-create ${REGION}-z3-gw ${VPC_NAME} ${Z3_ZONE} --resource-group-name ${RESOURCE_GROUP} Z3_HAS_PG="true" else echo "ZONE: ${VPC_ZONE} not configured for day-2 workers"