All Google Compute Engine resources belong to a project. Projects form the basis for enabling and using the Google Compute Engine service, including managing resources, enabling billing, adding and removing collaborators and enabling other Google services.
A Project resource is the root collection and settings resource for all Google Compute Engine resources.
The Project resource is created using the Google Developers Console when you activate Google Compute Engine for a project. Some Compute Engine administration tasks can only be done from the Developers Console such as adding team members, listing projects, and setting access control to the service.
You must have read, write, or owner permissions on a project to be able to use
gcloud compute. You do not need to be a project member to be able to ssh into an
instance and manage it; however, if you do not have write permissions on a
project you must use
ssh directly, not using
gcloud compute ssh.
gcloud compute commands:
gcloud compute project-info describe
gcloud compute project-info add-metadata
gcloud config set project PROJECT
The last command sets a default project.
Getting Project Information
You can get information about a project, such as the different quota usage
amounts and limits, by running the command
which returns information similar to the following:
$ gcloud compute project-info describe commonInstanceMetadata: fingerprint: 6GCr7A6I_3Y= items: - key: custom-metadata value: '1234' - key: sshKeys value: 'user:ssh-rsa AAAAB3NzaC1yc2EA...' kind: compute#metadata creationTimestamp: '2013-09-06T10:36:53.505-07:00' description: '' id: '574734885120952459' kind: compute#project name: my-project quotas: - limit: 1000.0 metric: SNAPSHOTS usage: 0.0 - limit: 5.0 metric: NETWORKS usage: 1.0 - limit: 100.0 metric: FIREWALLS usage: 7.0 ... selfLink: https://www.googleapis.com/compute/v1/projects/my-project
- This flag is required if you do not have a default project defined. To check
if a default project is defined, run
gcloud config list. If a default project is defined, you can use this flag to specify a different project.
For more information, run
gcloud compute project-info --help or see the
reference documentation for the