mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-02-12 07:41:43 +00:00
23 lines
503 B
Bash
Executable File
23 lines
503 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Copyright 2020-2024 the Pinniped contributors. All Rights Reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
set -euo pipefail
|
|
|
|
gcloud auth activate-service-account \
|
|
"$GCP_USERNAME" \
|
|
--key-file <(echo "$GCP_JSON_KEY") \
|
|
--project "$GCP_PROJECT"
|
|
|
|
INSTANCE_NAME=$(cat kind-cluster-pool/name)
|
|
|
|
echo "Removing $INSTANCE_NAME in $INSTANCE_ZONE..."
|
|
|
|
gcloud compute instances delete "${INSTANCE_NAME}" \
|
|
--zone "${INSTANCE_ZONE}" \
|
|
--delete-disks all \
|
|
--quiet
|
|
|
|
echo "Done!"
|