https://github.com/musictechlab/mtl-gcloud-utils
Shell utilities for bulk-deleting Google Cloud projects with retries and logging.
https://github.com/musictechlab/mtl-gcloud-utils
devops gcloud google-cloud shell
Last synced: about 13 hours ago
JSON representation
Shell utilities for bulk-deleting Google Cloud projects with retries and logging.
- Host: GitHub
- URL: https://github.com/musictechlab/mtl-gcloud-utils
- Owner: musictechlab
- License: mit
- Created: 2025-10-14T08:57:11.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2026-05-29T15:30:15.000Z (about 1 month ago)
- Last Synced: 2026-05-29T17:05:40.015Z (about 1 month ago)
- Topics: devops, gcloud, google-cloud, shell
- Language: Shell
- Size: 12.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# cleanup.sh — Delete multiple GCP projects (and keep going)
[](https://musictechlab.io)
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.
## What it does
- Iterates over a hardcoded `projects=(...)` list
- Runs `gcloud projects delete --quiet`
- Retries up to `$RETRIES` times with backoff `$BACKOFF_BASE`
- Skips non-retriable errors (e.g., **PERMISSION_DENIED**, **NOT_FOUND**)
- Writes:
- `deleted_projects.txt` — successfully deleted project IDs
- `failed_projects.txt` — failed/skipped IDs with error messages
## Prerequisites
- Google Cloud SDK (`gcloud`) installed and authenticated:
```bash
gcloud auth login
gcloud auth list
```
## License
MIT License — see [LICENSE](LICENSE) for details.
---
MusicTech Lab - Rockstars Developers dedicated to the Music Industry
Website
|
LinkedIn
|
Let's talk
Crafted by musictechlab.io