Skip to content

Commit

Permalink
fix: resolve the zone instead of the region
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
  • Loading branch information
prb112 committed Dec 1, 2023
1 parent 89e4b3c commit 20a8193
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/1_vpc_gateway/files/public_gateway.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 20a8193

Please sign in to comment.