From f60c5889dda6ac3ef76be120c4b31fda9b1b1d96 Mon Sep 17 00:00:00 2001 From: Hugo Dutka Date: Sat, 2 Aug 2025 15:06:16 +0200 Subject: [PATCH 1/2] fix: workaround in coder bug --- registry/coder/modules/claude-code/main.tf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/registry/coder/modules/claude-code/main.tf b/registry/coder/modules/claude-code/main.tf index d8d4b9b5e..b5dfc7c87 100644 --- a/registry/coder/modules/claude-code/main.tf +++ b/registry/coder/modules/claude-code/main.tf @@ -289,3 +289,11 @@ resource "coder_ai_task" "claude_code" { id = coder_app.claude_code_web.id } } + +# As of https://github.com/coder/coder/commit/6ba4b5bbc95e2e528d7f5b1e31fffa200ae1a6db, +# there's a bug in Coder's Terraform statefile parsing which prevents it from seeing coder_apps +# in certain scenarios. This is a workaround to bypass this bug until we have a proper fix. +# For more details see https://github.com/coder/coder/issues/18776 +resource "terraform_data" "claude_code_app_id" { + input = coder_app.claude_code_web.id +} From ecf84234cbd3c4b7d3ab19943dfe4fe5acd97ca8 Mon Sep 17 00:00:00 2001 From: Hugo Dutka Date: Sat, 2 Aug 2025 16:14:23 +0200 Subject: [PATCH 2/2] chore: bump version --- registry/coder/modules/claude-code/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/registry/coder/modules/claude-code/README.md b/registry/coder/modules/claude-code/README.md index 97f7d97a9..4771f6b82 100644 --- a/registry/coder/modules/claude-code/README.md +++ b/registry/coder/modules/claude-code/README.md @@ -13,7 +13,7 @@ Run the [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude ```tf module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" - version = "2.0.4" + version = "2.0.5" agent_id = coder_agent.example.id folder = "/home/coder" install_claude_code = true @@ -84,7 +84,7 @@ resource "coder_agent" "main" { module "claude-code" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/claude-code/coder" - version = "2.0.4" + version = "2.0.5" agent_id = coder_agent.example.id folder = "/home/coder" install_claude_code = true @@ -102,7 +102,7 @@ Run Claude Code as a standalone app in your workspace. This will install Claude ```tf module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" - version = "2.0.4" + version = "2.0.5" agent_id = coder_agent.example.id folder = "/home/coder" install_claude_code = true