gitlab_project_label (Resource)

The gitlab_project_label resource allows to manage the lifecycle of a project label.

Upstream API: GitLab REST API docs

Example Usage

resource "gitlab_project_label" "fixme" {
  project     = "example"
  name        = "fixme"
  description = "issue with failing tests"
  color       = "#ffcc00"
}

# Scoped label
resource "gitlab_project_label" "devops_create" {
  project     = gitlab_project.example.id
  name        = "devops::create"
  description = "issue for creating infrastructure resources"
  color       = "#ffa500"
}

Schema

Required

Optional

Read-Only

Import

Import is supported using the following syntax:

# Gitlab Project labels can be imported using an id made up of `{project_id}:{group_label_id}`, e.g.
terraform import gitlab_project_label.example 12345:fixme