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, },