github

The github credential can be used to access GitHub resources.

credential "github" "my_gh_token" {
token = "ghpat-..."
}

Arguments

NameTypeRequired?Description
tokenStringOptionalAPI access token

All arguments are optional, and a github credential with no arguments will behave the same as the default credential.

Attributes (Read-Only)

AttributeTypeDescription
envMapA map of the resolved credential-related environment variables (GITHUB_TOKEN)

Default Credential

The github credential type includes an implicit, default credential (credential.github.default) that will be configured to set the token to the GITHUB_TOKEN environment variable.

credential "github" "default" {
token = env("GITHUB_TOKEN")
}