Project Label Args
data class ProjectLabelArgs(val color: Output<String>? = null, val description: Output<String>? = null, val name: Output<String>? = null, val project: Output<String>? = null) : ConvertibleToJava<ProjectLabelArgs>
The gitlab.ProjectLabel
resource allows to manage the lifecycle of a project label. Upstream API: GitLab REST API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const fixme = new gitlab.ProjectLabel("fixme", {
project: "example",
name: "fixme",
description: "issue with failing tests",
color: "#ffcc00",
});
// Scoped label
const devopsCreate = new gitlab.ProjectLabel("devops_create", {
project: example.id,
name: "devops::create",
description: "issue for creating infrastructure resources",
color: "#ffa500",
});
Content copied to clipboard
import pulumi
import pulumi_gitlab as gitlab
fixme = gitlab.ProjectLabel("fixme",
project="example",
name="fixme",
description="issue with failing tests",
color="#ffcc00")
# Scoped label
devops_create = gitlab.ProjectLabel("devops_create",
project=example["id"],
name="devops::create",
description="issue for creating infrastructure resources",
color="#ffa500")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var fixme = new GitLab.ProjectLabel("fixme", new()
{
Project = "example",
Name = "fixme",
Description = "issue with failing tests",
Color = "#ffcc00",
});
// Scoped label
var devopsCreate = new GitLab.ProjectLabel("devops_create", new()
{
Project = example.Id,
Name = "devops::create",
Description = "issue for creating infrastructure resources",
Color = "#ffa500",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gitlab.NewProjectLabel(ctx, "fixme", &gitlab.ProjectLabelArgs{
Project: pulumi.String("example"),
Name: pulumi.String("fixme"),
Description: pulumi.String("issue with failing tests"),
Color: pulumi.String("#ffcc00"),
})
if err != nil {
return err
}
// Scoped label
_, err = gitlab.NewProjectLabel(ctx, "devops_create", &gitlab.ProjectLabelArgs{
Project: pulumi.Any(example.Id),
Name: pulumi.String("devops::create"),
Description: pulumi.String("issue for creating infrastructure resources"),
Color: pulumi.String("#ffa500"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.ProjectLabel;
import com.pulumi.gitlab.ProjectLabelArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var fixme = new ProjectLabel("fixme", ProjectLabelArgs.builder()
.project("example")
.name("fixme")
.description("issue with failing tests")
.color("#ffcc00")
.build());
// Scoped label
var devopsCreate = new ProjectLabel("devopsCreate", ProjectLabelArgs.builder()
.project(example.id())
.name("devops::create")
.description("issue for creating infrastructure resources")
.color("#ffa500")
.build());
}
}
Content copied to clipboard
resources:
fixme:
type: gitlab:ProjectLabel
properties:
project: example
name: fixme
description: issue with failing tests
color: '#ffcc00'
# Scoped label
devopsCreate:
type: gitlab:ProjectLabel
name: devops_create
properties:
project: ${example.id}
name: devops::create
description: issue for creating infrastructure resources
color: '#ffa500'
Content copied to clipboard
Import
Starting in Terraform v1.5.0 you can use an import block to import gitlab_project_label
. For example: terraform import { to = gitlab_project_label.example id = "see CLI command below for ID" } Import using the CLI 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.
$ pulumi import gitlab:index/projectLabel:ProjectLabel example 12345:fixme
Content copied to clipboard
Properties
Link copied to clipboard
The color of the label given in 6-digit hex notation with leading '#' sign (e.g. #FFAABB) or one of the CSS color names.
Link copied to clipboard
The description of the label.