Create project and set region and zone
Google Cloud Platform manages resources using projects, regions, and zones.
Projects are simple containers for artifacts. Regions represent geographic areas. Zones represent a finer area within a region.
- Sign in to cloud.google.com.
- Click Console.
- Open the project dropdown list and click NEW PROJECT.
- Enter a name for the project.
- Optional. Select a Location.
- Click CREATE. It can take several minutes to create a project.
- Select the new project from the project dropdown list.
- Sign in to Google Cloud, entering the appropriate credentials in the browser page that opens:
gcloud auth login
- Create a project:
gcloud project create <project-name>
- Set the project as the default:
gcloud config set project <project-name>
- List all known zones and regions:
gcloud compute zones list
- Specify a default region and zone:
cloud compute project-info add-metadata \ -metadata google-compute-default-region=<region>,google-compute-default-zone <zone>where:
- <region> is one of the regions from the regions list
- <zone> is one of the zones within the region
- Set default region: gcloud config set compute/region <region>
- Set default zone: gcloud config set compute/zone <zone>
You can set a default region and zone for the current account using the following commands:
See Creating and managing projects for more information about using Google Cloud projects.