GitHub Provider
The GitHub provider is used to interact with GitHub organization resources. The provider allows you to manage your GitHub organization's members and teams easily. It needs to be congured with the proper credentials before it can be used. Use the navigation to the left to read about the available resources.
Example Usage
provider "github" { token = = "${var.github_token}"
- rganization =
= "${var.github_organization}" } resource "github_membership" "membership_for_user_x" { }
Argument Reference
The following arguments are supported in the provider block:
token - (Optional) This is the GitHub personal access token. It can also be sourced from the GITHUB_TOKEN
environment variable. If anonymous is false, token is required.
- rganization - (Optional) This is the target GitHub organization to manage. The account corresponding to the token
will need "owner" privileges for this organization. It can also be sourced from the GITHUB_ORGANIZATION environment
- variable. If individual is false, organization is required.
base_url - (Optional) This is the target GitHub base API endpoint. Providing a value is a requirement when working
with GitHub Enterprise. It is optional to provide this value and it can also be sourced from the GITHUB_BASE_URL environment variable. The value must end with a slash, and generally includes the API version, for instance
https://github.someorg.example/api/v3/ . insecure - (Optional) Whether server should be accessed without verifying the TLS certicate. As the name suggests
this is insecure and should not be used beyond experiments, accessing local (non-production) GHE instance etc. There is a number of ways to obtain trusted certicate for free, e.g. from Let's Encrypt (https://letsencrypt.org/). Such trusted certicate does not require this option to be enabled. Defaults to false .
individual : (Optional) Run outside an organization. When individual is true, the provider will run outside the
scope of an organization. Defaults to false .
anonymous : (Optional) Authenticate without a token. When anonymous is true, the provider will not be able to access
resources that require authentication. Setting to true will lead the GitHub provider to work in an anonymous mode with the corresponding API rate limits (https://developer.github.com/v3/#rate-limiting). Defaults to false .