github.RepositoryProject
Explore with Pulumi AI
This resource allows you to create and manage projects for GitHub repository.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = new github.Repository("example", {
name: "example",
description: "My awesome codebase",
hasProjects: true,
});
const project = new github.RepositoryProject("project", {
name: "A Repository Project",
repository: example.name,
body: "This is a repository project.",
});
import pulumi
import pulumi_github as github
example = github.Repository("example",
name="example",
description="My awesome codebase",
has_projects=True)
project = github.RepositoryProject("project",
name="A Repository Project",
repository=example.name,
body="This is a repository project.")
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 {
example, err := github.NewRepository(ctx, "example", &github.RepositoryArgs{
Name: pulumi.String("example"),
Description: pulumi.String("My awesome codebase"),
HasProjects: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = github.NewRepositoryProject(ctx, "project", &github.RepositoryProjectArgs{
Name: pulumi.String("A Repository Project"),
Repository: example.Name,
Body: pulumi.String("This is a repository project."),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var example = new Github.Repository("example", new()
{
Name = "example",
Description = "My awesome codebase",
HasProjects = true,
});
var project = new Github.RepositoryProject("project", new()
{
Name = "A Repository Project",
Repository = example.Name,
Body = "This is a repository project.",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.Repository;
import com.pulumi.github.RepositoryArgs;
import com.pulumi.github.RepositoryProject;
import com.pulumi.github.RepositoryProjectArgs;
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 example = new Repository("example", RepositoryArgs.builder()
.name("example")
.description("My awesome codebase")
.hasProjects(true)
.build());
var project = new RepositoryProject("project", RepositoryProjectArgs.builder()
.name("A Repository Project")
.repository(example.name())
.body("This is a repository project.")
.build());
}
}
resources:
example:
type: github:Repository
properties:
name: example
description: My awesome codebase
hasProjects: true
project:
type: github:RepositoryProject
properties:
name: A Repository Project
repository: ${example.name}
body: This is a repository project.
Create RepositoryProject Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RepositoryProject(name: string, args: RepositoryProjectArgs, opts?: CustomResourceOptions);
@overload
def RepositoryProject(resource_name: str,
args: RepositoryProjectArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RepositoryProject(resource_name: str,
opts: Optional[ResourceOptions] = None,
repository: Optional[str] = None,
body: Optional[str] = None,
name: Optional[str] = None)
func NewRepositoryProject(ctx *Context, name string, args RepositoryProjectArgs, opts ...ResourceOption) (*RepositoryProject, error)
public RepositoryProject(string name, RepositoryProjectArgs args, CustomResourceOptions? opts = null)
public RepositoryProject(String name, RepositoryProjectArgs args)
public RepositoryProject(String name, RepositoryProjectArgs args, CustomResourceOptions options)
type: github:RepositoryProject
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 RepositoryProjectArgs
- 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 RepositoryProjectArgs
- 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 RepositoryProjectArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RepositoryProjectArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RepositoryProjectArgs
- 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 repositoryProjectResource = new Github.RepositoryProject("repositoryProjectResource", new()
{
Repository = "string",
Body = "string",
Name = "string",
});
example, err := github.NewRepositoryProject(ctx, "repositoryProjectResource", &github.RepositoryProjectArgs{
Repository: pulumi.String("string"),
Body: pulumi.String("string"),
Name: pulumi.String("string"),
})
var repositoryProjectResource = new RepositoryProject("repositoryProjectResource", RepositoryProjectArgs.builder()
.repository("string")
.body("string")
.name("string")
.build());
repository_project_resource = github.RepositoryProject("repositoryProjectResource",
repository="string",
body="string",
name="string")
const repositoryProjectResource = new github.RepositoryProject("repositoryProjectResource", {
repository: "string",
body: "string",
name: "string",
});
type: github:RepositoryProject
properties:
body: string
name: string
repository: string
RepositoryProject 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 RepositoryProject resource accepts the following input properties:
- Repository string
- The repository of the project.
- Body string
- The body of the project.
- Name string
- The name of the project.
- Repository string
- The repository of the project.
- Body string
- The body of the project.
- Name string
- The name of the project.
- repository String
- The repository of the project.
- body String
- The body of the project.
- name String
- The name of the project.
- repository string
- The repository of the project.
- body string
- The body of the project.
- name string
- The name of the project.
- repository str
- The repository of the project.
- body str
- The body of the project.
- name str
- The name of the project.
- repository String
- The repository of the project.
- body String
- The body of the project.
- name String
- The name of the project.
Outputs
All input properties are implicitly available as output properties. Additionally, the RepositoryProject resource produces the following output properties:
Look up Existing RepositoryProject Resource
Get an existing RepositoryProject 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?: RepositoryProjectState, opts?: CustomResourceOptions): RepositoryProject
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
body: Optional[str] = None,
etag: Optional[str] = None,
name: Optional[str] = None,
repository: Optional[str] = None,
url: Optional[str] = None) -> RepositoryProject
func GetRepositoryProject(ctx *Context, name string, id IDInput, state *RepositoryProjectState, opts ...ResourceOption) (*RepositoryProject, error)
public static RepositoryProject Get(string name, Input<string> id, RepositoryProjectState? state, CustomResourceOptions? opts = null)
public static RepositoryProject get(String name, Output<String> id, RepositoryProjectState 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.
- Body string
- The body of the project.
- Etag string
- Name string
- The name of the project.
- Repository string
- The repository of the project.
- Url string
- URL of the project
- Body string
- The body of the project.
- Etag string
- Name string
- The name of the project.
- Repository string
- The repository of the project.
- Url string
- URL of the project
- body String
- The body of the project.
- etag String
- name String
- The name of the project.
- repository String
- The repository of the project.
- url String
- URL of the project
- body string
- The body of the project.
- etag string
- name string
- The name of the project.
- repository string
- The repository of the project.
- url string
- URL of the project
- body str
- The body of the project.
- etag str
- name str
- The name of the project.
- repository str
- The repository of the project.
- url str
- URL of the project
- body String
- The body of the project.
- etag String
- name String
- The name of the project.
- repository String
- The repository of the project.
- url String
- URL of the project
Package Details
- Repository
- GitHub pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
github
Terraform Provider.