You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
112
112
113
113
```tf
114
+
# Define a template variable to store the token.
115
+
variable "github_pat" {
116
+
type = string
117
+
sensitive = true
118
+
}
119
+
114
120
resource "coder_agent" "main" {
115
121
...
116
122
env = {
117
-
GITHUB_TOKEN = "ghp_1234567890abcdef" # Inject a Bot specific PAT
123
+
GITHUB_TOKEN = var.github_pat # Inject a Bot specific PAT
0 commit comments