TeamRepository

This resource manages relationships between teams and repositories in your GitHub organization.

Creating this resource grants a particular team permissions on a particular repository.

The repository and the team must both belong to the same organization on GitHub. This resource does not actually create any repositories; to do that, see github..Repository.

Example Usage

using Pulumi;
using Github = Pulumi.Github;

class MyStack : Stack
{
    public MyStack()
    {
        // Add a repository to the team
        var someTeam = new Github.Team("someTeam", new Github.TeamArgs
        {
            Description = "Some cool team",
        });
        var someRepo = new Github.Repository("someRepo", new Github.RepositoryArgs
        {
        });
        var someTeamRepo = new Github.TeamRepository("someTeamRepo", new Github.TeamRepositoryArgs
        {
            Permission = "pull",
            Repository = someRepo.Name,
            TeamId = someTeam.Id,
        });
    }

}

Coming soon!

import pulumi
import pulumi_github as github

# Add a repository to the team
some_team = github.Team("someTeam", description="Some cool team")
some_repo = github.Repository("someRepo")
some_team_repo = github.TeamRepository("someTeamRepo",
    permission="pull",
    repository=some_repo.name,
    team_id=some_team.id)
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";

// Add a repository to the team
const someTeam = new github.Team("some_team", {
    description: "Some cool team",
});
const someRepo = new github.Repository("some_repo", {});
const someTeamRepo = new github.TeamRepository("some_team_repo", {
    permission: "pull",
    repository: someRepo.name,
    teamId: someTeam.id,
});

Create a TeamRepository Resource

def TeamRepository(resource_name, opts=None, permission=None, repository=None, team_id=None, __props__=None);
name string
The unique name of the resource.
args TeamRepositoryArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args TeamRepositoryArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args TeamRepositoryArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

TeamRepository Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The TeamRepository resource accepts the following input properties:

Repository string

The repository to add to the team.

TeamId string

The GitHub team id

Permission string

The permissions of team members regarding the repository. Must be one of pull, triage, push, maintain, or admin. Defaults to pull.

Repository string

The repository to add to the team.

TeamId string

The GitHub team id

Permission string

The permissions of team members regarding the repository. Must be one of pull, triage, push, maintain, or admin. Defaults to pull.

repository string

The repository to add to the team.

teamId string

The GitHub team id

permission string

The permissions of team members regarding the repository. Must be one of pull, triage, push, maintain, or admin. Defaults to pull.

repository str

The repository to add to the team.

team_id str

The GitHub team id

permission str

The permissions of team members regarding the repository. Must be one of pull, triage, push, maintain, or admin. Defaults to pull.

Outputs

All input properties are implicitly available as output properties. Additionally, the TeamRepository resource produces the following output properties:

Etag string
Id string
The provider-assigned unique ID for this managed resource.
Etag string
Id string
The provider-assigned unique ID for this managed resource.
etag string
id string
The provider-assigned unique ID for this managed resource.
etag str
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing TeamRepository Resource

Get an existing TeamRepository 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?: TeamRepositoryState, opts?: CustomResourceOptions): TeamRepository
static get(resource_name, id, opts=None, etag=None, permission=None, repository=None, team_id=None, __props__=None);
func GetTeamRepository(ctx *Context, name string, id IDInput, state *TeamRepositoryState, opts ...ResourceOption) (*TeamRepository, error)
public static TeamRepository Get(string name, Input<string> id, TeamRepositoryState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Etag string
Permission string

The permissions of team members regarding the repository. Must be one of pull, triage, push, maintain, or admin. Defaults to pull.

Repository string

The repository to add to the team.

TeamId string

The GitHub team id

Etag string
Permission string

The permissions of team members regarding the repository. Must be one of pull, triage, push, maintain, or admin. Defaults to pull.

Repository string

The repository to add to the team.

TeamId string

The GitHub team id

etag string
permission string

The permissions of team members regarding the repository. Must be one of pull, triage, push, maintain, or admin. Defaults to pull.

repository string

The repository to add to the team.

teamId string

The GitHub team id

etag str
permission str

The permissions of team members regarding the repository. Must be one of pull, triage, push, maintain, or admin. Defaults to pull.

repository str

The repository to add to the team.

team_id str

The GitHub team id

Package Details

Repository
https://github.com/pulumi/pulumi-github
License
Apache-2.0
Notes
This Pulumi package is based on the github Terraform Provider.