github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/github/r/team_membership.html.markdown (about)

     1  ---
     2  layout: "github"
     3  page_title: "GitHub: github_team_membership"
     4  sidebar_current: "docs-github-resource-team-membership"
     5  description: |-
     6    Provides a GitHub team membership resource.
     7  ---
     8  
     9  # github_team_membership
    10  
    11  Provides a GitHub team membership resource.
    12  
    13  This resource allows you to add/remove users from teams in your organization. When applied,
    14  the user will be added to the team. If the user hasn't accepted their invitation to the
    15  organization, they won't be part of the team until they do. When
    16  destroyed, the user will be removed from the team.
    17  
    18  ## Example Usage
    19  
    20  ```hcl
    21  # Add a user to the organization
    22  resource "github_membership" "membership_for_some_user" {
    23    username = "SomeUser"
    24    role     = "member"
    25  }
    26  
    27  resource "github_team" "some_team" {
    28    name        = "SomeTeam"
    29    description = "Some cool team"
    30  }
    31  
    32  resource "github_team_membership" "some_team_membership" {
    33    team_id  = "${github_team.some_team.id}"
    34    username = "SomeUser"
    35    role     = "member"
    36  }
    37  ```
    38  
    39  ## Argument Reference
    40  
    41  The following arguments are supported:
    42  
    43  * `team_id` - (Required) The GitHub team id
    44  * `username` - (Required) The user to add to the team.
    45  * `role` - (Optional) The role of the user within the team.
    46              Must be one of `member` or `maintainer`. Defaults to `member`.