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.

  1. Sign in to cloud.google.com.
  2. Click Console.
  3. Open the project dropdown list and click NEW PROJECT.
  4. Enter a name for the project.
  5. Optional. Select a Location.
  6. Click CREATE. It can take several minutes to create a project.
  7. Select the new project from the project dropdown list.
  1. Sign in to Google Cloud, entering the appropriate credentials in the browser page that opens:

    gcloud auth login

  2. Create a project:

    gcloud project create <project-name>

  3. Set the project as the default:

    gcloud config set project <project-name>

  4. List all known zones and regions:

    gcloud compute zones list

  5. 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
    • You can set a default region and zone for the current account using the following commands:

      • Set default region: gcloud config set compute/region <region>
      • Set default zone: gcloud config set compute/zone <zone>

Reference

See Creating and managing projects for more information about using Google Cloud projects.