Create Google Cloud projects
Overview
The DoiT console allows you to create a Google Cloud Billing account directly. However, it doesn't allow you to create Google Cloud projects.
This page explains how to create new projects with DoiT Cloud Billing account using the Google Cloud console, the Google Cloud CLI, the Google Cloud API, and Terraform.
You need at least the Billing Account User role for the DoiT Cloud Billing account to be able to link the projects.
Google Cloud console
-
Go to the Manage resources page in the Google Cloud console.
-
Select your organization from the Organization drop-down list.
-
Select Create Project.
-
In the New Project window, select your DoiT Cloud Billing account from the Billing account drop-down list.
-
Select Create when you've entered all the required information.
-
Google Cloud Docs: Creating a project
-
Google Cloud Docs: Enable billing for a project
Google Cloud CLI
-
Run the following command to create a new project.
gcloud projects create $PROJECT_ID --organization=$ORGANIZATION_ID -
Follow the instructions to link the project to your DoiT Cloud Billing account.
Google Cloud API
-
Use the project.create() method to create a new project.
-
Use the projects.updateBillingInfo method to link the project to your DoiT Cloud Billing account.
Terraform
-
Follow the instructions to grant your Terraform service account the Billing Account User role on your DoiT billing account.
-
Create a new project with the
billing_account
set to the DoiT Billing account ID.resource "google_project" "my_project" {
name = "My Project"
project_id = "my-project-id"
org_id = "1234567"
billing_account = "DoiT-Billing-Account-ID"
}