gcloud-*: update pages

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
This commit is contained in:
K.B.Dharun Krishna 2023-12-04 10:25:45 +05:30
parent f4bd1493ff
commit 186d76e4fe
No known key found for this signature in database
GPG Key ID: 1B8ECA406788AFA4
4 changed files with 27 additions and 61 deletions

View File

@ -1,28 +1,29 @@
# gcloud iam
> Configure Identity and Access Management (IAM) preferences and service accounts.
> More information: <https://cloud.google.com/sdk/docs/cheatsheet#iam>.
> 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`
`gcloud iam list-grantable-roles {{resource}}`
- Create a custom role for a project or organization:
- Create a custom role for a organization or project:
`gcloud iam roles create`
`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`
`gcloud iam service-accounts create {{name}}`
- Add an IAM policy binding to a service account:
`gcloud iam service-accounts add-iam-policy-binding`
`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-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`
`gcloud iam service-accounts keys list --iam-account {{service_account_email}}`

View File

@ -1,20 +0,0 @@
# gcloud cli miscellaneous commands
> Commands that might come in handy.
> More information: <https://cloud.google.com/sdk/docs/cheatsheet#miscellaneous>.
- Decrypt ciphertext (to a plaintext file) using a Cloud Key Management Service key:
`gcloud kms decrypt`
- List your project's logs:
`gcloud logging logs list`
- Display info about a Cloud SQL instance backup:
`gcloud sql backups describe`
- Export data from a Cloud SQL instance to a SQL file:
`gcloud sql export sql`

View File

@ -1,12 +1,25 @@
# gcloud projects
> Manage project access policies.
> More information: <https://cloud.google.com/sdk/docs/cheatsheet#projects>.
> Manage project access policies in Google Cloud.
> See also: `gcloud`.
> More information: <https://cloud.google.com/sdk/gcloud/reference/projects>.
- Display metadata for a project (including its ID):
- Create a new project:
`gcloud projects describe`
`gcloud projects create {{project_id|project_number}}`
- List all active projects:
`gcloud projects list`
- Display metadata for a project:
`gcloud projects describe {{project_id}}`
- Delete a project:
`gcloud projects delete {{project_id|project_number}}`
- Add an IAM policy binding to a specified project:
`gcloud projects add-iam-policy-binding`
`gcloud projects add-iam-policy-binding {{project_id}} --member {{principal}} --role {{role}}`

View File

@ -1,28 +0,0 @@
# gcloud getting started
> Get going with the gcloud CLI.
> More information: <https://cloud.google.com/sdk/docs/cheatsheet#getting_started>.
- Initialize, authorize, and configure the gcloud CLI:
`gcloud init`
- Display version and installed components:
`gcloud version`
- Install specific components:
`gcloud components install`
- Update your gcloud CLI to the latest version:
`gcloud components update`
- Set a default Google Cloud project to work on:
`gcloud config set project`
- Display current gcloud CLI environment details:
`gcloud info`