Skip to content

musictechlab/mtl-gcloud-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

cleanup.sh — Delete multiple GCP projects (and keep going)

Built by MusicTech Lab

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 <PROJECT_ID> --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:
    gcloud auth login
    gcloud auth list

License

MIT License — see LICENSE for details.


MusicTech Lab - Rockstars Developers dedicated to the Music Industry
Website | LinkedIn | Let's talk
Crafted by musictechlab.io

About

Shell utilities for bulk-deleting Google Cloud projects with retries and logging.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages