Tuesday, May 2, 2017

How To Access Google Cloud



let's take a quick look at how to create anduse service accounts. service accounts are used when you want to authenticate machines,such as compute engine vms, to use other google cloud services. to create a service account,go to the permissions page. go to the "service accounts" tab, and click "create service account."give your new service account a name, and make sure you furnish a new private key. keepthis key safe, as you cannot download it again.


How To Access Google Cloud, let's go to the "permissions" tab to lockdown this service account. search for your service account, and then click role(s). ionly want this service account to create disks and snapshots, so i'm gonna remove the "editor"role and add the "compute storage admin" role instead. in my compute engine instance, i'vealready copied my private key over. in this


example, i'm going to use the gcloud to createa snapshot. use the service account email and key file with the "activate-service-account"command. now use "gcloud init" to configure gcloud to use our new service account. thisservice account only has compute storage admin scope. if we try to create a new instance,it will fail, but if we try to create a new disk, it will work fine!


No comments:

Post a Comment

Up