From e914db2385329c08a8a441b833c3b1b147bbd8a6 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Tue, 11 Oct 2016 10:23:38 -0700 Subject: [PATCH] website: github_team_repository purpose clarification With the addition of github_repository it may be confusing that github_team_repository only creates relationships, rather than creating actual repositories. To reduce the chance of confusion, we'll make this explicit in the docs for github_team_repository. Also taking this opportunity to make the examples consistent with what would be produced by hclfmt. --- .../github/r/team_repository.html.markdown | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/website/source/docs/providers/github/r/team_repository.html.markdown b/website/source/docs/providers/github/r/team_repository.html.markdown index fcc1bc6da1..a41015624a 100644 --- a/website/source/docs/providers/github/r/team_repository.html.markdown +++ b/website/source/docs/providers/github/r/team_repository.html.markdown @@ -3,29 +3,38 @@ layout: "github" page_title: "GitHub: github_team_repository" sidebar_current: "docs-github-resource-team-repository" description: |- - Provides a GitHub team repository resource. + Manages the associations between teams and repositories. --- # github\_team_repository -Provides a GitHub team repository resource. +This resource manages relationships between teams and repositories +in your Github organization. -This resource allows you to add/remove repositories from teams in your organization. When applied, -the repository will be added to the team. When destroyed, the repository will be removed from the team. +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`](repository.html). ## Example Usage ``` # Add a repository to the team resource "github_team" "some_team" { - name = "SomeTeam" - description = "Some cool team" + name = "SomeTeam" + description = "Some cool team" +} + +resource "github_repository" "some_repo" { + name = "some-repo" } resource "github_team_repository" "some_team_repo" { - team_id = "${github_team.some_team.id}" - repository = "our-repo" - permission = "pull" + team_id = "${github_team.some_team.id}" + repository = "${github_repository.some_repo.name}" + permission = "pull" } ``` @@ -35,5 +44,5 @@ The following arguments are supported: * `team_id` - (Required) The GitHub team id * `repository` - (Required) The repository to add to the team. -* `permission` - (Optional) The permissions of team members regarding the repository. - Must be one of `pull`, `push`, or `admin`. Defaults to `pull`. +* `permission` - (Optional) The permissions of team members regarding the repository. + Must be one of `pull`, `push`, or `admin`. Defaults to `pull`.