import * as pulumi from "@pulumi/pulumi"; /** * > Note: github.TeamRepository cannot be used in conjunction with github.RepositoryCollaborators or * they will fight over what your policy should be. * * 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`. * * This resource is non-authoritative, for managing ALL collaborators of a repo, use github.RepositoryCollaborators * instead. * * ## Example Usage * * ```typescript * 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", { * name: "SomeTeam", * description: "Some cool team", * }); * const someRepo = new github.Repository("some_repo", {name: "some-repo"}); * const someTeamRepo = new github.TeamRepository("some_team_repo", { * teamId: someTeam.id, * repository: someRepo.name, * permission: "pull", * }); * ``` * * ## Import * * GitHub Team Repository can be imported using an ID made up of `team_id:repository` or `team_name:repository`, e.g. * * ```sh * $ pulumi import github:index/teamRepository:TeamRepository terraform_repo 1234567:terraform * ``` * * ```sh * $ pulumi import github:index/teamRepository:TeamRepository terraform_repo Administrators:terraform * ``` */ export declare class TeamRepository extends pulumi.CustomResource { /** * Get an existing TeamRepository resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: TeamRepositoryState, opts?: pulumi.CustomResourceOptions): TeamRepository; /** * Returns true if the given object is an instance of TeamRepository. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is TeamRepository; readonly etag: pulumi.Output; /** * The permissions of team members regarding the repository. * Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. */ readonly permission: pulumi.Output; /** * The repository to add to the team. */ readonly repository: pulumi.Output; /** * The GitHub team id or the GitHub team slug */ readonly teamId: pulumi.Output; /** * Create a TeamRepository resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: TeamRepositoryArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering TeamRepository resources. */ export interface TeamRepositoryState { etag?: pulumi.Input; /** * The permissions of team members regarding the repository. * Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. */ permission?: pulumi.Input; /** * The repository to add to the team. */ repository?: pulumi.Input; /** * The GitHub team id or the GitHub team slug */ teamId?: pulumi.Input; } /** * The set of arguments for constructing a TeamRepository resource. */ export interface TeamRepositoryArgs { /** * The permissions of team members regarding the repository. * Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. */ permission?: pulumi.Input; /** * The repository to add to the team. */ repository: pulumi.Input; /** * The GitHub team id or the GitHub team slug */ teamId: pulumi.Input; }