gitlab.ProjectMilestone
Explore with Pulumi AI
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 example = new gitlab.Project("example", {
name: "example",
description: "An example project",
namespaceId: exampleGitlabGroup.id,
});
const exampleProjectMilestone = new gitlab.ProjectMilestone("example", {
project: example.id,
title: "example",
});
import pulumi
import pulumi_gitlab as gitlab
# Create a project for the milestone to use
example = gitlab.Project("example",
name="example",
description="An example project",
namespace_id=example_gitlab_group["id"])
example_project_milestone = gitlab.ProjectMilestone("example",
project=example.id,
title="example")
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 {
// Create a project for the milestone to use
example, err := gitlab.NewProject(ctx, "example", &gitlab.ProjectArgs{
Name: pulumi.String("example"),
Description: pulumi.String("An example project"),
NamespaceId: pulumi.Any(exampleGitlabGroup.Id),
})
if err != nil {
return err
}
_, err = gitlab.NewProjectMilestone(ctx, "example", &gitlab.ProjectMilestoneArgs{
Project: example.ID(),
Title: pulumi.String("example"),
})
if err != nil {
return err
}
return nil
})
}
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 example = new GitLab.Project("example", new()
{
Name = "example",
Description = "An example project",
NamespaceId = exampleGitlabGroup.Id,
});
var exampleProjectMilestone = new GitLab.ProjectMilestone("example", new()
{
Project = example.Id,
Title = "example",
});
});
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 example = new Project("example", ProjectArgs.builder()
.name("example")
.description("An example project")
.namespaceId(exampleGitlabGroup.id())
.build());
var exampleProjectMilestone = new ProjectMilestone("exampleProjectMilestone", ProjectMilestoneArgs.builder()
.project(example.id())
.title("example")
.build());
}
}
resources:
# Create a project for the milestone to use
example:
type: gitlab:Project
properties:
name: example
description: An example project
namespaceId: ${exampleGitlabGroup.id}
exampleProjectMilestone:
type: gitlab:ProjectMilestone
name: example
properties:
project: ${example.id}
title: example
Create ProjectMilestone Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProjectMilestone(name: string, args: ProjectMilestoneArgs, opts?: CustomResourceOptions);
@overload
def ProjectMilestone(resource_name: str,
args: ProjectMilestoneArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProjectMilestone(resource_name: str,
opts: Optional[ResourceOptions] = None,
project: Optional[str] = None,
title: Optional[str] = None,
description: Optional[str] = None,
due_date: Optional[str] = None,
start_date: Optional[str] = None,
state: Optional[str] = None)
func NewProjectMilestone(ctx *Context, name string, args ProjectMilestoneArgs, opts ...ResourceOption) (*ProjectMilestone, error)
public ProjectMilestone(string name, ProjectMilestoneArgs args, CustomResourceOptions? opts = null)
public ProjectMilestone(String name, ProjectMilestoneArgs args)
public ProjectMilestone(String name, ProjectMilestoneArgs args, CustomResourceOptions options)
type: gitlab:ProjectMilestone
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ProjectMilestoneArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ProjectMilestoneArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ProjectMilestoneArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectMilestoneArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProjectMilestoneArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var projectMilestoneResource = new GitLab.ProjectMilestone("projectMilestoneResource", new()
{
Project = "string",
Title = "string",
Description = "string",
DueDate = "string",
StartDate = "string",
State = "string",
});
example, err := gitlab.NewProjectMilestone(ctx, "projectMilestoneResource", &gitlab.ProjectMilestoneArgs{
Project: pulumi.String("string"),
Title: pulumi.String("string"),
Description: pulumi.String("string"),
DueDate: pulumi.String("string"),
StartDate: pulumi.String("string"),
State: pulumi.String("string"),
})
var projectMilestoneResource = new ProjectMilestone("projectMilestoneResource", ProjectMilestoneArgs.builder()
.project("string")
.title("string")
.description("string")
.dueDate("string")
.startDate("string")
.state("string")
.build());
project_milestone_resource = gitlab.ProjectMilestone("projectMilestoneResource",
project="string",
title="string",
description="string",
due_date="string",
start_date="string",
state="string")
const projectMilestoneResource = new gitlab.ProjectMilestone("projectMilestoneResource", {
project: "string",
title: "string",
description: "string",
dueDate: "string",
startDate: "string",
state: "string",
});
type: gitlab:ProjectMilestone
properties:
description: string
dueDate: string
project: string
startDate: string
state: string
title: string
ProjectMilestone Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ProjectMilestone resource accepts the following input properties:
- Project string
- The ID or URL-encoded path of the project owned by the authenticated user.
- Title string
- The title of a milestone.
- Description string
- The description of the milestone.
- Due
Date string - The due date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- Start
Date string - The start date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- State string
- The state of the milestone. Valid values are:
active
,closed
.
- Project string
- The ID or URL-encoded path of the project owned by the authenticated user.
- Title string
- The title of a milestone.
- Description string
- The description of the milestone.
- Due
Date string - The due date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- Start
Date string - The start date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- State string
- The state of the milestone. Valid values are:
active
,closed
.
- project String
- The ID or URL-encoded path of the project owned by the authenticated user.
- title String
- The title of a milestone.
- description String
- The description of the milestone.
- due
Date String - The due date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- start
Date String - The start date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- state String
- The state of the milestone. Valid values are:
active
,closed
.
- project string
- The ID or URL-encoded path of the project owned by the authenticated user.
- title string
- The title of a milestone.
- description string
- The description of the milestone.
- due
Date string - The due date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- start
Date string - The start date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- state string
- The state of the milestone. Valid values are:
active
,closed
.
- project str
- The ID or URL-encoded path of the project owned by the authenticated user.
- title str
- The title of a milestone.
- description str
- The description of the milestone.
- due_
date str - The due date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- start_
date str - The start date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- state str
- The state of the milestone. Valid values are:
active
,closed
.
- project String
- The ID or URL-encoded path of the project owned by the authenticated user.
- title String
- The title of a milestone.
- description String
- The description of the milestone.
- due
Date String - The due date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- start
Date String - The start date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- state String
- The state of the milestone. Valid values are:
active
,closed
.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProjectMilestone resource produces the following output properties:
- Created
At string - The time of creation of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- Expired bool
- Bool, true if milestone expired.
- Id string
- The provider-assigned unique ID for this managed resource.
- Iid int
- The ID of the project's milestone.
- Milestone
Id int - The instance-wide ID of the project’s milestone.
- Project
Id int - The project ID of milestone.
- Updated
At string - The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- Web
Url string - The web URL of the milestone.
- Created
At string - The time of creation of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- Expired bool
- Bool, true if milestone expired.
- Id string
- The provider-assigned unique ID for this managed resource.
- Iid int
- The ID of the project's milestone.
- Milestone
Id int - The instance-wide ID of the project’s milestone.
- Project
Id int - The project ID of milestone.
- Updated
At string - The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- Web
Url string - The web URL of the milestone.
- created
At String - The time of creation of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- expired Boolean
- Bool, true if milestone expired.
- id String
- The provider-assigned unique ID for this managed resource.
- iid Integer
- The ID of the project's milestone.
- milestone
Id Integer - The instance-wide ID of the project’s milestone.
- project
Id Integer - The project ID of milestone.
- updated
At String - The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- web
Url String - The web URL of the milestone.
- created
At string - The time of creation of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- expired boolean
- Bool, true if milestone expired.
- id string
- The provider-assigned unique ID for this managed resource.
- iid number
- The ID of the project's milestone.
- milestone
Id number - The instance-wide ID of the project’s milestone.
- project
Id number - The project ID of milestone.
- updated
At string - The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- web
Url string - The web URL of the milestone.
- created_
at str - The time of creation of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- expired bool
- Bool, true if milestone expired.
- id str
- The provider-assigned unique ID for this managed resource.
- iid int
- The ID of the project's milestone.
- milestone_
id int - The instance-wide ID of the project’s milestone.
- project_
id int - The project ID of milestone.
- updated_
at str - The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- web_
url str - The web URL of the milestone.
- created
At String - The time of creation of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- expired Boolean
- Bool, true if milestone expired.
- id String
- The provider-assigned unique ID for this managed resource.
- iid Number
- The ID of the project's milestone.
- milestone
Id Number - The instance-wide ID of the project’s milestone.
- project
Id Number - The project ID of milestone.
- updated
At String - The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- web
Url String - The web URL of the milestone.
Look up Existing ProjectMilestone Resource
Get an existing ProjectMilestone resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ProjectMilestoneState, opts?: CustomResourceOptions): ProjectMilestone
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
description: Optional[str] = None,
due_date: Optional[str] = None,
expired: Optional[bool] = None,
iid: Optional[int] = None,
milestone_id: Optional[int] = None,
project: Optional[str] = None,
project_id: Optional[int] = None,
start_date: Optional[str] = None,
state: Optional[str] = None,
title: Optional[str] = None,
updated_at: Optional[str] = None,
web_url: Optional[str] = None) -> ProjectMilestone
func GetProjectMilestone(ctx *Context, name string, id IDInput, state *ProjectMilestoneState, opts ...ResourceOption) (*ProjectMilestone, error)
public static ProjectMilestone Get(string name, Input<string> id, ProjectMilestoneState? state, CustomResourceOptions? opts = null)
public static ProjectMilestone get(String name, Output<String> id, ProjectMilestoneState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Created
At string - The time of creation of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- Description string
- The description of the milestone.
- Due
Date string - The due date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- Expired bool
- Bool, true if milestone expired.
- Iid int
- The ID of the project's milestone.
- Milestone
Id int - The instance-wide ID of the project’s milestone.
- Project string
- The ID or URL-encoded path of the project owned by the authenticated user.
- Project
Id int - The project ID of milestone.
- Start
Date string - The start date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- State string
- The state of the milestone. Valid values are:
active
,closed
. - Title string
- The title of a milestone.
- Updated
At string - The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- Web
Url string - The web URL of the milestone.
- Created
At string - The time of creation of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- Description string
- The description of the milestone.
- Due
Date string - The due date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- Expired bool
- Bool, true if milestone expired.
- Iid int
- The ID of the project's milestone.
- Milestone
Id int - The instance-wide ID of the project’s milestone.
- Project string
- The ID or URL-encoded path of the project owned by the authenticated user.
- Project
Id int - The project ID of milestone.
- Start
Date string - The start date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- State string
- The state of the milestone. Valid values are:
active
,closed
. - Title string
- The title of a milestone.
- Updated
At string - The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- Web
Url string - The web URL of the milestone.
- created
At String - The time of creation of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- description String
- The description of the milestone.
- due
Date String - The due date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- expired Boolean
- Bool, true if milestone expired.
- iid Integer
- The ID of the project's milestone.
- milestone
Id Integer - The instance-wide ID of the project’s milestone.
- project String
- The ID or URL-encoded path of the project owned by the authenticated user.
- project
Id Integer - The project ID of milestone.
- start
Date String - The start date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- state String
- The state of the milestone. Valid values are:
active
,closed
. - title String
- The title of a milestone.
- updated
At String - The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- web
Url String - The web URL of the milestone.
- created
At string - The time of creation of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- description string
- The description of the milestone.
- due
Date string - The due date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- expired boolean
- Bool, true if milestone expired.
- iid number
- The ID of the project's milestone.
- milestone
Id number - The instance-wide ID of the project’s milestone.
- project string
- The ID or URL-encoded path of the project owned by the authenticated user.
- project
Id number - The project ID of milestone.
- start
Date string - The start date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- state string
- The state of the milestone. Valid values are:
active
,closed
. - title string
- The title of a milestone.
- updated
At string - The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- web
Url string - The web URL of the milestone.
- created_
at str - The time of creation of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- description str
- The description of the milestone.
- due_
date str - The due date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- expired bool
- Bool, true if milestone expired.
- iid int
- The ID of the project's milestone.
- milestone_
id int - The instance-wide ID of the project’s milestone.
- project str
- The ID or URL-encoded path of the project owned by the authenticated user.
- project_
id int - The project ID of milestone.
- start_
date str - The start date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- state str
- The state of the milestone. Valid values are:
active
,closed
. - title str
- The title of a milestone.
- updated_
at str - The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- web_
url str - The web URL of the milestone.
- created
At String - The time of creation of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- description String
- The description of the milestone.
- due
Date String - The due date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- expired Boolean
- Bool, true if milestone expired.
- iid Number
- The ID of the project's milestone.
- milestone
Id Number - The instance-wide ID of the project’s milestone.
- project String
- The ID or URL-encoded path of the project owned by the authenticated user.
- project
Id Number - The project ID of milestone.
- start
Date String - The start date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- state String
- The state of the milestone. Valid values are:
active
,closed
. - title String
- The title of a milestone.
- updated
At String - The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- web
Url String - The web URL of the milestone.
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"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- GitLab pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
gitlab
Terraform Provider.