Skip to content

Commit

Permalink
docs: add Github Authentication
Browse files Browse the repository at this point in the history
Signed-off-by: Theo Bob Massard <tbobm@protonmail.com>
  • Loading branch information
tbobm committed Dec 4, 2021
1 parent 87f072d commit 4ba08ae
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,30 @@ section.
Full contributing [guidelines are covered
here](https://github.com/tbobm/terraform-github-secrets/blob/master/.github/CONTRIBUTING.md).

## Usage

### Github Authentication

You will need to authenticate against Github using an OAuth Token or Personal Access Token.
See [Github Provider#Authentication][tf-gh-auth] for more informations.

This can be done by setting the `token` argument of the `github` provider or by exporting
your Token to the `GITHUB_TOKEN` environment variable.

_Provider configuration:_
```hcl
provider "github" {
token = var.token # or `GITHUB_TOKEN`
}
```

_Environment variable configuration:_
```bash
export GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

[tf-gh-auth]: https://registry.terraform.io/providers/integrations/github/latest/docs#authentication

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

Expand Down

0 comments on commit 4ba08ae

Please sign in to comment.