The gitlab_project_label
resource allows to manage the lifecycle of a project label.
Upstream API: GitLab REST API docs
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"
}
color
(String) The color of the label given in 6-digit hex notation with leading '#' sign (e.g. #FFAABB) or one of the CSS color names.name
(String) The name of the label.project
(String) The name or id of the project to add the label to.description
(String) The description of the label.id
(String) The ID of this resource.label_id
(Number) The id of the project label.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