Project Milestone Args
data class ProjectMilestoneArgs(val description: Output<String>? = null, val dueDate: Output<String>? = null, val project: Output<String>? = null, val startDate: Output<String>? = null, val state: Output<String>? = null, val title: Output<String>? = null) : ConvertibleToJava<ProjectMilestoneArgs>
The gitlab.ProjectMilestone
resource allows to manage the lifecycle of a project milestone. Upstream API: GitLab REST API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
// Create a project for the milestone to use
const exampleProject = new gitlab.Project("exampleProject", {
description: "An example project",
namespaceId: gitlab_group.example.id,
});
const exampleProjectMilestone = new gitlab.ProjectMilestone("exampleProjectMilestone", {
project: exampleProject.id,
title: "example",
});
Content copied to clipboard
import pulumi
import pulumi_gitlab as gitlab
# Create a project for the milestone to use
example_project = gitlab.Project("exampleProject",
description="An example project",
namespace_id=gitlab_group["example"]["id"])
example_project_milestone = gitlab.ProjectMilestone("exampleProjectMilestone",
project=example_project.id,
title="example")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
// Create a project for the milestone to use
var exampleProject = new GitLab.Project("exampleProject", new()
{
Description = "An example project",
NamespaceId = gitlab_group.Example.Id,
});
var exampleProjectMilestone = new GitLab.ProjectMilestone("exampleProjectMilestone", new()
{
Project = exampleProject.Id,
Title = "example",
});
});
Content copied to clipboard
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 {
// Create a project for the milestone to use
exampleProject, err := gitlab.NewProject(ctx, "exampleProject", &gitlab.ProjectArgs{
Description: pulumi.String("An example project"),
NamespaceId: pulumi.Any(gitlab_group.Example.Id),
})
if err != nil {
return err
}
_, err = gitlab.NewProjectMilestone(ctx, "exampleProjectMilestone", &gitlab.ProjectMilestoneArgs{
Project: exampleProject.ID(),
Title: pulumi.String("example"),
})
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.Project;
import com.pulumi.gitlab.ProjectArgs;
import com.pulumi.gitlab.ProjectMilestone;
import com.pulumi.gitlab.ProjectMilestoneArgs;
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) {
// Create a project for the milestone to use
var exampleProject = new Project("exampleProject", ProjectArgs.builder()
.description("An example project")
.namespaceId(gitlab_group.example().id())
.build());
var exampleProjectMilestone = new ProjectMilestone("exampleProjectMilestone", ProjectMilestoneArgs.builder()
.project(exampleProject.id())
.title("example")
.build());
}
}
Content copied to clipboard
resources:
# Create a project for the milestone to use
exampleProject:
type: gitlab:Project
properties:
description: An example project
namespaceId: ${gitlab_group.example.id}
exampleProjectMilestone:
type: gitlab:ProjectMilestone
properties:
project: ${exampleProject.id}
title: example
Content copied to clipboard
Import
Gitlab project milestone can be imported with a key composed of <project>:<milestone_id>
, e.g.
$ pulumi import gitlab:index/projectMilestone:ProjectMilestone example "12345:11"
Content copied to clipboard