Skip to content

Commit 91e136e

Browse files
authored
feat: Update "CODER_TOKEN" to "CODER_AGENT_TOKEN" (#14)
The "CODER_TOKEN" variable will be used for user-sessions, which are required to distinguish between agent sessions.
1 parent 6724eaf commit 91e136e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Diff for: docs/resources/agent.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ resource "kubernetes_pod" "dev" {
2828
container {
2929
command = ["sh", "-c", coder_agent.dev.init_script]
3030
env {
31-
name = "CODER_TOKEN"
31+
name = "CODER_AGENT_TOKEN"
3232
value = coder_agent.dev.token
3333
}
3434
}
@@ -55,6 +55,6 @@ resource "kubernetes_pod" "dev" {
5555
### Read-Only
5656

5757
- `init_script` (String) Run this script on startup of an instance to initialize the agent.
58-
- `token` (String) Set the environment variable "CODER_TOKEN" with this token to authenticate an agent.
58+
- `token` (String) Set the environment variable "CODER_AGENT_TOKEN" with this token to authenticate an agent.
5959

6060

Diff for: examples/resources/coder_agent/resource.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ resource "kubernetes_pod" "dev" {
1313
container {
1414
command = ["sh", "-c", coder_agent.dev.init_script]
1515
env {
16-
name = "CODER_TOKEN"
16+
name = "CODER_AGENT_TOKEN"
1717
value = coder_agent.dev.token
1818
}
1919
}

Diff for: internal/provider/provider.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ func New() *schema.Provider {
191191
},
192192
"token": {
193193
ForceNew: true,
194-
Description: `Set the environment variable "CODER_TOKEN" with this token to authenticate an agent.`,
194+
Description: `Set the environment variable "CODER_AGENT_TOKEN" with this token to authenticate an agent.`,
195195
Type: schema.TypeString,
196196
Computed: true,
197197
},

0 commit comments

Comments
 (0)