Skip to main content
The devhelm_tag resource creates and manages tags for organizing and filtering your DevHelm resources.

Example

resource "devhelm_tag" "production" {
  name  = "production"
  color = "#10b981"
}

resource "devhelm_tag" "api" {
  name  = "api"
  color = "#3b82f6"
}

Arguments

AttributeTypeRequiredDescription
namestringYesTag name (also used as import ID)
colorstringHex color code (e.g., #10b981). Defaults to grey if omitted.

Computed attributes

AttributeDescription
idTag ID

Using tags with monitors

Reference tag IDs when creating monitors:
resource "devhelm_monitor" "api_health" {
  name    = "API Health"
  type    = "HTTP"
  tag_ids = [devhelm_tag.production.id, devhelm_tag.api.id]

  config = jsonencode({ url = "https://api.example.com/health" })
}

Import

terraform import devhelm_tag.production "production"
Import uses the tag name as the identifier.

Data source

Look up an existing tag by name:
data "devhelm_tag" "production" {
  name = "production"
}

resource "devhelm_monitor" "api_health" {
  tag_ids = [data.devhelm_tag.production.id]
  # ...
}
See Data sources for all available data sources.

Next steps

Monitors

Assign tags to monitors.

Data sources

Look up existing tags, environments, and more.