GCP Labels vs Tags
search cancel

GCP Labels vs Tags

book

Article ID: 284013

calendar_today

Updated On: 04-18-2025

Products

CloudHealth

Issue/Introduction

GCP “Tags” (which are key-value pair) are different from “Network Tags” (which are simple strings). You can find more info on GCP doc https://cloud.google.com/firewall/docs/tags-firewalls-overview?authuser=1

The REST documentation (https://cloud.google.com/compute/docs/reference/rest/v1/instances) also support strings under “Tags” which indicates that the “Tags” from the API will return “Network Tags” and not “Tags”.

The “tags” seen in CloudHealth is the “Metadata” for the compute instance + “Tags” from GCP API (which are actually network tags).

Resolution

"Labels" reside in its own field separate from “GCP Tags” and the platform is able to support perspectives utilizing both of these.

If the goal is to categorize assets by tags, the suggestion is to use GCP labels.  Inside perspectives, the GCP labels are prefixed with "Label" for easy identification. For example, the label "goog-k8s-cluster-name" would be available for perspective categorization as Label "goog-k8s-cluster-name".