Skip to content

Commit

Permalink
add update to provider documentation for new auth method
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Udit committed May 5, 2021
1 parent fbf9088 commit 25d9a58
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions website/docs/index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Use the navigation to the left to read about the available resources.

## Example Usage

### OAuth / Personal Access Token Authentication

```hcl
# Configure the GitHub Provider
provider "github" {
Expand All @@ -29,10 +31,33 @@ resource "github_membership" "membership_for_user_x" {
}
```

### GitHub App Authentication

```hcl
provider "github" {
owner = var.owner
app_auth {
// Empty block to allow the provider configurations to be specified through
// environment variables.
// See: https://github.com/hashicorp/terraform-plugin-sdk/issues/142
}
}
terraform {
required_providers {
github = {
source = "integrations/github"
}
}
}
```

## Argument Reference

The following arguments are supported in the `provider` block:

* `app_auth` - (Optional) A GitHub App ID, installation ID and PEM file. When not provided or made available via respective environment variables (`GITHUB_APP_ID`, `GITHUB_APP_INSTALLATION_ID`, `GITHUB_APP_PEM_FILE`), the provider can only access resources available anonymously.

* `token` - (Optional) A GitHub OAuth / Personal Access Token. When not provided or made available via the `GITHUB_TOKEN` environment variable, the provider can only access resources available anonymously.

* `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, for example: `https://terraformtesting-ghe.westus.cloudapp.azure.com/`
Expand Down

0 comments on commit 25d9a58

Please sign in to comment.