4
4

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 5 years have passed since last update.

[Terraform] gcp でサービスアカウントを作らずに apply

Posted at

はじめに

タイトル通りです.需要は謎です.ぱっと調べた感じなかったので残します.
ユーザアカウントはあるがterraformのためのサービスアカウントを作る権限が与えられていないという状況です.

ユーザアカウントのキーの居場所

いろいろ探し回ると~/.config/gcloud/legacy_credentials/にありました.これをcredentialsに指定して,あげたらできました.

結論

provider "google" {
  project = "hoge-project"
  credentials = "${file("~/.config/gcloud/legacy_credentials/[user_account]/abc.json")}"
}
4
4
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
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?