Skip to main content

Documentation Index

Fetch the complete documentation index at: https://www.latitude.sh/docs/llms.txt

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

Latitude.sh supports tagging, allowing you to categorize and manage your resources more effectively. Tags are key-value pairs that you can assign to your resources, making it easier to search, filter, and group them based on your specific needs.

What are Tags?

Tags are metadata labels that you can attach to your Latitude.sh resources. Tags help you:
  • Organize resources by purpose, owner, environment, or any other criteria relevant to your workflow
  • Quickly find and filter resources based on your assigned tags
  • Manage access control and permissions for grouped resources

Naming rules

Tag names must be unique within your team. The uniqueness check applies across all projects, not per-project. A tag created in one project is visible from every other project in the same team, and the same name can’t be created twice. Two checks enforce this when you create a tag:
  • Exact name match within the team. Creating a tag with an already-used name fails with is already taken.
  • Slug match within the team. Names are normalized to a URL-safe slug (Control-Plane, control plane, and CONTROL_PLANE all collapse to control-plane); a slug collision fails with is too similar to an existing tag name.
If a tag with the desired name already exists in your team, reference it instead of trying to create it again. Both the API and the Terraform provider expose data-source lookups for this. See Using the API and Using Terraform.

Supported resources

Currently, you can assign tags to the following resources on Latitude.sh:
  • Servers
  • Private networks (VLANs)
Tagging support will be extended to more resources in the future.

Creating and managing Tags

You can create, edit, and delete tags through the Latitude.sh dashboard or API.

Using the dashboard

  1. Navigate to the resource (server or VLAN) you want to tag.
  2. Open the Tags select.
  3. Start typing your tag to create a new one
You can edit or remove tags by clicking on Manage tags.

Using the API

You can manage tags programmatically using the Latitude.sh API. Refer to the Tags endpoint for detailed instructions on creating, updating, and deleting tags using API calls.

Using Terraform

The Latitude.sh Terraform provider exposes both a latitudesh_tag resource (to create new tags) and a latitudesh_tag data source (to look up tags that already exist in your team).
# Create a new tag
resource "latitudesh_tag" "production" {
  name  = "production"
  color = "#0066cc"
}

# Reference an existing tag (e.g. one a teammate created via the dashboard)
data "latitudesh_tag" "control_plane" {
  name = "Control Plane"
}
When applying tags to a server or private network, the tags attribute expects tag IDs, not names:
resource "latitudesh_server" "web" {
  # ... other attributes ...
  tags = [
    latitudesh_tag.production.id,
    data.latitudesh_tag.control_plane.id,
  ]
}
Passing a name where an ID is expected returns tag ID '<name>' not found. See the Terraform provider documentation for full schema details.

Searching and filtering Resources by Tags

Once you have assigned tags to your resources, you can use them to search and filter resources. Tags management interface

Using the dashboard

  1. Navigate to the resource type (servers or VLANs) you want to search or filter.
  2. Click on the “Filter” and select Tags dropdown.
  3. Select the desired tag to filter the resources.
The list will update to display only the resources with the selected tag.

Using the API

You can search and filter resources by tags using the API. Refer to the specific API documentation for detailed instructions on constructing API calls with tag-based filtering. Here’s an example on how you can retrieve a server with tag k8s
curl 'https://api.latitude.sh/servers?filter[tags]=k8s'
--header 'Accept: application/json'
--header 'Authorization: Bearer $API_TOKEN'

Best practices

  • Use a consistent naming convention to maintain clarity and avoid confusion. Many companies use tags as key-value pairs to manage growing environments. You can use key-value pairs by splitting the tag with :. Here are a key-value examples:
    • env:production env:development, …
    • k8s:etcd k8s:worker k8s:control-plane
  • Assign tags that reflect your organization’s resource management practices, such as cost allocation, ownership, or environment.
  • Regularly review and clean up unused or obsolete tags to keep your tagging system organized and efficient.
By leveraging tags on Latitude.sh, you can streamline your resource management, access control, and reporting processes, making it easier to maintain and scale your infrastructure.