gcloud-*: add pages (#11625)
* gcloud-*: add pages --------- Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
This commit is contained in:
29
pages/common/gcloud-iam.md
Normal file
29
pages/common/gcloud-iam.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# gcloud iam
|
||||
|
||||
> Configure Identity and Access Management (IAM) preferences and service accounts.
|
||||
> See also: `gcloud`.
|
||||
> More information: <https://cloud.google.com/sdk/gcloud/reference/iam>.
|
||||
|
||||
- List IAM grantable roles for a resource:
|
||||
|
||||
`gcloud iam list-grantable-roles {{resource}}`
|
||||
|
||||
- Create a custom role for a organization or project:
|
||||
|
||||
`gcloud iam roles create {{role_name}} --{{organization|project}} {{organization|project_id}} --file {{path/to/role.yaml}}`
|
||||
|
||||
- Create a service account for a project:
|
||||
|
||||
`gcloud iam service-accounts create {{name}}`
|
||||
|
||||
- Add an IAM policy binding to a service account:
|
||||
|
||||
`gcloud iam service-accounts add-iam-policy-binding {{service_account_email}} --member {{member}} --role {{role}}`
|
||||
|
||||
- Replace existing IAM policy binding:
|
||||
|
||||
`gcloud iam service-accounts set-iam-policy {{service_account_email}} {{policy_file}}`
|
||||
|
||||
- List a service account's keys:
|
||||
|
||||
`gcloud iam service-accounts keys list --iam-account {{service_account_email}}`
|
Reference in New Issue
Block a user