Understanding Terra costs and billing

Allie Hajian
  • Updated

This article outlines what operations in Terra have a Google Cloud Platform (GCP) cost and how you will pay for GCP charges with a Terra billing project. It also explains the billing structure (i.e. GCP and Terra), how GCP calculates and bills Terra users for charges, and how Terra Billing projects act as a pass-through to pay for the GCP costs of your work in Terra.

GCP fees in Terra 

The Terra platform itself is free to use with a registered account, but there are GCP costs associated with operations in Terra such as:

Terra passes along GCP charges with no markup through a Terra Billing project (note the links above will take you directly to the GCP pricing pages). 

Terra/GCP billing structure

There are three levels to the cost structure in Terra. Each has its own function, and users/collaborators can be included with different permissions at each level in order to do different things.

Terra-Billing-structure_diagram.png

At the top of this structure (illustrated in diagram above) is a GCP Billing account, which is what you will ultimately use to pay GCP for storage, compute, and egress costs. At the bottom is a project workspace, where you actually store and move data or run an analysis. In between is a Terra Billing project, a pass through between GCP and Terra (blue boxes are GCP components, and gray boxes are Terra components).

G0_tip-icon.png


GCP costs are calculated per workspace, not per user!

  Each workspace has a unique GCP Project that is automatically generated when you create the workspace. All these Google Projects (one for each workspace) are under an umbrella Terra billing project, which acts as a pass-through that pays the GCP costs from the GCP Billing account at the top of everything.

For GCP accounting, it doesn't matter who does the work, it only matters how much data storage, egressing or analysis is done in the workspace.

Here's an example of what you will see in Terra. The workspace depicted below stores data for the Analysis, Visualization, and Informatics Lab-Space (AnVIL). The GCP storage fees are paid by the Google Cloud Billing account associated with the Terra Billing project anvil-datastorage (circled).

Understanding_billing_Billing_project_in_workspace_header.png

What does access to billing resources allow you to do (and not do)?

Terra's billing structure means that it is workspace permissions, not billing permissions, that directly control who can accrue costs on a Terra billing project.

Collaborators with billing access can create resources and then use them

Owners of Cloud Billing accounts and Terra Billing projects control who can create Billing projects and workspaces (respectively) by assigning the appropriate permissions (see the chart below). 

 Permission/role

Can access cost breakdown
(GCP console)

Can create Terra Billing projects (Terra UI)

Can create workspaces

Can store and analyze data

Google Billing account admin, viewer, user

Depends on workspace role

Terra Billing project owner or user

x

x

Depends on workspace role

Collaborator costs
Note that anyone who creates a workspace is the owner by default, and can spend in the workspace they create. Thus a collaborator on a shared Billing project can create a workspace where they can accrue costs for storing and analyzing data. These costs will then be covered by the Terra Billing project, even if the collaborator is later removed from the billing project.

Regardless of whether the user has a role on a billing project tied to the workspace, workspace costs will be passed through to the Terra Billing project as long as the billing project is active.

Collaborators with workspace access can accrue costs in a workspace

A colleague does not need to be included in a Terra Billing project or a GCP Billing account to be able to work in Terra. They only need to have the appropriate ("can-compute") workspace permissions. To learn more, see Managing shared resources (billing, data, and workspaces

G0_warning-icon.png


Be mindful of how you share workspaces!

  It is workspace permissions, not billing project permissions, that allow you to accrue costs (directly) in Terra.

This means if you share a workspace with someone as "Writer" or "Owner" they will be able to accrue costs by storing data or running an analysis, even if they are not a user of the workspace Billing project. The "Reader" role on a workspace will be able to download data accruing an egress charge unless the workspace bucket is flagged as "Requester Pays."

To learn more about controlling cloud costs in Terra, see this article. 

Terra Billing projects versus Google Projects

When you create a workspace in Terra (gray boxes in the diagram below, bottom level), you assign a Terra Billing project (gray box second from the top) that acts as a passthrough for GCP costs. Terra automatically generates a Google project (blue boxes second from the bottom) that is unique to that workspace (analogous to the workspace bucket storage) that organizes all GCP resources used in the workspace.
Note that Terra Billing projects and Google projects are separate entities (and the Google project is mostly behind the scenes). 
Terra-Billing-simple-diagram.png
This process works in only one direction. It is not possible to create a GCP project and move or assign it to a Terra workspace.

Billing account owners and viewers will see all the associated Terra-created Google projects in the GCP console (choose Billing > Account management). 
GCP-console_Billing-account-management_Screen_shot.png

Billing permissions FAQs 

What happens when owners remove a user from a GCP Billing account?

A user who no longer has a role in a GCP Billing account can no longer create a Terra Billing project. Instead, they will get the following error message:

Understanding_Billing_User_with_no_Billing_acccount.png

They will also not be able to see detailed cost breakdowns or reports in GCP console.

However, they can still charge costs to the Billing account they have just been removed from in two ways! 

By creating workspaces under any Billing projects they created or where they are still users

 or

By performing operations in any workspaces they created or that were shared with them

To learn about how prevent these charges, see this article

What happens when owners remove a user from a Terra Billing project?

When you remove a user from a Terra billing project, they will no longer be able to create workspaces funded by that project.

If they have been removed from all Terra billing projects, they will get the following message when they try to clone or create a workspace:

Understanding_Billing_User_needs_billing_project_to_clone_message.png

However, they can still charge costs to the Billing project they have just been removed from in two ways!

By operating in any workspace that has been shared with them

or

By operating in any workspace they created when they were still a Billing project user
(as long as that billing project is connected to a valid GCP Billing account)

To prevent this, Billing account owners will need to disable billing on all Terra projects created by this user, and remove them from any shared workspaces. To learn about how to disable Billing projects, see this article.

What happens when you remove a user from a workspace?

When a user is removed from a workspace (i.e. has no permission to view, compute or share the workspace), they will be unable to access the workspace at all. When they try to open the workspace, they will get a warning message, and they will no longer be able to accrue any costs by analyzing in the workspace. This takes effect immediately.

Can you link a Terra billing project and a Google project?

It is not possible to link an existing Google Project to a Terra workspace. Only Terra can create the workspace Google projects (which are mostly in the background and different from the Terra Billing project).
In some cases, GCP users can run into trouble when trying to integrate their Terra billing projects with GCP.  It's useful to understand the following:
    • Terra will always create a GCP project when you create a workspace. You can see the workspace Google project in the Workspace Information (on the right column in the Dashboard).
      PPW-Google-project-in-Dashboard_Screen_shot_cropped.png


    • If you are the Google Cloud Billing account owner, you will see the workspace projects in the GCP console here.
    • Google Cloud Billing account owners can change the Cloud Billing account associated with a Terra Billing project in Terra.
      Billing-Change-billing-account-in_Terra_Screen_shot.png

Additional resources

Was this article helpful?

1 out of 1 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.