Skip to content

Commit

Permalink
add: auto switch to the correct project
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisVLRT committed May 7, 2021
1 parent 9422d27 commit 55f773e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bin/set_project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 55f773e

Please sign in to comment.