Gcloud command, can't specify "cloud-platform" scope when creating instance templates

So I have a command like this that should create the instance template and give it the "cloud-platform" scope (which should give full access according to docs):

gcloud compute instance-templates create "webserver-template"\
 --source-instance=webserver --source-instance-zone=us-east4-c\
 --network=vpc-dev --scopes cloud-platform

However, GCP seems to ignore that scope and assigns the default ones instead. Am I missing something here? I did go to an instance template in the GCP UI and created a new one based on it, and specified the option to "Allow full access to all Cloud APIs". When I then use gcloud to describe that template, the scope is "cloud-platform" as it should be. I just can't figure out how to do it all in one gcloud command.

1 answer

  • answered 2021-07-26 20:08 John Hanley

    The problem is the scopes command-line option. Change to


How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum