-
Notifications
You must be signed in to change notification settings - Fork 0
/
clean.sh
32 lines (24 loc) · 957 Bytes
/
clean.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
set -e
#export PROJECT_ID=speedy-victory-336109
#export REGION=asia-east1
if [ ! $PROJECT_ID ]; then
echo "please set PROJECT_ID"
exit 1
fi
if [ ! $REGION ]; then
echo "please set REGION"
exit 1
fi
gcloud run services delete litellm-proxy-001 --project=${PROJECT_ID} --region=${REGION} --quiet
gcloud secrets delete litellm-config --project=${PROJECT_ID} --quiet
gcloud projects remove-iam-policy-binding ${PROJECT_ID} \
--member=serviceAccount:litellmsa@${PROJECT_ID}.iam.gserviceaccount.com \
--role='roles/aiplatform.user' \
--condition=None > /dev/null
gcloud projects remove-iam-policy-binding ${PROJECT_ID} \
--member=serviceAccount:litellmsa@${PROJECT_ID}.iam.gserviceaccount.com \
--role='roles/secretmanager.secretAccessor' \
--condition=None > /dev/null
gcloud iam service-accounts delete litellmsa@${PROJECT_ID}.iam.gserviceaccount.com \
--project=${PROJECT_ID} --quiet > /dev/null