dokploy_tag (Data Source)
Looks up a tag that already exists in Dokploy, so that a project can carry it in tag_ids:
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
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 setname.name(String) Display name as shown in Dokploy. Set exactly one ofidorname.
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.