mirror of
https://github.com/coder/coder.git
synced 2026-09-23 05:43:53 +08:00
Part of the Template Builder wizard PR stack. ## Backend fixes 1. **Registry URL scheme fix**: Default `CODER_TEMPLATE_BUILDER_REGISTRY_URL` was `https://registry.coder.com` but Terraform module registry addresses must be scheme-less. Changed to `registry.coder.com`. 2. **Sensitive variable defaults**: Module `.tf.tmpl` files for claude-code, aider, amazon-q had sensitive `variable` blocks without `default`, causing `terraform plan` to fail during template import. Also fixed the `templatebuildermodulegen` script. 3. **Auto-quote string variables**: The backend now accepts raw string values from callers and wraps them in HCL quotes automatically. Previously callers were required to send pre-quoted HCL literals, which is not a reasonable API contract. --- > [!NOTE] > Generated by Coder Agents on behalf of @jeremyruppel
27 lines
1.1 KiB
Cheetah
27 lines
1.1 KiB
Cheetah
|
|
variable "claude_code_oauth_token" {
|
|
description = "OAuth token passed to Claude Code via the CLAUDE_CODE_OAUTH_TOKEN env var. Generate one with `claude setup-token`."
|
|
type = string
|
|
default = ""
|
|
sensitive = true
|
|
}
|
|
module "claude-code" {
|
|
count = data.coder_workspace.me.start_count
|
|
source = "{{ .RegistryBase }}/coder/claude-code/coder"
|
|
version = "{{ .PinnedVersion }}"
|
|
agent_id = coder_agent.{{ .AgentResourceName }}.id
|
|
anthropic_api_key = {{ .Variables.anthropic_api_key }}
|
|
claude_binary_path = {{ .Variables.claude_binary_path }}
|
|
claude_code_oauth_token = var.claude_code_oauth_token
|
|
claude_code_version = {{ .Variables.claude_code_version }}
|
|
disable_autoupdater = {{ .Variables.disable_autoupdater }}
|
|
enable_ai_gateway = {{ .Variables.enable_ai_gateway }}
|
|
icon = {{ .Variables.icon }}
|
|
install_claude_code = {{ .Variables.install_claude_code }}
|
|
mcp = {{ .Variables.mcp }}
|
|
model = {{ .Variables.model }}
|
|
post_install_script = {{ .Variables.post_install_script }}
|
|
pre_install_script = {{ .Variables.pre_install_script }}
|
|
workdir = {{ .Variables.workdir }}
|
|
}
|