github.RepositoryMilestone
Explore with Pulumi AI
Provides a GitHub repository milestone resource.
This resource allows you to create and manage milestones for a GitHub Repository within an organization or user account.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
// Create a milestone for a repository
const example = new github.RepositoryMilestone("example", {
owner: "example-owner",
repository: "example-repository",
title: "v1.1.0",
});
import pulumi
import pulumi_github as github
# Create a milestone for a repository
example = github.RepositoryMilestone("example",
owner="example-owner",
repository="example-repository",
title="v1.1.0")
package main
import (
"github.com/pulumi/pulumi-github/sdk/v6/go/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a milestone for a repository
_, err := github.NewRepositoryMilestone(ctx, "example", &github.RepositoryMilestoneArgs{
Owner: pulumi.String("example-owner"),
Repository: pulumi.String("example-repository"),
Title: pulumi.String("v1.1.0"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
// Create a milestone for a repository
var example = new Github.RepositoryMilestone("example", new()
{
Owner = "example-owner",
Repository = "example-repository",
Title = "v1.1.0",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.RepositoryMilestone;
import com.pulumi.github.RepositoryMilestoneArgs;
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 milestone for a repository
var example = new RepositoryMilestone("example", RepositoryMilestoneArgs.builder()
.owner("example-owner")
.repository("example-repository")
.title("v1.1.0")
.build());
}
}
resources:
# Create a milestone for a repository
example:
type: github:RepositoryMilestone
properties:
owner: example-owner
repository: example-repository
title: v1.1.0
Create RepositoryMilestone Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RepositoryMilestone(name: string, args: RepositoryMilestoneArgs, opts?: CustomResourceOptions);
@overload
def RepositoryMilestone(resource_name: str,
args: RepositoryMilestoneArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RepositoryMilestone(resource_name: str,
opts: Optional[ResourceOptions] = None,
owner: Optional[str] = None,
repository: Optional[str] = None,
title: Optional[str] = None,
description: Optional[str] = None,
due_date: Optional[str] = None,
state: Optional[str] = None)
func NewRepositoryMilestone(ctx *Context, name string, args RepositoryMilestoneArgs, opts ...ResourceOption) (*RepositoryMilestone, error)
public RepositoryMilestone(string name, RepositoryMilestoneArgs args, CustomResourceOptions? opts = null)
public RepositoryMilestone(String name, RepositoryMilestoneArgs args)
public RepositoryMilestone(String name, RepositoryMilestoneArgs args, CustomResourceOptions options)
type: github:RepositoryMilestone
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 RepositoryMilestoneArgs
- 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 RepositoryMilestoneArgs
- 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 RepositoryMilestoneArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RepositoryMilestoneArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RepositoryMilestoneArgs
- 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 repositoryMilestoneResource = new Github.RepositoryMilestone("repositoryMilestoneResource", new()
{
Owner = "string",
Repository = "string",
Title = "string",
Description = "string",
DueDate = "string",
State = "string",
});
example, err := github.NewRepositoryMilestone(ctx, "repositoryMilestoneResource", &github.RepositoryMilestoneArgs{
Owner: pulumi.String("string"),
Repository: pulumi.String("string"),
Title: pulumi.String("string"),
Description: pulumi.String("string"),
DueDate: pulumi.String("string"),
State: pulumi.String("string"),
})
var repositoryMilestoneResource = new RepositoryMilestone("repositoryMilestoneResource", RepositoryMilestoneArgs.builder()
.owner("string")
.repository("string")
.title("string")
.description("string")
.dueDate("string")
.state("string")
.build());
repository_milestone_resource = github.RepositoryMilestone("repositoryMilestoneResource",
owner="string",
repository="string",
title="string",
description="string",
due_date="string",
state="string")
const repositoryMilestoneResource = new github.RepositoryMilestone("repositoryMilestoneResource", {
owner: "string",
repository: "string",
title: "string",
description: "string",
dueDate: "string",
state: "string",
});
type: github:RepositoryMilestone
properties:
description: string
dueDate: string
owner: string
repository: string
state: string
title: string
RepositoryMilestone 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 RepositoryMilestone resource accepts the following input properties:
- Owner string
- The owner of the GitHub Repository.
- Repository string
- The name of the GitHub Repository.
- Title string
- The title of the milestone.
- Description string
- A description of the milestone.
- Due
Date string - The milestone due date. In
yyyy-mm-dd
format. - State string
- The state of the milestone. Either
open
orclosed
. Default:open
- Owner string
- The owner of the GitHub Repository.
- Repository string
- The name of the GitHub Repository.
- Title string
- The title of the milestone.
- Description string
- A description of the milestone.
- Due
Date string - The milestone due date. In
yyyy-mm-dd
format. - State string
- The state of the milestone. Either
open
orclosed
. Default:open
- owner String
- The owner of the GitHub Repository.
- repository String
- The name of the GitHub Repository.
- title String
- The title of the milestone.
- description String
- A description of the milestone.
- due
Date String - The milestone due date. In
yyyy-mm-dd
format. - state String
- The state of the milestone. Either
open
orclosed
. Default:open
- owner string
- The owner of the GitHub Repository.
- repository string
- The name of the GitHub Repository.
- title string
- The title of the milestone.
- description string
- A description of the milestone.
- due
Date string - The milestone due date. In
yyyy-mm-dd
format. - state string
- The state of the milestone. Either
open
orclosed
. Default:open
- owner str
- The owner of the GitHub Repository.
- repository str
- The name of the GitHub Repository.
- title str
- The title of the milestone.
- description str
- A description of the milestone.
- due_
date str - The milestone due date. In
yyyy-mm-dd
format. - state str
- The state of the milestone. Either
open
orclosed
. Default:open
- owner String
- The owner of the GitHub Repository.
- repository String
- The name of the GitHub Repository.
- title String
- The title of the milestone.
- description String
- A description of the milestone.
- due
Date String - The milestone due date. In
yyyy-mm-dd
format. - state String
- The state of the milestone. Either
open
orclosed
. Default:open
Outputs
All input properties are implicitly available as output properties. Additionally, the RepositoryMilestone resource produces the following output properties:
Look up Existing RepositoryMilestone Resource
Get an existing RepositoryMilestone 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?: RepositoryMilestoneState, opts?: CustomResourceOptions): RepositoryMilestone
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
due_date: Optional[str] = None,
number: Optional[int] = None,
owner: Optional[str] = None,
repository: Optional[str] = None,
state: Optional[str] = None,
title: Optional[str] = None) -> RepositoryMilestone
func GetRepositoryMilestone(ctx *Context, name string, id IDInput, state *RepositoryMilestoneState, opts ...ResourceOption) (*RepositoryMilestone, error)
public static RepositoryMilestone Get(string name, Input<string> id, RepositoryMilestoneState? state, CustomResourceOptions? opts = null)
public static RepositoryMilestone get(String name, Output<String> id, RepositoryMilestoneState 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.
- Description string
- A description of the milestone.
- Due
Date string - The milestone due date. In
yyyy-mm-dd
format. - Number int
- The number of the milestone.
- Owner string
- The owner of the GitHub Repository.
- Repository string
- The name of the GitHub Repository.
- State string
- The state of the milestone. Either
open
orclosed
. Default:open
- Title string
- The title of the milestone.
- Description string
- A description of the milestone.
- Due
Date string - The milestone due date. In
yyyy-mm-dd
format. - Number int
- The number of the milestone.
- Owner string
- The owner of the GitHub Repository.
- Repository string
- The name of the GitHub Repository.
- State string
- The state of the milestone. Either
open
orclosed
. Default:open
- Title string
- The title of the milestone.
- description String
- A description of the milestone.
- due
Date String - The milestone due date. In
yyyy-mm-dd
format. - number Integer
- The number of the milestone.
- owner String
- The owner of the GitHub Repository.
- repository String
- The name of the GitHub Repository.
- state String
- The state of the milestone. Either
open
orclosed
. Default:open
- title String
- The title of the milestone.
- description string
- A description of the milestone.
- due
Date string - The milestone due date. In
yyyy-mm-dd
format. - number number
- The number of the milestone.
- owner string
- The owner of the GitHub Repository.
- repository string
- The name of the GitHub Repository.
- state string
- The state of the milestone. Either
open
orclosed
. Default:open
- title string
- The title of the milestone.
- description str
- A description of the milestone.
- due_
date str - The milestone due date. In
yyyy-mm-dd
format. - number int
- The number of the milestone.
- owner str
- The owner of the GitHub Repository.
- repository str
- The name of the GitHub Repository.
- state str
- The state of the milestone. Either
open
orclosed
. Default:open
- title str
- The title of the milestone.
- description String
- A description of the milestone.
- due
Date String - The milestone due date. In
yyyy-mm-dd
format. - number Number
- The number of the milestone.
- owner String
- The owner of the GitHub Repository.
- repository String
- The name of the GitHub Repository.
- state String
- The state of the milestone. Either
open
orclosed
. Default:open
- title String
- The title of the milestone.
Import
A GitHub Repository Milestone can be imported using an ID made up of owner/repository/number
, e.g.
$ pulumi import github:index/repositoryMilestone:RepositoryMilestone example example-owner/example-repository/1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- GitHub pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
github
Terraform Provider.