# The next line updates PATH for the Google Cloud SDK. if [ -f '/home/username/google-cloud-sdk/path.bash.inc' ]; then . '/home/username/google-cloud-sdk/path.bash.inc'; fi
# The next line enables shell command completion for gcloud. if [ -f '/home/username/google-cloud-sdk/completion.bash.inc' ]; then . '/home/username/google-cloud-sdk/completion.bash.inc'; fi
// 完了後、設定を確認 $ gcloud config list [compute] region = asia-northeast2 zone = asia-northeast2-a [core] account = xxxxxxx@gmail.com disable_usage_reporting = True project = project-1
Your active configuration is: [default]
プロジェクトが1つしかない場合はここで終わりです
初期設定: ログインする(2つめのプロジェクト)
もう一度、 gcloud initを実行して、 [2] Create a new configurationを選択します
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
$ gcloud init --console-only Welcome! This command will take you through the configuration of gcloud.
Settings from your current configuration [default] are: compute: region: asia-northeast2 zone: asia-northeast2-a core: account: xxxxxxx@gmail.com disable_usage_reporting: 'True' project = project-1
Pick configuration to use: [1] Re-initialize this configuration [default] with new settings [2] Create a new configuration Please enter your numeric choice: 2