From 55f773e485aec812bc279fa2bf688d5bdcfe7ef1 Mon Sep 17 00:00:00 2001 From: alexisVLRT Date: Fri, 7 May 2021 16:19:25 +0200 Subject: [PATCH] add: auto switch to the correct project --- bin/set_project.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/set_project.sh b/bin/set_project.sh index e551592..07d42a4 100755 --- a/bin/set_project.sh +++ b/bin/set_project.sh @@ -28,6 +28,7 @@ echo PROJECT_ID="$(echo "$PROJECT_LIST" | jq -r --argjson NUMERIC_CHOICE "$(( NUMERIC_CHOICE - 1 ))" '.[$NUMERIC_CHOICE].projectId')" PROJECT_NUMBER=$(gcloud --format json projects describe "$PROJECT_ID" | jq '.["projectNumber"]' | tr -d '"') +gcloud config set project "$PROJECT_ID" ./save_var.sh TF_VAR_project_id "$PROJECT_ID" ./save_var.sh TF_VAR_project_number "$PROJECT_NUMBER" ./save_var.sh TF_VAR_backend_bucket "$PROJECT_ID-$PROJECT_NUMBER-ocmlf-state" \ No newline at end of file