Helpful gCloud Commands
At the Org Level - LIST all Enabled Org Policies
gcloud beta resource-manager org-policies list --organization=blah blah > allpolicies.txt
IAM Bindings at the org level
gcloud organizations get-iam-policy org-id
To get your ADC (App Default Credentials)
gcloud auth application-default login
To get project metadata
gcloud projects describe projectid
gcloud compute project-info describe --project project-id
More Project Related Commands
List projects | gcloud config list , gcloud config list project |
Show project info | gcloud compute project-info describe |
Switch project | gcloud config set project <project-id> |
IAM - To create a service account and a key to use the SA
gcloud iam service-accounts create my-account
gcloud iam service-accounts keys create key.json
--iam-account=my-account@my-project.iam.gserviceaccount.comexport GOOGLE_APPLICATION_CREDENTIALS=key.json
./my_application.sh
More IAM Related Commands
Authenticate client | gcloud auth activate-service-account --key-file <key-file> |
Display a list of credentialed accounts | gcloud auth list |
Set the active account | gcloud config set account <ACCOUNT> |
SSH keys to connect to VMs
Download and instally puttyGen. Edit your System PATH variable to contain the path to puttyGen.exe
ssh-keygen -t rsa -C "[email protected]"
Leave a Reply