Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5435fd8

Browse files
authored
Update GITHUB_TOKEN assignment to use variable
1 parent 64fb886 commit 5435fd8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/ai-coder/tasks.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,16 @@ resource "coder_agent" "main" {
111111
You have two options here to either choose the developer orchestrating the agent's permissions as you are already doing with [External Auth](https://coder.com/docs/admin/external-auth) or inject a Bot specific PAT if the tasks are started by a [headless system user](https://coder.com/docs/admin/users/headless-auth) as shown below:
112112

113113
```tf
114+
# Define a template variable to store the token.
115+
variable "github_pat" {
116+
type = string
117+
sensitive = true
118+
}
119+
114120
resource "coder_agent" "main" {
115121
...
116122
env = {
117-
GITHUB_TOKEN = "ghp_1234567890abcdef" # Inject a Bot specific PAT
123+
GITHUB_TOKEN = var.github_pat # Inject a Bot specific PAT
118124
}
119125
}
120126
```

0 commit comments

Comments
 (0)