diff --git a/github/resource_github_team_repository.go b/github/resource_github_team_repository.go index 542c3c5b3c..72126884f9 100644 --- a/github/resource_github_team_repository.go +++ b/github/resource_github_team_repository.go @@ -33,10 +33,9 @@ func resourceGithubTeamRepository() *schema.Resource { ForceNew: true, }, "permission": { - Type: schema.TypeString, - Optional: true, - Default: "pull", - ValidateFunc: validateValueFunc([]string{"pull", "triage", "push", "maintain", "admin"}), + Type: schema.TypeString, + Optional: true, + Default: "pull", }, "etag": { Type: schema.TypeString, diff --git a/website/docs/r/team_repository.html.markdown b/website/docs/r/team_repository.html.markdown index e35ebab343..b9af9ac8a5 100644 --- a/website/docs/r/team_repository.html.markdown +++ b/website/docs/r/team_repository.html.markdown @@ -44,7 +44,7 @@ The following arguments are supported: * `team_id` - (Required) The GitHub team id or the GitHub team slug * `repository` - (Required) The repository to add to the team. * `permission` - (Optional) The permissions of team members regarding the repository. - Must be one of `pull`, `triage`, `push`, `maintain`, or `admin`. Defaults to `pull`. + 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`. ## Import