-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new configuration document for connection github
- Loading branch information
1 parent
cbfac25
commit b7ba1f2
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
title: github | ||
sidebar_label: github | ||
--- | ||
|
||
# github | ||
|
||
The `github` connection can be used to access GitHub resources. | ||
|
||
```hcl | ||
connection "github" "my_gh_token" { | ||
token = "ghpat-..." | ||
} | ||
``` | ||
|
||
## Arguments | ||
|
||
| Name | Type | Required?| Description | ||
|-----------------|---------|----------|------------------- | ||
| `token` | String | Optional | API access token | ||
|
||
All arguments are optional, and a `github` connection with no arguments will behave the same as the [default connection](#default-connection). | ||
|
||
## Attributes (Read-Only) | ||
|
||
| Attribute | Type | Description | ||
|-----------------|---------|----------------- | ||
| `env` | Map | A map of the resolved connection-related environment variables (`GITHUB_TOKEN`) | ||
|
||
## Default Connection | ||
|
||
The `github` connection type includes an implicit, default connection (`connection.github.default`) that will be configured to set the `token` to the `GITHUB_TOKEN` environment variable. | ||
|
||
```hcl | ||
connection "github" "default" { | ||
token = env("GITHUB_TOKEN") | ||
} | ||
``` |