t3-code-android-nightly/.repos/alchemy-effect/scripts/nuke-gcp.sh
Julius Marminge 6f9cea00ae
chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 13:22:30 -07:00

18 lines
756 B
Bash
Executable file

# Account-wide teardown for GCP resources stamped with alchemy-* labels.
# Requires GOOGLE_PROJECT_ID and either GOOGLE_ACCESS_TOKEN or
# GOOGLE_APPLICATION_CREDENTIALS (a service-account JSON key).
set -euo pipefail
if [ -z "${GOOGLE_PROJECT_ID:-}" ] && [ -f "${HOME}/.config/gcloud/alchemy-project-id" ]; then
export GOOGLE_PROJECT_ID="$(cat "${HOME}/.config/gcloud/alchemy-project-id")"
fi
if [ -z "${GOOGLE_APPLICATION_CREDENTIALS:-}" ] && [ -f "${HOME}/.config/gcloud/alchemy-testing-sa.json" ]; then
export GOOGLE_APPLICATION_CREDENTIALS="${HOME}/.config/gcloud/alchemy-testing-sa.json"
fi
bun alchemy unsafe nuke --config ./stacks/nuke-gcp.ts \
--include 'GCP.*' \
--profile alchemy-testing \
--concurrency 16 \
--timeout 300 \
"$@"