github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/github/index.html.markdown (about) 1 --- 2 layout: "github" 3 page_title: "Provider: GitHub" 4 sidebar_current: "docs-github-index" 5 description: |- 6 The GitHub provider is used to interact with GitHub organization resources. 7 --- 8 9 # GitHub Provider 10 11 The GitHub provider is used to interact with GitHub organization resources. 12 13 The provider allows you to manage your GitHub organization's members and teams easily. 14 It needs to be configured with the proper credentials before it can be used. 15 16 Use the navigation to the left to read about the available resources. 17 18 ## Example Usage 19 20 ``` 21 # Configure the GitHub Provider 22 provider "github" { 23 token = "${var.github_token}" 24 organization = "${var.github_organization}" 25 } 26 27 # Add a user to the organization 28 resource "github_membership" "membership_for_user_x" { 29 # ... 30 } 31 ``` 32 33 ## Argument Reference 34 35 The following arguments are supported in the `provider` block: 36 37 * `token` - (Optional) This is the GitHub personal access token. It must be provided, but 38 it can also be sourced from the `GITHUB_TOKEN` environment variable. 39 40 * `organization` - (Optional) This is the target GitHub organization to manage. The account 41 corresponding to the token will need "owner" privileges for this organization. It must be provided, but 42 it can also be sourced from the `GITHUB_ORGANIZATION` environment variable. 43 44 * `base_url` - (Optional) This is the target GitHub base API endpoint. Providing a value is a 45 requirement when working with GitHub Enterprise. It is optional to provide this value and 46 it can also be sourced from the `GITHUB_BASE_URL` environment variable. The value must end with a slash.