github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/github/r/team_repository.html.markdown (about) 1 --- 2 layout: "github" 3 page_title: "GitHub: github_team_repository" 4 sidebar_current: "docs-github-resource-team-repository" 5 description: |- 6 Manages the associations between teams and repositories. 7 --- 8 9 # github_team_repository 10 11 This resource manages relationships between teams and repositories 12 in your Github organization. 13 14 Creating this resource grants a particular team permissions on a 15 particular repository. 16 17 The repository and the team must both belong to the same organization 18 on Github. This resource does not actually *create* any repositories; 19 to do that, see [`github_repository`](repository.html). 20 21 ## Example Usage 22 23 ```hcl 24 # Add a repository to the team 25 resource "github_team" "some_team" { 26 name = "SomeTeam" 27 description = "Some cool team" 28 } 29 30 resource "github_repository" "some_repo" { 31 name = "some-repo" 32 } 33 34 resource "github_team_repository" "some_team_repo" { 35 team_id = "${github_team.some_team.id}" 36 repository = "${github_repository.some_repo.name}" 37 permission = "pull" 38 } 39 ``` 40 41 ## Argument Reference 42 43 The following arguments are supported: 44 45 * `team_id` - (Required) The GitHub team id 46 * `repository` - (Required) The repository to add to the team. 47 * `permission` - (Optional) The permissions of team members regarding the repository. 48 Must be one of `pull`, `push`, or `admin`. Defaults to `pull`.