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 an 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, and enter the appropriate credentials in the browser page that appears:

    gcloud auth login

  2. Run this command to create a project. Replace <project-name> with the name of the project:

    gcloud project create <project-name>

  3. Run this command to set the project as the default project. Replace <project-name> with the name of the project:

    gcloud config set project <project-name>

  4. Run this command to list all known zones and regions:

    gcloud compute zones list

  5. Specify a default region and zone. Replace <region> with the name of the default region from the regions list, and <zone> with the name of the default zone:

    cloud compute project-info add-metadata \ -metadata google-compute-default-region=<region>,google-compute-default-zone <zone>

  6. Run this command to specify a default region for the current account. Replace <region> with the name of the default region from the regions list:

    gcloud config set compute/region <region>

  7. Run this command to specify a default zone for the current account: Replace <zone> with the name of the default zone:

    gcloud config set compute/zone <zone>

Reference

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