From 88773feb26046a98fcfedb200dfe7eb6c90341f9 Mon Sep 17 00:00:00 2001 From: Danielle Maywood Date: Fri, 17 Oct 2025 17:09:11 +0000 Subject: [PATCH] refactor(coder/agentapi): support terraform provider coder v2.12.0 In https://github.com/coder/terraform-provider-coder v2.12.0-pre0 we have removed the requirement for the "AI Prompt" parameter, and are intending on slightly re-designing the API of the AI task modules. Instead of `agentapi` defining the `coder_ai_task` resource, it will output the `task_app_id`. Consumers of the module will then be expected to create the `coder_ai_task` resource themselves with this `task_app_id`. --- registry/coder/modules/agentapi/README.md | 2 +- registry/coder/modules/agentapi/main.tf | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/registry/coder/modules/agentapi/README.md b/registry/coder/modules/agentapi/README.md index d68af511a..954db1ce3 100644 --- a/registry/coder/modules/agentapi/README.md +++ b/registry/coder/modules/agentapi/README.md @@ -16,7 +16,7 @@ The AgentAPI module is a building block for modules that need to run an AgentAPI ```tf module "agentapi" { source = "registry.coder.com/coder/agentapi/coder" - version = "1.2.0" + version = "2.0.0" agent_id = var.agent_id web_app_slug = local.app_slug diff --git a/registry/coder/modules/agentapi/main.tf b/registry/coder/modules/agentapi/main.tf index e73f45f66..5c3ab9c40 100644 --- a/registry/coder/modules/agentapi/main.tf +++ b/registry/coder/modules/agentapi/main.tf @@ -4,7 +4,7 @@ terraform { required_providers { coder = { source = "coder/coder" - version = ">= 2.7" + version = ">= 2.12" } } } @@ -239,8 +239,6 @@ resource "coder_app" "agentapi_cli" { group = var.cli_app_group } -resource "coder_ai_task" "agentapi" { - sidebar_app { - id = coder_app.agentapi_web.id - } +output "task_app_id" { + value = coder_app.agentapi_web.id }