1. Registry
  2. Packages
  3. Github Provider
  4. API Docs
  5. RepositoryCollaborators
Viewing docs for GitHub v6.15.0
published on Friday, Aug 14, 2026 by Pulumi
github logo github logo
Viewing docs for GitHub v6.15.0
published on Friday, Aug 14, 2026 by Pulumi

    Manage the complete set of collaborators (users and teams) for a GitHub repository.

    This resource (github.RepositoryCollaborators) cannot be used in conjunction with github.RepositoryCollaborator or github.TeamRepository as they will conflict over the management of collaborators.

    This resource manages the complete set of collaborators for a repository, which includes both users and teams, in an authoritative manner. When applied, the provider will ensure that the set of collaborators for the repository matches the set defined in Terraform configuration. This means that if a collaborator is removed from the configuration, it will be removed from the repository, and if a collaborator is added to the configuration, it will be added to the repository.

    Archived Repositories When a repository is archived, GitHub makes it read-only, preventing collaborator modifications. If you attempt to destroy resources associated with archived repositories, the provider will gracefully handle the operation by logging an informational message and removing the resource from Terraform state without attempting to modify the archived repository.

    Organization Repositories

    For repositories owned by an organization, collaborators can have explicit (and differing levels of) read, write, or administrator access to specific repositories, without giving the user full organization membership.

    Teams

    Teams will be added to the repository on apply, and removed if removed from the configuration or on destroy. Teams added to the repository outside of Terraform can be managed by adding them to the configuration, or ignored by using the ignoreTeam argument. This is particularly important for organization/enterprise teams, which either need to be added to the configuration or ignored, as otherwise they will cause perpetual drift.

    Personal Repositories

    For personal repositories, non-owner collaborators can only be granted write permission. Owners will be ignored unless they are explicitly added, in which case they must be granted admin permission.

    Users

    When applied, an invitation will be sent to the user to become a collaborators on a repository. When destroyed, either the invitation will be cancelled or the collaborators will be removed from the repository.

    Documentation

    Further documentation on GitHub collaborators.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    // Add collaborators to a repository
    const someTeam = new github.Team("some_team", {
        name: "SomeTeam",
        description: "Some cool team",
    });
    const someRepo = new github.Repository("some_repo", {name: "some-repo"});
    const someRepoCollaborators = new github.RepositoryCollaborators("some_repo_collaborators", {
        repository: someRepo.name,
        users: [{
            permission: "admin",
            username: "SomeUser",
        }],
        teams: [{
            permission: "pull",
            teamId: someTeam.slug,
        }],
    });
    
    import pulumi
    import pulumi_github as github
    
    # Add collaborators to a repository
    some_team = github.Team("some_team",
        name="SomeTeam",
        description="Some cool team")
    some_repo = github.Repository("some_repo", name="some-repo")
    some_repo_collaborators = github.RepositoryCollaborators("some_repo_collaborators",
        repository=some_repo.name,
        users=[{
            "permission": "admin",
            "username": "SomeUser",
        }],
        teams=[{
            "permission": "pull",
            "team_id": some_team.slug,
        }])
    
    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 {
    		// Add collaborators to a repository
    		someTeam, err := github.NewTeam(ctx, "some_team", &github.TeamArgs{
    			Name:        pulumi.String("SomeTeam"),
    			Description: pulumi.String("Some cool team"),
    		})
    		if err != nil {
    			return err
    		}
    		someRepo, err := github.NewRepository(ctx, "some_repo", &github.RepositoryArgs{
    			Name: pulumi.String("some-repo"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = github.NewRepositoryCollaborators(ctx, "some_repo_collaborators", &github.RepositoryCollaboratorsArgs{
    			Repository: someRepo.Name,
    			Users: github.RepositoryCollaboratorsUserArray{
    				&github.RepositoryCollaboratorsUserArgs{
    					Permission: pulumi.String("admin"),
    					Username:   pulumi.String("SomeUser"),
    				},
    			},
    			Teams: github.RepositoryCollaboratorsTeamArray{
    				&github.RepositoryCollaboratorsTeamArgs{
    					Permission: pulumi.String("pull"),
    					TeamId:     someTeam.Slug,
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Github = Pulumi.Github;
    
    return await Deployment.RunAsync(() => 
    {
        // Add collaborators to a repository
        var someTeam = new Github.Team("some_team", new()
        {
            Name = "SomeTeam",
            Description = "Some cool team",
        });
    
        var someRepo = new Github.Repository("some_repo", new()
        {
            Name = "some-repo",
        });
    
        var someRepoCollaborators = new Github.RepositoryCollaborators("some_repo_collaborators", new()
        {
            Repository = someRepo.Name,
            Users = new[]
            {
                new Github.Inputs.RepositoryCollaboratorsUserArgs
                {
                    Permission = "admin",
                    Username = "SomeUser",
                },
            },
            Teams = new[]
            {
                new Github.Inputs.RepositoryCollaboratorsTeamArgs
                {
                    Permission = "pull",
                    TeamId = someTeam.Slug,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.github.Team;
    import com.pulumi.github.TeamArgs;
    import com.pulumi.github.Repository;
    import com.pulumi.github.RepositoryArgs;
    import com.pulumi.github.RepositoryCollaborators;
    import com.pulumi.github.RepositoryCollaboratorsArgs;
    import com.pulumi.github.inputs.RepositoryCollaboratorsUserArgs;
    import com.pulumi.github.inputs.RepositoryCollaboratorsTeamArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            // Add collaborators to a repository
            var someTeam = new Team("someTeam", TeamArgs.builder()
                .name("SomeTeam")
                .description("Some cool team")
                .build());
    
            var someRepo = new Repository("someRepo", RepositoryArgs.builder()
                .name("some-repo")
                .build());
    
            var someRepoCollaborators = new RepositoryCollaborators("someRepoCollaborators", RepositoryCollaboratorsArgs.builder()
                .repository(someRepo.name())
                .users(RepositoryCollaboratorsUserArgs.builder()
                    .permission("admin")
                    .username("SomeUser")
                    .build())
                .teams(RepositoryCollaboratorsTeamArgs.builder()
                    .permission("pull")
                    .teamId(someTeam.slug())
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Add collaborators to a repository
      someTeam:
        type: github:Team
        name: some_team
        properties:
          name: SomeTeam
          description: Some cool team
      someRepo:
        type: github:Repository
        name: some_repo
        properties:
          name: some-repo
      someRepoCollaborators:
        type: github:RepositoryCollaborators
        name: some_repo_collaborators
        properties:
          repository: ${someRepo.name}
          users:
            - permission: admin
              username: SomeUser
          teams:
            - permission: pull
              teamId: ${someTeam.slug}
    
    pulumi {
      required_providers {
        github = {
          source = "pulumi/github"
        }
      }
    }
    
    # Add collaborators to a repository
    resource "github_team" "some_team" {
      name        = "SomeTeam"
      description = "Some cool team"
    }
    resource "github_repository" "some_repo" {
      name = "some-repo"
    }
    resource "github_repositorycollaborators" "some_repo_collaborators" {
      repository = github_repository.some_repo.name
      users {
        permission = "admin"
        username   = "SomeUser"
      }
      teams {
        permission = "pull"
        team_id    = github_team.some_team.slug
      }
    }
    

    Create RepositoryCollaborators Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new RepositoryCollaborators(name: string, args: RepositoryCollaboratorsArgs, opts?: CustomResourceOptions);
    @overload
    def RepositoryCollaborators(resource_name: str,
                                args: RepositoryCollaboratorsArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def RepositoryCollaborators(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                repository: Optional[str] = None,
                                ignore_teams: Optional[Sequence[RepositoryCollaboratorsIgnoreTeamArgs]] = None,
                                teams: Optional[Sequence[RepositoryCollaboratorsTeamArgs]] = None,
                                users: Optional[Sequence[RepositoryCollaboratorsUserArgs]] = None)
    func NewRepositoryCollaborators(ctx *Context, name string, args RepositoryCollaboratorsArgs, opts ...ResourceOption) (*RepositoryCollaborators, error)
    public RepositoryCollaborators(string name, RepositoryCollaboratorsArgs args, CustomResourceOptions? opts = null)
    public RepositoryCollaborators(String name, RepositoryCollaboratorsArgs args)
    public RepositoryCollaborators(String name, RepositoryCollaboratorsArgs args, CustomResourceOptions options)
    
    type: github:RepositoryCollaborators
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "github_repository_collaborators" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args RepositoryCollaboratorsArgs
    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 RepositoryCollaboratorsArgs
    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 RepositoryCollaboratorsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RepositoryCollaboratorsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RepositoryCollaboratorsArgs
    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 repositoryCollaboratorsResource = new Github.RepositoryCollaborators("repositoryCollaboratorsResource", new()
    {
        Repository = "string",
        IgnoreTeams = new[]
        {
            new Github.Inputs.RepositoryCollaboratorsIgnoreTeamArgs
            {
                TeamId = "string",
            },
        },
        Teams = new[]
        {
            new Github.Inputs.RepositoryCollaboratorsTeamArgs
            {
                TeamId = "string",
                Permission = "string",
            },
        },
        Users = new[]
        {
            new Github.Inputs.RepositoryCollaboratorsUserArgs
            {
                Username = "string",
                Permission = "string",
            },
        },
    });
    
    example, err := github.NewRepositoryCollaborators(ctx, "repositoryCollaboratorsResource", &github.RepositoryCollaboratorsArgs{
    	Repository: pulumi.String("string"),
    	IgnoreTeams: github.RepositoryCollaboratorsIgnoreTeamArray{
    		&github.RepositoryCollaboratorsIgnoreTeamArgs{
    			TeamId: pulumi.String("string"),
    		},
    	},
    	Teams: github.RepositoryCollaboratorsTeamArray{
    		&github.RepositoryCollaboratorsTeamArgs{
    			TeamId:     pulumi.String("string"),
    			Permission: pulumi.String("string"),
    		},
    	},
    	Users: github.RepositoryCollaboratorsUserArray{
    		&github.RepositoryCollaboratorsUserArgs{
    			Username:   pulumi.String("string"),
    			Permission: pulumi.String("string"),
    		},
    	},
    })
    
    resource "github_repository_collaborators" "repositoryCollaboratorsResource" {
      lifecycle {
        create_before_destroy = true
      }
      repository = "string"
      ignore_teams {
        team_id = "string"
      }
      teams {
        team_id    = "string"
        permission = "string"
      }
      users {
        username   = "string"
        permission = "string"
      }
    }
    
    var repositoryCollaboratorsResource = new RepositoryCollaborators("repositoryCollaboratorsResource", RepositoryCollaboratorsArgs.builder()
        .repository("string")
        .ignoreTeams(RepositoryCollaboratorsIgnoreTeamArgs.builder()
            .teamId("string")
            .build())
        .teams(RepositoryCollaboratorsTeamArgs.builder()
            .teamId("string")
            .permission("string")
            .build())
        .users(RepositoryCollaboratorsUserArgs.builder()
            .username("string")
            .permission("string")
            .build())
        .build());
    
    repository_collaborators_resource = github.RepositoryCollaborators("repositoryCollaboratorsResource",
        repository="string",
        ignore_teams=[{
            "team_id": "string",
        }],
        teams=[{
            "team_id": "string",
            "permission": "string",
        }],
        users=[{
            "username": "string",
            "permission": "string",
        }])
    
    const repositoryCollaboratorsResource = new github.RepositoryCollaborators("repositoryCollaboratorsResource", {
        repository: "string",
        ignoreTeams: [{
            teamId: "string",
        }],
        teams: [{
            teamId: "string",
            permission: "string",
        }],
        users: [{
            username: "string",
            permission: "string",
        }],
    });
    
    type: github:RepositoryCollaborators
    properties:
        ignoreTeams:
            - teamId: string
        repository: string
        teams:
            - permission: string
              teamId: string
        users:
            - permission: string
              username: string
    

    RepositoryCollaborators 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 RepositoryCollaborators resource accepts the following input properties:

    Repository string
    Name of the repository.
    IgnoreTeams List<RepositoryCollaboratorsIgnoreTeam>
    Teams to ignore when managing repository collaborators.
    Teams List<RepositoryCollaboratorsTeam>
    Teams to grant access to the repository.
    Users List<RepositoryCollaboratorsUser>
    Users to grant access to the repository.
    Repository string
    Name of the repository.
    IgnoreTeams []RepositoryCollaboratorsIgnoreTeamArgs
    Teams to ignore when managing repository collaborators.
    Teams []RepositoryCollaboratorsTeamArgs
    Teams to grant access to the repository.
    Users []RepositoryCollaboratorsUserArgs
    Users to grant access to the repository.
    repository string
    Name of the repository.
    ignore_teams list(object)
    Teams to ignore when managing repository collaborators.
    teams list(object)
    Teams to grant access to the repository.
    users list(object)
    Users to grant access to the repository.
    repository String
    Name of the repository.
    ignoreTeams List<RepositoryCollaboratorsIgnoreTeam>
    Teams to ignore when managing repository collaborators.
    teams List<RepositoryCollaboratorsTeam>
    Teams to grant access to the repository.
    users List<RepositoryCollaboratorsUser>
    Users to grant access to the repository.
    repository string
    Name of the repository.
    ignoreTeams RepositoryCollaboratorsIgnoreTeam[]
    Teams to ignore when managing repository collaborators.
    teams RepositoryCollaboratorsTeam[]
    Teams to grant access to the repository.
    users RepositoryCollaboratorsUser[]
    Users to grant access to the repository.
    repository str
    Name of the repository.
    ignore_teams Sequence[RepositoryCollaboratorsIgnoreTeamArgs]
    Teams to ignore when managing repository collaborators.
    teams Sequence[RepositoryCollaboratorsTeamArgs]
    Teams to grant access to the repository.
    users Sequence[RepositoryCollaboratorsUserArgs]
    Users to grant access to the repository.
    repository String
    Name of the repository.
    ignoreTeams List<Property Map>
    Teams to ignore when managing repository collaborators.
    teams List<Property Map>
    Teams to grant access to the repository.
    users List<Property Map>
    Users to grant access to the repository.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    InvitationIds Dictionary<string, string>
    Map of usernames to invitation ID for users that haven't yet accepted their invitation to become a collaborator. This is only set on read, and is used internally to track pending invitations for users that aren't yet collaborators.
    OwnerConfigured bool
    Indicates whether the owner of a personal repository is configured as a collaborator.
    RepositoryId int
    ID of the repository.
    Id string
    The provider-assigned unique ID for this managed resource.
    InvitationIds map[string]string
    Map of usernames to invitation ID for users that haven't yet accepted their invitation to become a collaborator. This is only set on read, and is used internally to track pending invitations for users that aren't yet collaborators.
    OwnerConfigured bool
    Indicates whether the owner of a personal repository is configured as a collaborator.
    RepositoryId int
    ID of the repository.
    id string
    The provider-assigned unique ID for this managed resource.
    invitation_ids map(string)
    Map of usernames to invitation ID for users that haven't yet accepted their invitation to become a collaborator. This is only set on read, and is used internally to track pending invitations for users that aren't yet collaborators.
    owner_configured bool
    Indicates whether the owner of a personal repository is configured as a collaborator.
    repository_id number
    ID of the repository.
    id String
    The provider-assigned unique ID for this managed resource.
    invitationIds Map<String,String>
    Map of usernames to invitation ID for users that haven't yet accepted their invitation to become a collaborator. This is only set on read, and is used internally to track pending invitations for users that aren't yet collaborators.
    ownerConfigured Boolean
    Indicates whether the owner of a personal repository is configured as a collaborator.
    repositoryId Integer
    ID of the repository.
    id string
    The provider-assigned unique ID for this managed resource.
    invitationIds {[key: string]: string}
    Map of usernames to invitation ID for users that haven't yet accepted their invitation to become a collaborator. This is only set on read, and is used internally to track pending invitations for users that aren't yet collaborators.
    ownerConfigured boolean
    Indicates whether the owner of a personal repository is configured as a collaborator.
    repositoryId number
    ID of the repository.
    id str
    The provider-assigned unique ID for this managed resource.
    invitation_ids Mapping[str, str]
    Map of usernames to invitation ID for users that haven't yet accepted their invitation to become a collaborator. This is only set on read, and is used internally to track pending invitations for users that aren't yet collaborators.
    owner_configured bool
    Indicates whether the owner of a personal repository is configured as a collaborator.
    repository_id int
    ID of the repository.
    id String
    The provider-assigned unique ID for this managed resource.
    invitationIds Map<String>
    Map of usernames to invitation ID for users that haven't yet accepted their invitation to become a collaborator. This is only set on read, and is used internally to track pending invitations for users that aren't yet collaborators.
    ownerConfigured Boolean
    Indicates whether the owner of a personal repository is configured as a collaborator.
    repositoryId Number
    ID of the repository.

    Look up Existing RepositoryCollaborators Resource

    Get an existing RepositoryCollaborators 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?: RepositoryCollaboratorsState, opts?: CustomResourceOptions): RepositoryCollaborators
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ignore_teams: Optional[Sequence[RepositoryCollaboratorsIgnoreTeamArgs]] = None,
            invitation_ids: Optional[Mapping[str, str]] = None,
            owner_configured: Optional[bool] = None,
            repository: Optional[str] = None,
            repository_id: Optional[int] = None,
            teams: Optional[Sequence[RepositoryCollaboratorsTeamArgs]] = None,
            users: Optional[Sequence[RepositoryCollaboratorsUserArgs]] = None) -> RepositoryCollaborators
    func GetRepositoryCollaborators(ctx *Context, name string, id IDInput, state *RepositoryCollaboratorsState, opts ...ResourceOption) (*RepositoryCollaborators, error)
    public static RepositoryCollaborators Get(string name, Input<string> id, RepositoryCollaboratorsState? state, CustomResourceOptions? opts = null)
    public static RepositoryCollaborators get(String name, Output<String> id, RepositoryCollaboratorsState state, CustomResourceOptions options)
    resources:  _:    type: github:RepositoryCollaborators    get:      id: ${id}
    import {
      to = github_repository_collaborators.example
      id = "${id}"
    }
    
    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:
    IgnoreTeams List<RepositoryCollaboratorsIgnoreTeam>
    Teams to ignore when managing repository collaborators.
    InvitationIds Dictionary<string, string>
    Map of usernames to invitation ID for users that haven't yet accepted their invitation to become a collaborator. This is only set on read, and is used internally to track pending invitations for users that aren't yet collaborators.
    OwnerConfigured bool
    Indicates whether the owner of a personal repository is configured as a collaborator.
    Repository string
    Name of the repository.
    RepositoryId int
    ID of the repository.
    Teams List<RepositoryCollaboratorsTeam>
    Teams to grant access to the repository.
    Users List<RepositoryCollaboratorsUser>
    Users to grant access to the repository.
    IgnoreTeams []RepositoryCollaboratorsIgnoreTeamArgs
    Teams to ignore when managing repository collaborators.
    InvitationIds map[string]string
    Map of usernames to invitation ID for users that haven't yet accepted their invitation to become a collaborator. This is only set on read, and is used internally to track pending invitations for users that aren't yet collaborators.
    OwnerConfigured bool
    Indicates whether the owner of a personal repository is configured as a collaborator.
    Repository string
    Name of the repository.
    RepositoryId int
    ID of the repository.
    Teams []RepositoryCollaboratorsTeamArgs
    Teams to grant access to the repository.
    Users []RepositoryCollaboratorsUserArgs
    Users to grant access to the repository.
    ignore_teams list(object)
    Teams to ignore when managing repository collaborators.
    invitation_ids map(string)
    Map of usernames to invitation ID for users that haven't yet accepted their invitation to become a collaborator. This is only set on read, and is used internally to track pending invitations for users that aren't yet collaborators.
    owner_configured bool
    Indicates whether the owner of a personal repository is configured as a collaborator.
    repository string
    Name of the repository.
    repository_id number
    ID of the repository.
    teams list(object)
    Teams to grant access to the repository.
    users list(object)
    Users to grant access to the repository.
    ignoreTeams List<RepositoryCollaboratorsIgnoreTeam>
    Teams to ignore when managing repository collaborators.
    invitationIds Map<String,String>
    Map of usernames to invitation ID for users that haven't yet accepted their invitation to become a collaborator. This is only set on read, and is used internally to track pending invitations for users that aren't yet collaborators.
    ownerConfigured Boolean
    Indicates whether the owner of a personal repository is configured as a collaborator.
    repository String
    Name of the repository.
    repositoryId Integer
    ID of the repository.
    teams List<RepositoryCollaboratorsTeam>
    Teams to grant access to the repository.
    users List<RepositoryCollaboratorsUser>
    Users to grant access to the repository.
    ignoreTeams RepositoryCollaboratorsIgnoreTeam[]
    Teams to ignore when managing repository collaborators.
    invitationIds {[key: string]: string}
    Map of usernames to invitation ID for users that haven't yet accepted their invitation to become a collaborator. This is only set on read, and is used internally to track pending invitations for users that aren't yet collaborators.
    ownerConfigured boolean
    Indicates whether the owner of a personal repository is configured as a collaborator.
    repository string
    Name of the repository.
    repositoryId number
    ID of the repository.
    teams RepositoryCollaboratorsTeam[]
    Teams to grant access to the repository.
    users RepositoryCollaboratorsUser[]
    Users to grant access to the repository.
    ignore_teams Sequence[RepositoryCollaboratorsIgnoreTeamArgs]
    Teams to ignore when managing repository collaborators.
    invitation_ids Mapping[str, str]
    Map of usernames to invitation ID for users that haven't yet accepted their invitation to become a collaborator. This is only set on read, and is used internally to track pending invitations for users that aren't yet collaborators.
    owner_configured bool
    Indicates whether the owner of a personal repository is configured as a collaborator.
    repository str
    Name of the repository.
    repository_id int
    ID of the repository.
    teams Sequence[RepositoryCollaboratorsTeamArgs]
    Teams to grant access to the repository.
    users Sequence[RepositoryCollaboratorsUserArgs]
    Users to grant access to the repository.
    ignoreTeams List<Property Map>
    Teams to ignore when managing repository collaborators.
    invitationIds Map<String>
    Map of usernames to invitation ID for users that haven't yet accepted their invitation to become a collaborator. This is only set on read, and is used internally to track pending invitations for users that aren't yet collaborators.
    ownerConfigured Boolean
    Indicates whether the owner of a personal repository is configured as a collaborator.
    repository String
    Name of the repository.
    repositoryId Number
    ID of the repository.
    teams List<Property Map>
    Teams to grant access to the repository.
    users List<Property Map>
    Users to grant access to the repository.

    Supporting Types

    RepositoryCollaboratorsIgnoreTeam, RepositoryCollaboratorsIgnoreTeamArgs

    TeamId string
    ID or slug of the team to ignore.
    TeamId string
    ID or slug of the team to ignore.
    team_id string
    ID or slug of the team to ignore.
    teamId String
    ID or slug of the team to ignore.
    teamId string
    ID or slug of the team to ignore.
    team_id str
    ID or slug of the team to ignore.
    teamId String
    ID or slug of the team to ignore.

    RepositoryCollaboratorsTeam, RepositoryCollaboratorsTeamArgs

    TeamId string
    ID or slug of the team to add to the repository as a collaborator.
    Permission string
    Permission to grant to the team. Must be one of pull, triage, push, maintain, admin or the name of an existing custom repository role within the organization. Defaults to push.
    TeamId string
    ID or slug of the team to add to the repository as a collaborator.
    Permission string
    Permission to grant to the team. Must be one of pull, triage, push, maintain, admin or the name of an existing custom repository role within the organization. Defaults to push.
    team_id string
    ID or slug of the team to add to the repository as a collaborator.
    permission string
    Permission to grant to the team. Must be one of pull, triage, push, maintain, admin or the name of an existing custom repository role within the organization. Defaults to push.
    teamId String
    ID or slug of the team to add to the repository as a collaborator.
    permission String
    Permission to grant to the team. Must be one of pull, triage, push, maintain, admin or the name of an existing custom repository role within the organization. Defaults to push.
    teamId string
    ID or slug of the team to add to the repository as a collaborator.
    permission string
    Permission to grant to the team. Must be one of pull, triage, push, maintain, admin or the name of an existing custom repository role within the organization. Defaults to push.
    team_id str
    ID or slug of the team to add to the repository as a collaborator.
    permission str
    Permission to grant to the team. Must be one of pull, triage, push, maintain, admin or the name of an existing custom repository role within the organization. Defaults to push.
    teamId String
    ID or slug of the team to add to the repository as a collaborator.
    permission String
    Permission to grant to the team. Must be one of pull, triage, push, maintain, admin or the name of an existing custom repository role within the organization. Defaults to push.

    RepositoryCollaboratorsUser, RepositoryCollaboratorsUserArgs

    Username string
    Login for the user to add to the repository as a collaborator.
    Permission string
    Permission to grant to the user. Must be one of pull, triage, push, maintain, admin or the name of an existing custom repository role within the organization. Must be push for personal repositories. Defaults to push.
    Username string
    Login for the user to add to the repository as a collaborator.
    Permission string
    Permission to grant to the user. Must be one of pull, triage, push, maintain, admin or the name of an existing custom repository role within the organization. Must be push for personal repositories. Defaults to push.
    username string
    Login for the user to add to the repository as a collaborator.
    permission string
    Permission to grant to the user. Must be one of pull, triage, push, maintain, admin or the name of an existing custom repository role within the organization. Must be push for personal repositories. Defaults to push.
    username String
    Login for the user to add to the repository as a collaborator.
    permission String
    Permission to grant to the user. Must be one of pull, triage, push, maintain, admin or the name of an existing custom repository role within the organization. Must be push for personal repositories. Defaults to push.
    username string
    Login for the user to add to the repository as a collaborator.
    permission string
    Permission to grant to the user. Must be one of pull, triage, push, maintain, admin or the name of an existing custom repository role within the organization. Must be push for personal repositories. Defaults to push.
    username str
    Login for the user to add to the repository as a collaborator.
    permission str
    Permission to grant to the user. Must be one of pull, triage, push, maintain, admin or the name of an existing custom repository role within the organization. Must be push for personal repositories. Defaults to push.
    username String
    Login for the user to add to the repository as a collaborator.
    permission String
    Permission to grant to the user. Must be one of pull, triage, push, maintain, admin or the name of an existing custom repository role within the organization. Must be push for personal repositories. Defaults to push.

    Import

    The pulumi import command can be used, for example:

    $ pulumi import github:index/repositoryCollaborators:RepositoryCollaborators collaborators example-repo
    

    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.
    github logo github logo
    Viewing docs for GitHub v6.15.0
    published on Friday, Aug 14, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial