Skip to content

Commit c1f1d9f

Browse files
refactor(coder-labs/copilot): support terraform provider coder v2.12.0
1 parent 797624f commit c1f1d9f

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

registry/coder-labs/modules/copilot/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Run [GitHub Copilot CLI](https://docs.github.com/copilot/concepts/agents/about-c
1313
```tf
1414
module "copilot" {
1515
source = "registry.coder.com/coder-labs/copilot/coder"
16-
version = "0.2.1"
16+
version = "0.3.0"
1717
agent_id = coder_agent.example.id
1818
workdir = "/home/coder/projects"
1919
}
@@ -51,7 +51,7 @@ data "coder_parameter" "ai_prompt" {
5151
5252
module "copilot" {
5353
source = "registry.coder.com/coder-labs/copilot/coder"
54-
version = "0.2.1"
54+
version = "0.3.0"
5555
agent_id = coder_agent.example.id
5656
workdir = "/home/coder/projects"
5757
@@ -71,7 +71,7 @@ Customize tool permissions, MCP servers, and Copilot settings:
7171
```tf
7272
module "copilot" {
7373
source = "registry.coder.com/coder-labs/copilot/coder"
74-
version = "0.2.1"
74+
version = "0.3.0"
7575
agent_id = coder_agent.example.id
7676
workdir = "/home/coder/projects"
7777
@@ -142,7 +142,7 @@ variable "github_token" {
142142
143143
module "copilot" {
144144
source = "registry.coder.com/coder-labs/copilot/coder"
145-
version = "0.2.1"
145+
version = "0.3.0"
146146
agent_id = coder_agent.example.id
147147
workdir = "/home/coder/projects"
148148
github_token = var.github_token
@@ -156,7 +156,7 @@ Run Copilot as a command-line tool without task reporting or web interface. This
156156
```tf
157157
module "copilot" {
158158
source = "registry.coder.com/coder-labs/copilot/coder"
159-
version = "0.2.1"
159+
version = "0.3.0"
160160
agent_id = coder_agent.example.id
161161
workdir = "/home/coder"
162162
report_tasks = false

registry/coder-labs/modules/copilot/main.tf

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ terraform {
33
required_providers {
44
coder = {
55
source = "coder/coder"
6-
version = ">= 2.7"
6+
version = "= 2.12.0-pre0"
77
}
88
}
99
}
@@ -241,8 +241,7 @@ resource "coder_env" "github_token" {
241241
}
242242

243243
module "agentapi" {
244-
source = "registry.coder.com/coder/agentapi/coder"
245-
version = "1.2.0"
244+
source = "../../../coder/modules/agentapi"
246245

247246
agent_id = var.agent_id
248247
folder = local.workdir
@@ -268,7 +267,7 @@ module "agentapi" {
268267
set -o pipefail
269268
echo -n '${base64encode(local.start_script)}' | base64 -d > /tmp/start.sh
270269
chmod +x /tmp/start.sh
271-
270+
272271
ARG_WORKDIR='${local.workdir}' \
273272
ARG_AI_PROMPT='${base64encode(var.ai_prompt)}' \
274273
ARG_SYSTEM_PROMPT='${base64encode(local.final_system_prompt)}' \
@@ -288,7 +287,7 @@ module "agentapi" {
288287
set -o pipefail
289288
echo -n '${base64encode(local.install_script)}' | base64 -d > /tmp/install.sh
290289
chmod +x /tmp/install.sh
291-
290+
292291
ARG_MCP_APP_STATUS_SLUG='${local.app_slug}' \
293292
ARG_REPORT_TASKS='${var.report_tasks}' \
294293
ARG_WORKDIR='${local.workdir}' \
@@ -299,4 +298,8 @@ module "agentapi" {
299298
ARG_COPILOT_MODEL='${var.copilot_model}' \
300299
/tmp/install.sh
301300
EOT
302-
}
301+
}
302+
303+
output "task_app_id" {
304+
value = module.agentapi.task_app_id
305+
}

0 commit comments

Comments
 (0)