3
1

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.

GCPでIAMメンバーに付与した役割を確認したい

3
Posted at

背景

  • GUIで取り急ぎIAMメンバーに追加した役割をTerraformにリバースしたい
  • roleのところの記載名を知りたい(ex. roles/bigquery.user)
  • 役割一覧に登場しない(ex. Dataproc サービス エージェント)
  • そうだ、gcloudコマンドでrole一覧取得しよう

叩いたコマンド

gcloud projects get-iam-policy ${project_no}  \
--flatten="bindings[].members" \
--format='table(bindings.role)' \
--filter="bindings.members:${service_account}"

ちなみに

  • Dataproc サービス エージェントは、 roles/dataproc.serviceAgent でした
3
1
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
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?