From 27ed9b06f29a4fc010e16e1523a92ce1882820c8 Mon Sep 17 00:00:00 2001 From: James Blair Date: Wed, 20 Jan 2021 15:09:18 +1300 Subject: [PATCH] Ensure the project gets deleted as well. --- 5-teardown-cloud-resources.sh | 5 +++++ README.org | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/5-teardown-cloud-resources.sh b/5-teardown-cloud-resources.sh index 86160fa..378ff11 100755 --- a/5-teardown-cloud-resources.sh +++ b/5-teardown-cloud-resources.sh @@ -14,5 +14,10 @@ for project in $(gcloud projects list | awk '{ print $1 }' | grep gitlab); do # Delete the instance gcloud compute instances delete --quiet $instance --zone australia-southeast1-a --project $project + done + + # Delete the project as well + gcloud projects delete $project --quiet + done diff --git a/README.org b/README.org index 5a10d7b..9a3df3a 100644 --- a/README.org +++ b/README.org @@ -122,6 +122,11 @@ for project in $(gcloud projects list | awk '{ print $1 }' | grep gitlab); do # Delete the instance gcloud compute instances delete --quiet $instance --zone australia-southeast1-a --project $project + done + + # Delete the project as well + gcloud projects delete $project --quiet + done #+end_src