Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2937286

Browse files
authored
feat: update Tasks on Docker Template (#418)
1 parent 8d556a8 commit 2937286

File tree

1 file changed

+23
-40
lines changed
  • registry/coder-labs/templates/tasks-docker

1 file changed

+23
-40
lines changed

registry/coder-labs/templates/tasks-docker/main.tf

Lines changed: 23 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ module "claude-code" {
2424
source = "registry.coder.com/coder/claude-code/coder"
2525
version = "2.0.0"
2626
agent_id = coder_agent.main.id
27-
agent_name = "main"
2827
folder = "/home/coder/projects"
2928
install_claude_code = true
3029
claude_code_version = "latest"
@@ -45,10 +44,9 @@ variable "anthropic_api_key" {
4544
sensitive = true
4645
}
4746
resource "coder_env" "anthropic_api_key" {
48-
agent_id = coder_agent.main.id
49-
agent_name = "main"
50-
name = "CODER_MCP_CLAUDE_API_KEY"
51-
value = var.anthropic_api_key
47+
agent_id = coder_agent.main.id
48+
name = "CODER_MCP_CLAUDE_API_KEY"
49+
value = var.anthropic_api_key
5250
}
5351

5452
# We are using presets to set the prompts, image, and set up instructions
@@ -176,22 +174,19 @@ data "coder_parameter" "preview_port" {
176174

177175
# Other variables for Claude Code
178176
resource "coder_env" "claude_task_prompt" {
179-
agent_id = coder_agent.main.id
180-
agent_name = "main"
181-
name = "CODER_MCP_CLAUDE_TASK_PROMPT"
182-
value = data.coder_parameter.ai_prompt.value
177+
agent_id = coder_agent.main.id
178+
name = "CODER_MCP_CLAUDE_TASK_PROMPT"
179+
value = data.coder_parameter.ai_prompt.value
183180
}
184181
resource "coder_env" "app_status_slug" {
185-
agent_id = coder_agent.main.id
186-
agent_name = "main"
187-
name = "CODER_MCP_APP_STATUS_SLUG"
188-
value = "ccw"
182+
agent_id = coder_agent.main.id
183+
name = "CODER_MCP_APP_STATUS_SLUG"
184+
value = "ccw"
189185
}
190186
resource "coder_env" "claude_system_prompt" {
191-
agent_id = coder_agent.main.id
192-
agent_name = "main"
193-
name = "CODER_MCP_CLAUDE_SYSTEM_PROMPT"
194-
value = data.coder_parameter.system_prompt.value
187+
agent_id = coder_agent.main.id
188+
name = "CODER_MCP_CLAUDE_SYSTEM_PROMPT"
189+
value = data.coder_parameter.system_prompt.value
195190
}
196191

197192
data "coder_provisioner" "me" {}
@@ -301,38 +296,27 @@ module "code-server" {
301296
# This ensures that the latest non-breaking version of the module gets downloaded, you can also pin the module version to prevent breaking changes in production.
302297
version = "~> 1.0"
303298

304-
agent_id = coder_agent.main.id
305-
agent_name = "main"
306-
order = 1
307-
}
308-
309-
module "vscode" {
310-
count = data.coder_workspace.me.start_count
311-
source = "registry.coder.com/coder/vscode-desktop/coder"
312-
version = "1.1.0"
313-
agent_id = coder_agent.main.id
314-
agent_name = "main"
299+
agent_id = coder_agent.main.id
300+
order = 1
315301
}
316302

317303
module "windsurf" {
318-
count = data.coder_workspace.me.start_count
319-
source = "registry.coder.com/coder/windsurf/coder"
320-
version = "1.1.0"
321-
agent_id = coder_agent.main.id
322-
agent_name = "main"
304+
count = data.coder_workspace.me.start_count
305+
source = "registry.coder.com/coder/windsurf/coder"
306+
version = "1.1.0"
307+
agent_id = coder_agent.main.id
323308
}
324309

325310
module "cursor" {
326-
count = data.coder_workspace.me.start_count
327-
source = "registry.coder.com/coder/cursor/coder"
328-
version = "1.2.0"
329-
agent_id = coder_agent.main.id
330-
agent_name = "main"
311+
count = data.coder_workspace.me.start_count
312+
source = "registry.coder.com/coder/cursor/coder"
313+
version = "1.2.0"
314+
agent_id = coder_agent.main.id
331315
}
332316

333317
module "jetbrains" {
334318
count = data.coder_workspace.me.start_count
335-
source = "registry.coder.com/modules/coder/jetbrains/coder"
319+
source = "registry.coder.com/coder/jetbrains/coder"
336320
version = "~> 1.0"
337321
agent_id = coder_agent.main.id
338322
agent_name = "main"
@@ -368,7 +352,6 @@ resource "docker_volume" "home_volume" {
368352

369353
resource "coder_app" "preview" {
370354
agent_id = coder_agent.main.id
371-
agent_name = "main"
372355
slug = "preview"
373356
display_name = "Preview your app"
374357
icon = "${data.coder_workspace.me.access_url}/emojis/1f50e.png"

0 commit comments

Comments
 (0)