Skip to content

Commit 02ac018

Browse files
committed
Add additional echos for debugging
1 parent 6dc68d7 commit 02ac018

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/scripts/create-and-setup-gcp-vm.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,17 @@ gcloud compute instances create "${RESOURCE_NAME}" --project="${GKE_PROJECT}" --
4545

4646
# Add VM IP to GKE master control node access, if required
4747
if [ "${ADD_VM_IP_AUTH_NETWORKS}" = "true" ]; then
48+
NETWORK_INTERFACES=$(gcloud compute instances describe "${RESOURCE_NAME}" --project="${GKE_PROJECT}" --zone="${GKE_CLUSTER_ZONE}" \
49+
--format='value(networkInterfaces)')
50+
ACCESS_CONFIGS=$(gcloud compute instances describe "${RESOURCE_NAME}" --project="${GKE_PROJECT}" --zone="${GKE_CLUSTER_ZONE}" \
51+
--format='value(networkInterfaces[0].accessConfigs)')
4852
EXTERNAL_IP=$(gcloud compute instances describe "${RESOURCE_NAME}" --project="${GKE_PROJECT}" --zone="${GKE_CLUSTER_ZONE}" \
4953
--format='value(networkInterfaces[0].accessConfigs[0].natIP)')
54+
55+
echo "Network interfaces of the VM are: ${NETWORK_INTERFACES}"
56+
echo "Access configs of the VM are: ${ACCESS_CONFIGS}"
5057
echo "External IP of the VM is: ${EXTERNAL_IP}"
58+
5159
CURRENT_AUTH_NETWORK=$(gcloud container clusters describe "${GKE_CLUSTER_NAME}" --zone="${GKE_CLUSTER_ZONE}" \
5260
--format="value(masterAuthorizedNetworksConfig.cidrBlocks[0])" | sed 's/cidrBlock=//')
5361
echo "Current GKE master authorized networks: ${CURRENT_AUTH_NETWORK}"

0 commit comments

Comments
 (0)