Skip to content

Commit ff02249

Browse files
refactor(coder/claude-code): support terraform provider coder 2.12.0 (#488)
## Description Updates the module to use the new version of the agentapi module for the upcoming Coder 2.28 release ## Type of Change - [ ] New module - [ ] New template - [ ] Bug fix - [x] Feature/enhancement - [ ] Documentation - [ ] Other ## Module Information **Path:** `registry/coder/modules/claude-code` **New version:** `v4.0.0` **Breaking change:** [x] Yes [ ] No ## Testing & Validation - [x] Tests pass (`bun test`) - [x] Code formatted (`bun fmt`) - [ ] Changes tested locally ## Related Issues - coder/internal#1065 ## Related PRs - #485 - #497 Co-authored-by: Cian Johnston <[email protected]>
1 parent 4a11b06 commit ff02249

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

registry/coder/modules/claude-code/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Run the [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude
1313
```tf
1414
module "claude-code" {
1515
source = "registry.coder.com/coder/claude-code/coder"
16-
version = "3.4.4"
16+
version = "4.0.0"
1717
agent_id = coder_agent.example.id
1818
workdir = "/home/coder/project"
1919
claude_api_key = "xxxx-xxxxx-xxxx"
@@ -70,7 +70,7 @@ data "coder_parameter" "ai_prompt" {
7070
7171
module "claude-code" {
7272
source = "registry.coder.com/coder/claude-code/coder"
73-
version = "3.4.4"
73+
version = "4.0.0"
7474
agent_id = coder_agent.example.id
7575
workdir = "/home/coder/project"
7676
@@ -106,7 +106,7 @@ Run and configure Claude Code as a standalone CLI in your workspace.
106106
```tf
107107
module "claude-code" {
108108
source = "registry.coder.com/coder/claude-code/coder"
109-
version = "3.4.4"
109+
version = "4.0.0"
110110
agent_id = coder_agent.example.id
111111
workdir = "/home/coder"
112112
install_claude_code = true
@@ -129,7 +129,7 @@ variable "claude_code_oauth_token" {
129129
130130
module "claude-code" {
131131
source = "registry.coder.com/coder/claude-code/coder"
132-
version = "3.4.4"
132+
version = "4.0.0"
133133
agent_id = coder_agent.example.id
134134
workdir = "/home/coder/project"
135135
claude_code_oauth_token = var.claude_code_oauth_token
@@ -202,7 +202,7 @@ resource "coder_env" "bedrock_api_key" {
202202
203203
module "claude-code" {
204204
source = "registry.coder.com/coder/claude-code/coder"
205-
version = "3.4.4"
205+
version = "4.0.0"
206206
agent_id = coder_agent.example.id
207207
workdir = "/home/coder/project"
208208
model = "global.anthropic.claude-sonnet-4-5-20250929-v1:0"
@@ -259,7 +259,7 @@ resource "coder_env" "google_application_credentials" {
259259
260260
module "claude-code" {
261261
source = "registry.coder.com/coder/claude-code/coder"
262-
version = "3.4.4"
262+
version = "4.0.0"
263263
agent_id = coder_agent.example.id
264264
workdir = "/home/coder/project"
265265
model = "claude-sonnet-4@20250514"

registry/coder/modules/claude-code/main.tf

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
coder = {
66
source = "coder/coder"
7-
version = ">= 2.7"
7+
version = ">= 2.12"
88
}
99
}
1010
}
@@ -270,7 +270,7 @@ resource "coder_env" "claude_api_key" {
270270

271271
locals {
272272
# we have to trim the slash because otherwise coder exp mcp will
273-
# set up an invalid claude config
273+
# set up an invalid claude config
274274
workdir = trimsuffix(var.workdir, "/")
275275
app_slug = "ccw"
276276
install_script = file("${path.module}/scripts/install.sh")
@@ -313,9 +313,8 @@ locals {
313313
}
314314

315315
module "agentapi" {
316-
317316
source = "registry.coder.com/coder/agentapi/coder"
318-
version = "1.2.0"
317+
version = "2.0.0"
319318

320319
agent_id = var.agent_id
321320
web_app_slug = local.app_slug
@@ -379,3 +378,7 @@ module "agentapi" {
379378
/tmp/install.sh
380379
EOT
381380
}
381+
382+
output "task_app_id" {
383+
value = module.agentapi.task_app_id
384+
}

0 commit comments

Comments
 (0)