ProjectLabelArgs

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",
description: "issue with failing tests",
color: "#ffcc00",
});
// Scoped label
const devopsCreate = new gitlab.ProjectLabel("devopsCreate", {
project: gitlab_project.example.id,
description: "issue for creating infrastructure resources",
color: "#ffa500",
});
import pulumi
import pulumi_gitlab as gitlab
fixme = gitlab.ProjectLabel("fixme",
project="example",
description="issue with failing tests",
color="#ffcc00")
# Scoped label
devops_create = gitlab.ProjectLabel("devopsCreate",
project=gitlab_project["example"]["id"],
description="issue for creating infrastructure resources",
color="#ffa500")
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",
Description = "issue with failing tests",
Color = "#ffcc00",
});
// Scoped label
var devopsCreate = new GitLab.ProjectLabel("devopsCreate", new()
{
Project = gitlab_project.Example.Id,
Description = "issue for creating infrastructure resources",
Color = "#ffa500",
});
});
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v6/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"),
Description: pulumi.String("issue with failing tests"),
Color: pulumi.String("#ffcc00"),
})
if err != nil {
return err
}
// Scoped label
_, err = gitlab.NewProjectLabel(ctx, "devopsCreate", &gitlab.ProjectLabelArgs{
Project: pulumi.Any(gitlab_project.Example.Id),
Description: pulumi.String("issue for creating infrastructure resources"),
Color: pulumi.String("#ffa500"),
})
if err != nil {
return err
}
return nil
})
}
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")
.description("issue with failing tests")
.color("#ffcc00")
.build());
// Scoped label
var devopsCreate = new ProjectLabel("devopsCreate", ProjectLabelArgs.builder()
.project(gitlab_project.example().id())
.description("issue for creating infrastructure resources")
.color("#ffa500")
.build());
}
}
resources:
fixme:
type: gitlab:ProjectLabel
properties:
project: example
description: issue with failing tests
color: '#ffcc00'
# Scoped label
devopsCreate:
type: gitlab:ProjectLabel
properties:
project: ${gitlab_project.example.id}
description: issue for creating infrastructure resources
color: '#ffa500'

Import

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

Constructors

Link copied to clipboard
constructor(color: Output<String>? = null, description: Output<String>? = null, name: Output<String>? = null, project: Output<String>? = null)

Properties

Link copied to clipboard
val color: Output<String>? = null

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
val description: Output<String>? = null

The description of the label.

Link copied to clipboard
val name: Output<String>? = null

The name of the label.

Link copied to clipboard
val project: Output<String>? = null

The name or id of the project to add the label to.

Functions

Link copied to clipboard
open override fun toJava(): ProjectLabelArgs