1. Packages
  2. Gitlab Provider
  3. API Docs
  4. ProjectMilestone
GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi

gitlab.ProjectMilestone

Explore with Pulumi AI

gitlab logo
GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    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.
    DueDate string
    The due date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
    StartDate 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.
    DueDate string
    The due date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
    StartDate 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.
    dueDate String
    The due date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
    startDate 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.
    dueDate string
    The due date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
    startDate 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.
    dueDate String
    The due date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
    startDate 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:

    CreatedAt 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.
    MilestoneId int
    The instance-wide ID of the project’s milestone.
    ProjectId int
    The project ID of milestone.
    UpdatedAt string
    The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
    WebUrl string
    The web URL of the milestone.
    CreatedAt 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.
    MilestoneId int
    The instance-wide ID of the project’s milestone.
    ProjectId int
    The project ID of milestone.
    UpdatedAt string
    The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
    WebUrl string
    The web URL of the milestone.
    createdAt 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.
    milestoneId Integer
    The instance-wide ID of the project’s milestone.
    projectId Integer
    The project ID of milestone.
    updatedAt String
    The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
    webUrl String
    The web URL of the milestone.
    createdAt 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.
    milestoneId number
    The instance-wide ID of the project’s milestone.
    projectId number
    The project ID of milestone.
    updatedAt string
    The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
    webUrl 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.
    createdAt 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.
    milestoneId Number
    The instance-wide ID of the project’s milestone.
    projectId Number
    The project ID of milestone.
    updatedAt String
    The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
    webUrl 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.
    The following state arguments are supported:
    CreatedAt 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.
    DueDate 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.
    MilestoneId 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.
    ProjectId int
    The project ID of milestone.
    StartDate 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.
    UpdatedAt string
    The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
    WebUrl string
    The web URL of the milestone.
    CreatedAt 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.
    DueDate 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.
    MilestoneId 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.
    ProjectId int
    The project ID of milestone.
    StartDate 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.
    UpdatedAt string
    The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
    WebUrl string
    The web URL of the milestone.
    createdAt 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.
    dueDate 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.
    milestoneId 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.
    projectId Integer
    The project ID of milestone.
    startDate 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.
    updatedAt String
    The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
    webUrl String
    The web URL of the milestone.
    createdAt 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.
    dueDate 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.
    milestoneId 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.
    projectId number
    The project ID of milestone.
    startDate 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.
    updatedAt string
    The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
    webUrl 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.
    createdAt 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.
    dueDate 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.
    milestoneId 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.
    projectId Number
    The project ID of milestone.
    startDate 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.
    updatedAt String
    The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
    webUrl 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.
    gitlab logo
    GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi