Skip to content

Commit

Permalink
Add new configuration document for connection github
Browse files Browse the repository at this point in the history
  • Loading branch information
omerosaienni committed Sep 10, 2024
1 parent cbfac25 commit b7ba1f2
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions docs/reference/config-files/connection/github.md
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")
}
```

0 comments on commit b7ba1f2

Please sign in to comment.