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 c5aece6 commit 5f98102
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/1_vpc_gateway/files/public_gateway.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ do
then
echo "Adding a public gateway to the zone - ${VPC_ZONE}"
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 '.')

echo "Public Gateway JSON is: " $( echo $PGC_JSON | jq -rc . )
ibmcloud is subnet-update ${SUBNET} --pgw $(echo ${PGC_JSON} | jq -r '.id')
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 5f98102

Please sign in to comment.