I want to run gcloud from inside a GCE VM that's using VM-metadata controlled scopes, since otherwise gcloud installed on a local machine will typically already be using broad scopes to include all GCP operations.

I tried to adjust the scope like described over here:


But unfortunately

gcloud alpha compute instances set-scopes cloud-platform --zone=europe-north1-a

results in

ERROR: (gcloud.alpha.compute.instances.set-scopes) Could not fetch resource:
         - Required 'Alpha Access' permission for 'Compute API'

Does anyone has an idea on how to activate this 'Alpha Access' permission for the 'Compute API'?


The reason why you are seeing this error is that the “Compute API” is an Alpha feature. An Alpha feature can only be used by a project that has been white listed. As this article also describe at the end paragraph, this command is currently in ALPHA.

However, the same gcloud command line is currently available on beta as the gcloud command line is provided into this article last paragraph under "NOTES" section. I have also run the following gcloud command line and it is working correctly:

“$ gcloud beta compute instances set-scopes cloud-platform --zone=europe-north1-a”

In this situation, I would recommend you to try the same gcloud command line with beta version to see if this works for you or not?

In addition to it, Just to clarify for future readers: Alpha products are usually not available to the general public as they are in an early testing phase and usually require specific agreements with Google, for testing specific features, and are often directly supported by the engineering team building the feature. "Usually" because there are sometimes a few features made available publicly in Alpha.

If you have not been contacted about an Alpha program by a Google employee, you probably won't have access. Once invited to an Alpha, it is true that API access is controlled through the "whitelisting" mechanism described earlier.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.