Prepare and test your skills

Prepare and test your skills

Identity and Access Management (IAM) (opens in a new tab) controls who can link a project to a billing account in Google Cloud. A Google Cloud project (opens in a new tab) is the container that holds resources such as virtual machines and storage buckets, while a Cloud Billing account (opens in a new tab) defines who pays for usage in one or more projects. Creating, changing, or removing the link between them is a sensitive action, so the user may need to reauthenticate before the change is allowed.
Linking a project to a billing account connects two separate resources, so IAM checks permissions on both sides of the link. The project side controls the assignment from the project, and the billing account side controls the association from the billing account. A user who has permission on only one side will see the Change billing or Disable billing option as unavailable in the Google Cloud console.
Establishing or changing the link between a project and a Cloud Billing account requires create permissions on both resources at the same time. On the billing account, the permission is billing.resourceAssociations.create, which is included in the Billing Account User role and the Billing Account Administrator role. On the project, the permission is resourcemanager.projects.createBillingAssignment, which is included in the Project Billing Manager role and the Project Owner role.
In practice, one person needs a billing role plus a project role together. The most common combination is Billing Account User on the billing account plus Project Owner or Project Billing Manager on the project. The same pair of create permissions is also used to lock the link to prevent accidental moves.
Removing the link to disable billing, or unlocking a locked link, requires delete permissions. On the billing account, the permission is billing.resourceAssociations.delete, held by the Billing Account Administrator role. On the project, the permission is resourcemanager.projects.deleteBillingAssignment, held by the Project Billing Manager role or the Project Owner role.
For unlock and unlink actions, adequate permission on either side is sufficient. That means Project Billing Manager plus Project Browser, or Project Owner on the project, OR Billing Account Administrator on the linked billing account. If an organization is used, a Billing Account Administrator role granted at the organization level also covers the billing account side.
Viewing billing links depends on where the list is viewed, because projects and billing accounts are separate resources. To view the list of projects linked to a billing account, the user needs billing.resourceAssociations.list on the billing account, which is held by Billing Account Viewer, Billing Account Costs Manager, or Billing Account Administrator. To view the billing account linked to each project, the user needs resourcemanager.projects.get on the projects, which is held by Project Browser, Project Viewer, Project Editor, or Project Owner.
The three tasks compare as follows:
| Task | Billing account side | Project side |
|---|---|---|
| Link or change billing for a project | Billing Account User or Billing Account Administrator with billing.resourceAssociations.create | Project Billing Manager or Project Owner with resourcemanager.projects.createBillingAssignment |
| Unlock link or unlink to disable billing | Billing Account Administrator with billing.resourceAssociations.delete | Project Billing Manager or Project Owner with resourcemanager.projects.deleteBillingAssignment |
| View associations | Billing Account Viewer, Costs Manager, or Administrator with billing.resourceAssociations.list | Project Browser, Viewer, Editor, or Owner with resourcemanager.projects.get |
The table shows why linking fails when only one side is covered, while unlocking succeeds when either side is covered.
Exam tip: Linking a project requires permissions on both resources at once — a billing account role such as Billing Account User plus a project role such as Project Owner — while unlocking can be done with either the Billing Account Administrator role or the project-side Project Owner role.
Relationship dynamics in Google Cloud billing describe how costs flow from projects to payment. A Google Cloud project (opens in a new tab) is the top-level container for cloud resources, and all service-level resources for Google Cloud, Google Maps Platform, Google AI Studio, and Firebase are parented by projects. A Cloud Billing account (opens in a new tab) accrues and calculates costs for usage in each project linked to it, and those costs are then routed to a linked Google payments account to pay the bill.
A Cloud Billing account has a one-to-many relationship with projects because one billing account can pay for one or more projects. Each project is linked to at most one Cloud Billing account at a time, but that link can be changed to move the project to a different billing account. Project usage costs are accrued by the linked Cloud Billing account and charged to the linked Google payments account. Payment linkage is flexible across organizations, so a Cloud Billing account can pay for projects that belong to a different organization than the organization that owns the billing account.
Billing is enabled on a project only when two conditions are true at the same time. First, the project must be linked to a Cloud Billing account. Second, that linked account must be active and in good standing, which means it is not closed or suspended. A project with no link, or with a link to a closed or suspended account, does not have billing enabled. The console shows Billing is disabled for a project with no linked billing account.
Unlinking a billing account from a project disables billing on that project and stops the project from using its enabled products and services. If projects are linked to a Cloud Billing account that is not in a billable state, such as suspension or closure, the products and services enabled in those projects cannot be used. This loss of access applies even if the projects only use services that are otherwise free. By contrast, changing a project from one active billing account to another active billing account should not cause service interruption or server downtime.
Charges incurred before the link changes still belong to the former billing account. After a project is moved or has billing disabled, prior usage is still billed to the previously linked Cloud Billing account. This includes charges not yet shown in transaction history, because services report usage to Cloud Billing at varying intervals and it might take up to two days for charges to appear.
Exam tip: Changing a project to a different active billing account should not interrupt services, while unlinking billing so no active account remains leaves the project unable to use its enabled services.
Procedures for linking and modifying billing control which Cloud Billing account (opens in a new tab) pays for a Google Cloud project (opens in a new tab). A Google Cloud project is the top-level container that holds cloud resources, while the linked Cloud Billing account accrues and calculates usage costs for those resources. Those accrued costs are then routed to a linked Google payments account (opens in a new tab), which holds invoices and payment instruments to pay the bill.
Billing is enabled on a project when the project is linked to a Cloud Billing account and that account is not closed or suspended. In the Google Cloud console, the My Projects page in Billing shows a table of projects with their billing account name and ID, and shows Billing is disabled when no account is linked. You can also check a single project with the gcloud command-line interface by running gcloud beta billing projects describe PROJECT_ID, where PROJECT_ID is the project ID or number.
The output of the describe command shows both the link and the account state. Billing is enabled when the output contains a billingAccountName and billingEnabled: true. Billing is not enabled when billingAccountName is blank, or when billingEnabled: false, which means the project is either unlinked or linked to an inactive account. If the linked account is closed or suspended, resources in the project cannot be used, even for services that are otherwise free.
Enabling billing for a project means linking the project to an active Cloud Billing account so paid services can be used. How linking happens for a new project depends on where the project is created, because only some creation flows prompt for a billing account.
| Project-creation platform | Billing account linked? | Result |
|---|---|---|
| Google Cloud console | Yes | You are prompted to choose a Cloud Billing account, or the single available account is linked automatically |
| Firebase console | No | The new project starts on the no-cost Spark plan without a linked billing account |
| Google AI Studio console | No | The new project starts on the Free tier without a linked billing account |
For an existing project, enabling billing is done from the Billing page in the Google Cloud console. First, select or create the project you want to manage, then follow the prompt to link an existing Cloud Billing account or create a new one. If billing is already enabled, the Billing page instead lists details of the linked billing account.
Changing the billing account moves a project from one Cloud Billing account to a different destination account without expected service interruption or server downtime. To make the change in the Google Cloud console, first locate the project from either the My Projects list or the Account management page for a specific billing account. The My Projects list works well when you manage the project directly, while Account management works well when you know the active billing account by name.
Once the project is located, complete the change in order:
A padlock icon next to a project means the project-to-billing-account link is locked, and the link must be unlocked before it can be changed. If Change billing cannot be selected, the account lacks the permissions needed for the change.
Disabling billing for a project unlinks the project from its Cloud Billing account so usage is no longer charged to that account. To disable billing in the Google Cloud console, first locate the project in the Billing section using either the My Projects page or the Account management page for its billing account. Then open the Actions menu in the project row and select Disable billing, and click Disable billing again to confirm.
A locked link must be unlocked before billing can be disabled, which is shown by a padlock icon next to the project. If Disable billing cannot be selected, the account lacks the required permission. After disabling billing, be careful about re-enabling it later, because limited permissions on the billing account can prevent linking the project again.
Charges after a billing change follow the timing of usage, not the timing of the report. Usage incurred before the project is moved is billed to the former Cloud Billing account, even if that usage has not yet appeared in transaction history. For example, if a project moves from Account A to Account B on May 15, usage from May 1 to May 15 is billed to Account A and usage from May 16 to May 31 is billed to Account B. The same rule applies after disabling billing, where prior usage is still billed to the previously linked account after reporting delays of up to two days.
Exam tip: Charges incurred before a move or before disabling billing stay with the former billing account, and reporting to transaction history can take up to two days.
Linking or changing the link requires create permissions on both the project and the billing account at the same time. The billing account side requires billing.resourceAssociations.create, included in the Billing Account User role and the Billing Account Administrator role, and the project side requires resourcemanager.projects.createBillingAssignment, included in the Project Billing Manager role and the Project Owner role.
Unlocking a locked link or unlinking to disable billing requires adequate delete permission on either the project or the billing account. The project side requires resourcemanager.projects.deleteBillingAssignment, held by the Project Billing Manager role or the Project Owner role, with Project Billing Manager plus Project Browser also sufficient. The billing account side requires billing.resourceAssociations.delete, held by the Billing Account Administrator role, including when that role is granted at the organization level.
Billing is enabled only when the project is linked to a Cloud Billing account and that account is active and in good standing. A project with no link, or with a link to a closed or suspended account, does not have billing enabled and the console shows Billing is disabled.
Changing a Google Cloud project to a different active Cloud Billing account should not interrupt services, while unlinking billing so no active account remains leaves the project unable to use its enabled services and prior usage stays with the former billing account. Usage incurred before the move or before disabling billing is billed to the formerly linked Cloud Billing account even if it has not yet appeared in transaction history, and reporting can take up to two days.
A Cloud Engineer has created a new Google Cloud project named corp-analytics-prod and needs to attach it to an active Cloud Billing account with the ID 01A2B3-45C6D7-89E0F1. The organization requires provisioning tasks to be scripted using the Google Cloud CLI (gcloud).
Which command should the engineer execute to enable billing on the project?
Last updated