From 781dcfd6e11ff218ae197dfeb800c586b9c19a21 Mon Sep 17 00:00:00 2001 From: 35C4n0r Date: Thu, 12 Mar 2026 18:43:30 +0530 Subject: [PATCH] feat: add TASK_APP_ID logging and resource configuration in Terraform --- registry/coder/modules/agentapi/main.tf | 6 ++++++ registry/coder/modules/claude-code/scripts/install.sh | 1 + 2 files changed, 7 insertions(+) diff --git a/registry/coder/modules/agentapi/main.tf b/registry/coder/modules/agentapi/main.tf index 6f177036..3a82d262 100644 --- a/registry/coder/modules/agentapi/main.tf +++ b/registry/coder/modules/agentapi/main.tf @@ -219,6 +219,12 @@ resource "coder_env" "boundary_config" { value = var.boundary_config_path } +resource "coder_env" "task_app_id" { + agent_id = var.agent_id + name = "TASK_APP_ID" + value = coder_app.agentapi_web.id +} + locals { # we always trim the slash for consistency workdir = trimsuffix(var.folder, "/") diff --git a/registry/coder/modules/claude-code/scripts/install.sh b/registry/coder/modules/claude-code/scripts/install.sh index 0a2ba703..39b05a12 100644 --- a/registry/coder/modules/claude-code/scripts/install.sh +++ b/registry/coder/modules/claude-code/scripts/install.sh @@ -27,6 +27,7 @@ export PATH="$ARG_CLAUDE_BINARY_PATH:$PATH" echo "--------------------------------" +printf "TASK_APP_ID: %s\n" "${TASK_APP_ID}" printf "ARG_CLAUDE_CODE_VERSION: %s\n" "$ARG_CLAUDE_CODE_VERSION" printf "ARG_WORKDIR: %s\n" "$ARG_WORKDIR" printf "ARG_INSTALL_CLAUDE_CODE: %s\n" "$ARG_INSTALL_CLAUDE_CODE"