Skip to content

Commit 91f8e47

Browse files
committed
Add firewall rules for VPC
1 parent 8300b7e commit 91f8e47

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/scripts/create-gke-cluster.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ if [ "${IPV6_ENABLE}" = "true" ]; then
2929
--ipv6-access-type=EXTERNAL \
3030
--region=${GKE_CLUSTER_REGION}
3131

32+
gcloud compute firewall-rules create ${GKE_CLUSTER_NAME}-firewall --network ${GKE_CLUSTER_NAME}-network --allow tcp:22,tcp:3389,icmp
33+
3234
echo "Deleting subnet ${GKE_CLUSTER_NAME}-subnet (if exists)..."
3335
gcloud compute networks subnets delete ${GKE_CLUSTER_NAME}-subnet --region=${GKE_CLUSTER_REGION} --quiet || true
3436
echo "Deleting network ${GKE_CLUSTER_NAME}-network (if exists)..."
3537
gcloud compute networks delete ${GKE_CLUSTER_NAME}-network --quiet || true
38+
echo "Deleting firewall rule ${GKE_CLUSTER_NAME}-firewall (if exists)..."
39+
gcloud compute firewall-rules delete ${GKE_CLUSTER_NAME}-firewall --quiet || true
3640
fi
3741

3842
gcloud container clusters create "${GKE_CLUSTER_NAME}" \

0 commit comments

Comments
 (0)