Skip to main content

Documentation Index

Fetch the complete documentation index at: https://gcore.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Tags are key-value pairs used to organize and identify Cloud resources. Each tag consists of a key (like env) and a value (like production). You can add tags during resource creation or to existing resources.

During resource creation

Tags can be added directly during the resource creation process.
  1. Navigate to the resource creation page (Cloud > Virtual Instances > Create Instance).
  2. In the Additional options section, turn on the Add tags toggle.
  3. Enter a Key and Value for each tag.
  4. Click Add tag to add more tags if needed.
  5. Complete the resource creation.
Add tags toggle in the Additional options section during resource creation

On existing resources

Tags can also be added to resources that already exist.
  1. Open the resource details page (Cloud > Networking > Load Balancers > select a load balancer).
  2. Navigate to the Tags tab.
  3. Turn on Add custom tags, then enter key-value pairs.
  4. Click Save changes.
Tags tab on an existing resource showing key-value pair fields

Filter resources by tag

In the Customer Portal

Filter tagged resources directly from the resource list.
  1. Navigate to the resource list page (Cloud > Virtual Instances).
  2. Use the search field or available filters to search by tag key or value.

Via API

Use the tag_key_value query parameter when listing resources:
GET /cloud/v1/instances/{project_id}?tag_key_value=env:production
You can filter by multiple tags by repeating the parameter:
GET /cloud/v1/instances/{project_id}?tag_key_value=env:production&tag_key_value=team:backend
This simplifies finding resources belonging to a specific environment, team, or project.

Add tags via API

Include tags in the tags field when creating or updating resources via the Gcore API:
{
  "name": "my-instance",
  "tags": {
    "env": "production",
    "team": "backend"
  }
}
NoteThe metadata field is deprecated. Use the tags field for new implementations.

Add tags via Terraform

Specify tags in the metadata_map attribute when using the Gcore Terraform provider:
resource "gcore_instance" "example" {
  name        = "my-instance"
  flavor_id   = "g1-standard-2-4"
  
  metadata_map = {
    env  = "production"
    team = "backend"
  }
}

Add tags via SDK

Both gcore-python and gcore-go SDKs support the tags parameter when creating resources.
from gcore import Gcore
from gcore.types.cloud.instance_create_params import (
    InterfaceNewInterfaceExternalSerializerPydantic,
    VolumeCreateInstanceCreateVolumeFromImageSerializer,
)

client = Gcore()

instance = client.cloud.instances.create_and_poll(
    name="my-instance",
    flavor="g1-standard-1-2",
    interfaces=[
        InterfaceNewInterfaceExternalSerializerPydantic(type="external"),
    ],
    volumes=[
        VolumeCreateInstanceCreateVolumeFromImageSerializer(
            name="my-volume",
            size=10,
            type_name="standard",
            source="image",
            image_id="your-image-id",
            boot_index=0,
        ),
    ],
    tags={"env": "production", "team": "backend"},
)

Tag formatting rules

Tag keys and values must follow specific format requirements. Invalid tags are rejected during resource creation or update.
ParameterRequirement
Key length3-255 characters
Value length3-255 characters
Forbidden characters= in keys
WhitespaceLeading and trailing spaces are trimmed
WarningTag keys cannot contain the = character.

Common tagging patterns

Consistent tag naming across resources simplifies filtering and cost allocation. These patterns are widely used in production environments.
PatternExample tags
Environmentenv:production, env:staging, env:development
Serviceservice:authentication, service:payment
Ownershipteam:backend, owner:devops
Cost trackingcost-center:marketing, project:website-redesign

Use tags in cost reports

Tags appear in the Cost Report table as a dedicated column. Filter and search resources by tag to analyze spending by environment, team, or project. The detailed CSV export includes all tag values assigned to each resource. Use this data to:
  • Calculate costs per environment (env:production vs env:staging)
  • Track spending by team or cost center
  • Identify untagged resources that need classification