Google Cloud tags and labels
Tags are resources that can be attached to other resources directly or through inheritance. You can apply tags to your resources for cost allocation analysis or fine-grained access control.
Labels are metadata for resources and they allow you to annotate resources for cost analysis.
This page explains how to use tags and labels in DoiT Cloud Analytics reports.
Before a tag can be attached to a resource, you must first define the tag key and tag value in the Google Cloud. Once tags are propagated to BigQuery exports, which may take up to an hour, they become available in DoiT Cloud Analytics reports within hours.
When using the Filter results or Group by options in a Cloud Analytics report, you'll find the available tags in the Tags section.
The example below uses the tag key
vpc1-tag and standard dimensions (Service, Project/Account ID, SKU) to analyze cost.
Labels can be used group related or associated Google Cloud resources.
Due to Google Cloud's frequency of data loads and other limitations, after applying labels to your resources, it may take a few days before the labels become available in the DoiT Console.
Google Cloud Docs: Organize resources using labels
When using the Filter results or Group by options in a Cloud Analytics report, you'll find the available labels in the Labels section (Available system labels appear in the System Labels section).
Auto labeling with Iris 3
Iris 3 is an open-source project developed by DoiT.
Iris 3 automates the labeling of various types of Google Cloud resources. For example, a Google Compute Engine instance would be labeled with
You can configure Iris 3 to run on resource creation or at a scheduled time. Labels added by Iris 3 are available both in the DoiT Console and in the Google Cloud Console.
Example: Label Cloud Storage buckets
Google Cloud Storage (GCS) is a service for storing objects (data) in Google Cloud. As bucket metadata is not directly available in the billing data export, to analyze the cost and usage of storage buckets, you need to join the billing data with the relevant bucket metadata, for example, by using bucket labels.
The example below explains how to label storage buckets and then use the labels to break down the cost in a Cloud Analytics report.
Suppose you've created three buckets and want to label them using the bucket names:
Sign in to the Google Cloud console, go to the Cloud Storage Buckets page.
Locate the target bucket in the bucket list, select its Bucket overflow menu (⋮), and then select Edit labels.
Select + Add label and specify its key and value. For example:
Save the changes.
After applying labels to your buckets, it may take a few days before the labels become available in the DoiT Console; the billing data with the label needs to arrive in the billing export, and the report metadata needs to update.
To use labels in Cloud Analytics reports:
Use the Group by option, select Service from the Standard section, filter it to include only
Cloud Storage (GCS), and then select
bucket-namefrom the Labels section.
Run the report to see the cost of each bucket.
The example report below combines two other standard dimensions (Project/Account ID, SKU) to identify granular cost data.