Reputation: 12650
How can I find out from the command line of a Google Cloud Engine (GCE) VM instance which access scopes the instance possesses?
Upvotes: 5
Views: 3714
Reputation: 26458
You can retrieve it from the metadata server, run the command from within the VM instance:
curl "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/?recursive=true" -H "Metadata-Flavor: Google"
Scopes are in the serviceAccounts property of instances.
Upvotes: 9