From 78220d5c2f3d8bb597d0c05b22002fc812b49077 Mon Sep 17 00:00:00 2001 From: kylecarbs Date: Sat, 30 Apr 2022 02:17:07 +0000 Subject: [PATCH] feat: Update "CODER_TOKEN" to "CODER_AGENT_TOKEN" The "CODER_TOKEN" variable will be used for user-sessions, which are required to distinguish between agent sessions. --- docs/resources/agent.md | 4 ++-- examples/resources/coder_agent/resource.tf | 2 +- internal/provider/provider.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/resources/agent.md b/docs/resources/agent.md index 68a1f7c2..4d33c950 100644 --- a/docs/resources/agent.md +++ b/docs/resources/agent.md @@ -28,7 +28,7 @@ resource "kubernetes_pod" "dev" { container { command = ["sh", "-c", coder_agent.dev.init_script] env { - name = "CODER_TOKEN" + name = "CODER_AGENT_TOKEN" value = coder_agent.dev.token } } @@ -55,6 +55,6 @@ resource "kubernetes_pod" "dev" { ### Read-Only - `init_script` (String) Run this script on startup of an instance to initialize the agent. -- `token` (String) Set the environment variable "CODER_TOKEN" with this token to authenticate an agent. +- `token` (String) Set the environment variable "CODER_AGENT_TOKEN" with this token to authenticate an agent. diff --git a/examples/resources/coder_agent/resource.tf b/examples/resources/coder_agent/resource.tf index 65c8a10f..2f1503fd 100644 --- a/examples/resources/coder_agent/resource.tf +++ b/examples/resources/coder_agent/resource.tf @@ -13,7 +13,7 @@ resource "kubernetes_pod" "dev" { container { command = ["sh", "-c", coder_agent.dev.init_script] env { - name = "CODER_TOKEN" + name = "CODER_AGENT_TOKEN" value = coder_agent.dev.token } } diff --git a/internal/provider/provider.go b/internal/provider/provider.go index f9019424..a7223ab6 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -191,7 +191,7 @@ func New() *schema.Provider { }, "token": { ForceNew: true, - Description: `Set the environment variable "CODER_TOKEN" with this token to authenticate an agent.`, + Description: `Set the environment variable "CODER_AGENT_TOKEN" with this token to authenticate an agent.`, Type: schema.TypeString, Computed: true, },