Commit 55278545 authored by Alex Robinson's avatar Alex Robinson

Also delete firewall rules and static IP addresses from stranded GCE LBs

parent 9f80b878
...@@ -24,7 +24,9 @@ result=0 ...@@ -24,7 +24,9 @@ result=0
for x in ${LIST}; do for x in ${LIST}; do
if ! gcloud compute --project=${PROJECT} target-pools get-health "${x}" --region=${REGION} 2>/dev/null >/dev/null; then if ! gcloud compute --project=${PROJECT} target-pools get-health "${x}" --region=${REGION} 2>/dev/null >/dev/null; then
echo DELETING "${x}" echo DELETING "${x}"
gcloud compute --project=${PROJECT} firewall-rules delete "k8s-fw-${x}" -q
gcloud compute --project=${PROJECT} forwarding-rules delete "${x}" --region=${REGION} -q gcloud compute --project=${PROJECT} forwarding-rules delete "${x}" --region=${REGION} -q
gcloud compute --project=${PROJECT} addresses delete "${x}" --region=${REGION} -q
gcloud compute --project=${PROJECT} target-pools delete "${x}" --region=${REGION} -q gcloud compute --project=${PROJECT} target-pools delete "${x}" --region=${REGION} -q
result=1 result=1
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment