skip to content
wihan/dev
markdown
browse the dokploy docs

dokploy_tag (Data Source)

Looks up a tag that already exists in Dokploy, so that a project can carry it in tag_ids:

terraform
data "dokploy_tag" "prod" {
  name = "production"
}

Tag names are unique in the organization, so a lookup by name finds at most one record; the duplicate-name failure of the other lookups cannot happen here.

~> Dokploy does not enforce name uniqueness. If two tags share a name, this data source fails instead of a guess. Look the record up by id in that case.

Example Usage

terraform
data "dokploy_tag" "example" {
  id = "your-tag-id"
}

data "dokploy_tag" "production" {
  name = "production"
}

# A project that carries a tag created outside Terraform.
resource "dokploy_project" "site" {
  name    = "site"
  tag_ids = [data.dokploy_tag.production.id]
}

Schema

Optional

  • id (String) Tag id. Set it for a lookup by id, or leave it unset and set name.
  • name (String) Display name as shown in Dokploy. Set exactly one of id or name.

Read-Only

  • color (String) Colour of the label as Dokploy stores it, or null when the tag has none.
  • created_at (String) Creation timestamp.
  • organization_id (String) Id of the organization that owns the tag.