Labels & Tags
Organize your instances with key-value labels for better resource management.
Labels & Tags
Labels are key-value pairs that you attach to cloud instances to organize, filter, and manage your resources. As your infrastructure grows, labels help you quickly identify which instances belong to which environment, team, or project.
How Labels Work
Each label consists of a key and a value separated by a colon. You can attach multiple labels to a single instance.
| Key | Value | Purpose |
|---|---|---|
env | production | Identify the deployment environment |
env | staging | Separate staging from production |
team | backend | Track ownership by team |
project | website | Group instances by project |
role | database | Describe the instance's function |
cost-center | engineering | Attribute costs to a department |
Adding Labels
During Instance Creation
- In the instance creation form, scroll to the Labels section
- Click Add Label
- Enter a key and value
- Repeat for additional labels
- Complete instance creation as normal
On an Existing Instance
- Navigate to the instance detail page
- Click the Labels section or the edit icon
- Add, modify, or remove labels
- Save your changes
Labels are metadata only — they do not affect instance performance, networking, or billing. You can add, change, or remove labels at any time without downtime.
Filtering by Labels
Use labels to narrow down your instance list in the dashboard:
- Go to the Cloud Compute instances list
- Use the label filter to select one or more key-value pairs
- The list updates to show only matching instances
This is particularly useful when managing dozens or hundreds of instances across multiple projects and environments.
Best Practices
- Be consistent — Decide on a labeling convention early and stick to it across your organization. For example, always use
env(notenvironmentorstage). - Keep keys lowercase — Use lowercase keys with hyphens for readability:
cost-center,created-by. - Use meaningful values — Values like
production,staging, anddevelopmentare more useful than1,2,3. - Label everything — Apply labels to all instances at creation time. Retroactively labeling resources is tedious.
- Limit the number of keys — A small, well-defined set of label keys (5-10) is easier to manage than dozens of ad-hoc keys.
Example Labeling Strategy
A typical organization might use the following label keys:
| Key | Example Values | Description |
|---|---|---|
env | production, staging, dev | Deployment environment |
team | backend, frontend, devops | Owning team |
project | website, api, ml-pipeline | Project or application name |
role | web, database, cache, worker | Instance function |
managed-by | terraform, manual | How the instance was provisioned |
Labels are not a security mechanism. Do not use labels to enforce access control or store sensitive information. Use Cloud Firewall rules and proper IAM practices for security boundaries.
Next Steps
- Review the Activity Log to track changes across your labeled resources
- Explore Managing Instances for power controls, snapshots, and resizing
- Set up Networking to configure firewalls and private networks