Create projects

Projects are the fundamental operating unit in the Google Cloud resource hierarchy. Projects exist between folders (or the organization) and resources such as virtual machines and storage. This page explains how to create Google Cloud projects using the Cloud Resource Manager API and the Google Cloud console.

Key characteristics of projects include the following:

  • The primary service container: A project is the base level where all Google Cloud services (APIs) are enabled and where resources like Compute Engine instances or BigQuery datasets are created.

  • The trust boundary: Projects serve as an isolation layer. By default, resources in one project don't have access to resources in another, establishing a secure perimeter for different applications or environments.

  • The billing unit: Projects are the primary way businesses track, organize, and separate costs across their organization.

  • The policy attachment point: While policies often inherit from folders, the project level is the most common place where specific permissions ( Identity and Access Management (IAM)) are granted to developers and service accounts for daily tasks.

Before you begin

Read about the project resource in the resource hierarchy overview. For guidance on setting up your resource hierarchy, see Decide a resource hierarchy for your Google Cloud landing zone.

The following identifiers are used for your project:

  • Project name: A human-readable name for your project.

    The project name has the following requirements:

    • It must be 4 to 30 characters in length.
    • It can contain letters, numbers, single quotes, hyphens, spaces, or exclamation points.
    • It must end with a letter or a digit.

    The project name isn't used by any Google APIs. You can edit the project name at any time during or after project creation. Project names don't need to be unique.

  • Project ID: A globally unique identifier for your project.

    A project ID is a unique string that differentiates your project from all others in Google Cloud. After you enter a project name, the Google Cloud console generates a unique project ID that can be a combination of letters, numbers, and hyphens. Use the generated project ID, but you can edit it during project creation. After project creation, the project ID is permanent.

    A project ID has the following requirements:

    • It must be 6 to 30 characters in length.
    • It can only contain lowercase letters, numbers, and hyphens.
    • It must start with a letter.
    • It cannot end with a hyphen.
    • It cannot be in use or previously used; this includes deleted projects.
    • It cannot contain restricted strings such as google and ssl. Avoid using strings such as undefined and null in a project ID.

  • Project number: A project number is an automatically generated unique identifier for your project. To find the project number, see Identifying projects.

Don't include sensitive information, for example, personally identifiable information or security data, in your project name, project ID, or other resource names. The project ID appears in the name of many other Google Cloud resources. Referencing the project or its resources exposes the project ID and resource name.

Create a project

To create a project, you must have the resourcemanager.projects.create permission. This permission is included in roles like the Project Creator role (roles/resourcemanager.projectCreator).

The Project Creator role is granted by default to the entire domain of a new organization resource and to free trial users.

For information on how to grant individuals the role and limit organization-resource wide access, see the Managing Default Organization Roles page.

If you don't specify the parent resource, a parent resource is selected automatically if applicable based on the user account's domain.

You can create a new project using the Google Cloud console, the Google Cloud CLI, or the projects.create() method.

Console

To create a new project, do the following:

  1. Go to the Manage resources page in the Google Cloud console.

    Go to Manage Resources

    The remaining steps appear in the Google Cloud console.

  2. Click Create project.
  3. In the New project window that appears, enter a project name and select a billing account as applicable. A project name can contain only letters, numbers, single quotes, hyphens, spaces, or exclamation points, and must be between 4 and 30 characters.
  4. Enter the parent organization or folder resource in the Parent resource box. That resource will be the hierarchical parent of the new project. If No organization is an option, you can select it to create your new project as the top level of its own resource hierarchy.
  5. When you're finished entering new project details, click Create.

gcloud

  1. In the Google Cloud console, activate Cloud Shell.

    Activate Cloud Shell

    At the bottom of the Google Cloud console, a Cloud Shell session starts and displays a command-line prompt. Cloud Shell is a shell environment with the Google Cloud CLI already installed and with values already set for your current project. It can take a few seconds for the session to initialize.

  2. To create a new project, use the gcloud projects create command:

    gcloud projects create PROJECT_ID
    

    Where PROJECT_ID is the ID for the project you want to create. A project ID must start with a lowercase letter, and can contain only ASCII letters, digits, and hyphens, and must be between 6 and 30 characters.

    To create a project with an organization resource or a folder as parent, use the --organization or --folder flags. As a resource can only have one parent, only one of these flags can be used:

    gcloud projects create PROJECT_ID --organization=ORGANIZATION_ID
    
    gcloud projects create PROJECT_ID --folder=FOLDER_ID
    

REST

You can't use certain words in the project ID when you create a new project with the projects.create() method. Some examples include google, null, undefined, and ssl. When you use a restricted word, the request returns with an INVALID_ARGUMENT error.