Skip to content

Instantly share code, notes, and snippets.

# Clean up Unused and Orphaned Persistent Disks
# Enable APIs and Clone Repository
gcloud services enable cloudscheduler.googleapis.com
git clone https://github.com/GoogleCloudPlatform/gcf-automated-resource-cleanup.git && cd gcf-automated-resource-cleanup/
export PROJECT_ID=$(gcloud config list --format 'value(core.project)' 2>/dev/null)
WORKDIR=$(pwd)
# Create Persistent Disks
cd $WORKDIR/unattached-pd