Skip to content

Commit e3ff43c

Browse files
refactor(coder/agentapi): support terraform-provider-coder v2.12.0 (#485)
In terraform-provider-coder v2.12.0 and the up-coming coder v2.28 release 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`.
1 parent 30123e7 commit e3ff43c

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

registry/coder/modules/agentapi/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The AgentAPI module is a building block for modules that need to run an AgentAPI
1616
```tf
1717
module "agentapi" {
1818
source = "registry.coder.com/coder/agentapi/coder"
19-
version = "1.2.0"
19+
version = "2.0.0"
2020
2121
agent_id = var.agent_id
2222
web_app_slug = local.app_slug

registry/coder/modules/agentapi/main.tf

Lines changed: 3 additions & 5 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
}
@@ -239,8 +239,6 @@ resource "coder_app" "agentapi_cli" {
239239
group = var.cli_app_group
240240
}
241241

242-
resource "coder_ai_task" "agentapi" {
243-
sidebar_app {
244-
id = coder_app.agentapi_web.id
245-
}
242+
output "task_app_id" {
243+
value = coder_app.agentapi_web.id
246244
}

0 commit comments

Comments
 (0)