Skip to content

Commit

Permalink
fix: update the subnet with the public gateway
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 2, 2023
1 parent 20a8193 commit cf0dd90
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/1_vpc_gateway/files/public_gateway.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ 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 ${REGION}-z1-gw ${VPC_NAME} ${Z1_ZONE} --resource-group-name ${RESOURCE_GROUP}
PGC_JSON=$(ibmcloud is public-gateway-create ${REGION}-z1-gw ${VPC_NAME} ${Z1_ZONE} --resource-group-name ${RESOURCE_GROUP} --output json)
echo $PGC_JSON
ibmcloud is subnet-update ${SUBNET} --pgw $(echo ${PGC_JSON} | jq -r '.')
Z1_HAS_PG="true"
elif [ -z "${Z2_HAS_PG}" ] && [ "${Z2_COUNT}" != "0" ] && [ "ZONE_${VPC_ZONE}" = "ZONE_${Z2_ZONE}" ]
then
Expand Down

0 comments on commit cf0dd90

Please sign in to comment.