1
votes

I'm having trouble getting gcloud to access my project as a service account

  1. Installed the gcloud sdk for Windows on my local machine
  2. Created a new service account on Google Cloud Platform console
  3. Gave the service account the Compute Admin role
  4. Authorized gcloud as the service account: gcloud auth activate-service-account --key-file=keyfile.json
  5. Issued the command gcloud compute zones list

I get the following error:

ERROR: (gcloud.compute.zones.list) Some requests did not succeed:
 - Required 'compute.zones.list' permission for '<project id>'

I verified the Compute Admin role has the proper compute.zones.list permission.

What am I missing?

1

1 Answers

0
votes

I fixed the issue by recreating the service account.

It seems there's a screen that asks about the roles you want the service account to have as you create it. I originally assigned the roles after the fact.