Uly.me

cloud engineer

  • Home
  • About
  • Archives
Home/Archives for activate

September 22, 2019

GCP Create Service Account Key

Here’s how to create a key for the GCP Service Account.

Create Key.

gcloud iam service-accounts keys create ~/key.json \
  --iam-account service-name@project-id.iam.gserviceaccount.com

gcloud iam service-accounts keys create ~/key.json \ --iam-account service-name@project-id.iam.gserviceaccount.com

Activate Key

gcloud auth activate-service-account service-name@project-id.iam.gserviceaccount.com \
--key-file=key.json

gcloud auth activate-service-account service-name@project-id.iam.gserviceaccount.com \ --key-file=key.json

Revoke Key.

gcloud auth revoke service-account@project-id.iam.gserviceaccount.com

gcloud auth revoke service-account@project-id.iam.gserviceaccount.com

Delete Key

gcloud iam service-accounts keys delete key-id \
    --iam-account service-name@project-id.iam.gserviceaccount.com

gcloud iam service-accounts keys delete key-id \ --iam-account service-name@project-id.iam.gserviceaccount.com

September 21, 2019

GCloud Interactive Shell

If you already have Google SDK installed, you can activate GCloud Interactive Shell, which is still in beta by the way, by typing the following command from the Google SDK terminal.

gcloud beta interactive

gcloud beta interactive

The interactive shell environment has auto-completion. It shows you who’s logged in and which project you are currently set in. To exit the interactive shell, just Press F9 to quit.

  • Cloud
  • Linux
  • Git

Copyright © 2012–2021