This script deletes a list of Google Cloud projects and continues on errors.
It retries transient failures with exponential backoff and logs results to files.
- Iterates over a hardcoded
projects=(...)list - Runs
gcloud projects delete <PROJECT_ID> --quiet - Retries up to
$RETRIEStimes with backoff$BACKOFF_BASE - Skips non-retriable errors (e.g., PERMISSION_DENIED, NOT_FOUND)
- Writes:
deleted_projects.txt— successfully deleted project IDsfailed_projects.txt— failed/skipped IDs with error messages
- Google Cloud SDK (
gcloud) installed and authenticated:gcloud auth login gcloud auth list
MIT License — see LICENSE for details.
MusicTech Lab - Rockstars Developers dedicated to the Music Industry
Website | LinkedIn | Let's talk
Crafted by musictechlab.io
Website | LinkedIn | Let's talk
Crafted by musictechlab.io