Create GCP Project for Tenant Infrastructure
Description
The goal of this How-To
is to understand how and why you as a tenant can create a project under the tenant-infra folder for each environment.
If take a look at the projects in the GCP console, you’ll see that each environment has a tenant-infra
folder:

On that folder, each tenant can create different GCP projects where they can create the custom infrastructure. This one you can segregate the ownership and costs of that infrastructure to a specific tenant.
How?
First, you’re going to need some information as pre-requisites:
- Knowing the parent project (projectId in environments config.yaml) -
PROJECT_ID
- Knowing the folder ID of the tenant-infra folder -
FOLDER_ID
- Know the billing account ID. This can be an existing one, or you can create a new one via the UI -
BILLING_ACCOUNT_ID
- Have a unique name for the new project. If it’s not unique the creating command with fail and you can try another name. -
NEW_PROJECT_ID
Creating the project
With the above data, using gcloud is the easiest way to create a new project.
If you don’t have permissions to run this, you might need to reach out to your Platform Operator or Cloud Administrator.
You can do these by running the commands:
gcloud projects create ${NEW_PROJECT_ID} --billing-project ${PROJECT_ID} --folder ${FOLDER_ID}
Don’t let the parameter name --billing-project
confuse you into thinking this will be the billing-account id, that’s for the next step.
Associating Billing Account
You now can link the billing account to it:
gcloud billing projects link ${NEW_PROJECT_ID} --billing-account=${BILLING_ACCOUNT_ID}
And that’s it! The project is now ready to have infrastructure
Next steps
For next steps, you can follow up with: