...
1#!/usr/bin/env bash
2
3# This script aims to reduce the amount of time you have to spend in the
4# GCP console by allowing you to search through projects and select one
5# to make active. Must have both gcloud and fzf installed. You can copy
6# this script into path and adjust the script name and even remove `.sh`
7# because of the shebang at the top.
8
9gcloud projects list | \
10 awk '{print $1, "\t", $2}' | \
11 tail -n+2 | \
12 fzf | \
13 cut -d' ' -f1 | \
14 xargs -I '{}' gcloud config set project {}
View as plain text