Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service AccountはどこのProjectに存在するのか? #118

Open
sinmetal opened this issue Jan 16, 2020 · 1 comment
Open

Service AccountはどこのProjectに存在するのか? #118

sinmetal opened this issue Jan 16, 2020 · 1 comment
Assignees

Comments

@sinmetal
Copy link
Member

WHAT

GCP上で自動的に作られるService Accountは、ものによって所属するProjectが異なる。
自分のProjectに存在するものは、secret.jsonが作成できるが、外のProjectにいるものは作れない。

自分のProjectにいるものの例

  • App Engine Default Service Account
  • Compute Engine Default Service Account

外のProjectにいるものの例

  • Cloud Build Service Account

WHY

Cloud Build Service Accountのsecret.json作れるの?という質問をされたので、あー、なるほどねーって気持ちになったから

@sinmetal sinmetal self-assigned this Jan 16, 2020
@sinmetal
Copy link
Member Author

ちなみに作ろうとするとないよ!って言われる

gcloud iam service-accounts keys create ~/sinmetal-lab-cloudbuild-key.json \                                                                                                                                                                                         
  --iam-account [email protected] --project sinmetal-lab

ERROR: (gcloud.iam.service-accounts.keys.create) NOT_FOUND: Service account projects/-/serviceAccounts/[email protected] does not exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant