To perform all course labs, you need a project with admin privileges and a billing account linked to it. You can use an existing project and billing account, but you'll get a limited experience and incur some charges (cost for all labs is about $15).
In this codelab, you'll open a free-trial GCP account so you can manage billing accounts and projects. You'll be required to enter a valid credit card to verify that you're not a robot, but won't be billed for anything unless you exceed the free-trial limits and authorize it.
You can use a Gmail or G Suite account to serve as the GCP free-trial administrator. Gmail is preferred for these labs. It's less invasive to your organization and guarantees you total control over your account, like creating billing accounts and projects. But it doesn't allow you to create projects within an organizational unit.
Create a free Gmail user account, use an existing one, or use a G Suite user account.
Accept the terms.
Enter Individual for account type, name, address, and credit card info.
Your free-trial billing account called My Billing Account is created for you, and your first project called My First Project is created and associated with it.
Notice your free-trial status at the top.
Notice your project is selected as the current project.
To see the billing account, select Billing from the main menu icon.
Take a minute to explore your default billing account.
Notice the credit. You're the only billing administrator and your default project is linked to the billing account.
Notice the Close Billing Account button at the top. You'll use this in the final lab to prevent any charges when done with the course.
Click the billing account drop-down selector at the top of the page and select Manage billing accounts to see the billing accounts you can manage (in this case one).
Click the My projects tab to see the list of projects you can manage (in this case one).
Click the My billing accounts tab and click Create account to create another billing account so you'll see how to work with them and projects later.
Give it a name like, Cost-charging account.
Select your country and currency.
Choose the same payment profile or create a new one (the same profile uses the same contact info and charging account).
Click Submit and enable billing to create the account.
See the new billing account with only one admin (you) and no projects yet. This account will be charged if you assign any resources to it, so be sure not to. Use the free-trial account instead.
Click the Billing icon to see accounts and projects you own and manage again.
Click the settings icon to the right of My Billing Account and select Rename. Call it Free-trial account so you'll remember which billing account is the free-trial one.
Now you'll add a project to your free-trial billing account so you can manage resources separately.
Go to the main menu and select IAM & Admin.
Click All projects at the top of the actions list to see your projects.
Click Create project.
Begin by typing a name like my-project, but don't hit Create yet.
Notice that the project ID must be unique across all projects in GCP, so if the name is not unique the ID will be made unique by GCP with additional characters added automatically.
You can click Edit to change it or give your project a globally unique name like my-project-<your-initials>, and the ID will match.
Click the Billing account drop-down to see your billing choices.
Select the Free-trial account for the billing account from the drop-down and click Create.
To see how to change a project's billing account, return to Billing.
When you create a new project, Admin Console switches your currently active project and billing account to match the new project and its associated billing account as shown.
So the billing page shows projects and details for that billing account.
To see how to change the billing account for a project, click the settings icon to the right of your project. You can choose Disable billing or Change billing account, but don't do anything for now.
Now you'll add an administrator to your project so others can make changes and you can delegate work.
To add an administrator to a project, go to IAM & Admin > IAM.
Make sure your new project is selected at the top, and click Add.
Under Members, click the ? icon to see what kinds of members you can grant roles to.
Enter a valid Google user account (either Gmail or G Suite) that you have email access to and select the following roles:
Notice the invitation to administer these resources was sent to the user, but they have not accepted the invite yet.
Sign in to Admin Console as that user and try to select the project. It won't be on the list yet.
Go to that user's email inbox and accept the invite (open the email and click the link).
When you accept the invitation, you're taken to Admin Console as that user and the new project is selected.
Go to Compute Engine > VM Instances. It'll take a minute, but GCP starts activating Compute Engine so you can add resources.
Go to Billing.
Notice the statement:
This user was given access to manage billing for this project only, not the ability to manage the billing account.
Click the settings icon to the right of the project.
Notice, this user can switch or disable billing for the project.
And go to IAM & Admin > IAM.
Notice this user can also add administrators to this project.
Congratulations! Now you know how to manage GCP billing accounts and projects.