Skip to main content
Add labels to resources to group your costs the way you need, and see how costs are allocated across the groups. You can group resources by label where each label represents, for example, a particular service, application or team. To see a breakdown of costs, filter your costs by label on the Billing → Usage page, or export usage data as CSV and check the Tags column in the CSV file. A label represents a key-value pair you set on a resource when you create or update it. Keys and values can be arbitrary — set the convenient ones for you. On the Usage page, you can filter resources by both keys and values. For example, to check costs by application and team, you can set such labels as application = argo-cd and application = gatekeeper or team = engineering and team = support.
Cost allocation labels are only available for Compute billable resources. Labels assigned to other resources are unavailable in the billing report.

How to set labels on resources

In the create or update command, add the --labels parameter. Example for a virtual machine:
To make sure that the label has been assigned to the resource successfully, check the resource configuration by using the get or get-by-name commands. For example:
Output:

How to view the cost allocation breakdown by labels

You can check the cost allocation breakdown in the web console directly, or you can export usage data:
  1. In the web console, go to  BillingUsage.
  2. If you select the  Table view:
    1. In the Filter by field, select Label.
    2. In the Labels field, select the keys and values of the needed labels. If you only select a key, all its values are automatically included.
  3. If you select the  Chart view:
    1. In the Group by field, select Label.
    2. In the Labels field, select the keys of the needed labels. All the values of the selected keys are automatically included.
As a result, the dashboard only shows the resources and costs that are relevant to the selected labels.