0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

gcloud CLI と Google APIs Client Libraries の使う Credential の違い

Posted at

4種類ある。 terraform apply は Google APIs Client Libraries を使っているので注意。

(1) gloud CLI

(1-1) IAM のユーザーアカウントで。

gcloud auth login

(1-2) IAM のサービスアカウントで。

gcloud auth activate-service-account

(2) Google APIs Client Libraries

(2-1) IAM のユーザーアカウントで。

gcloud auth application-default login
# ~/.config/gcloud/application_default_credentials.json に入る

確認

gcloud auth list

logout

gcloud auth application-default revoke

(2-2) IAM のサービスアカウントで。

export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service_account_credential.json
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?