refactor(coder-labs/copilot): support terraform provider coder v2.12.0 (#492)
## Description Updates the module to use the new version of the agentapi module for Coder 2.28 ## Type of Change - [ ] New module - [ ] New template - [ ] Bug fix - [x] Feature/enhancement - [ ] Documentation - [ ] Other ## Module Information **Path:** `registry/coder-labs/modules/copilot` **New version:** `v0.3.0` **Breaking change:** [x] Yes [ ] No ## Testing & Validation - [x] Tests pass (`bun test`) - [x] Code formatted (`bun fmt`) - [ ] Changes tested locally ## Related Issues - https://github.com/coder/internal/issues/1065 ## Related PRs - https://github.com/coder/registry/pull/485 Co-authored-by: DevCats <christofer@coder.com>
This commit is contained in:
parent
c551c4d84a
commit
eb4c28fc61
@ -13,7 +13,7 @@ Run [GitHub Copilot CLI](https://docs.github.com/copilot/concepts/agents/about-c
|
|||||||
```tf
|
```tf
|
||||||
module "copilot" {
|
module "copilot" {
|
||||||
source = "registry.coder.com/coder-labs/copilot/coder"
|
source = "registry.coder.com/coder-labs/copilot/coder"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
workdir = "/home/coder/projects"
|
workdir = "/home/coder/projects"
|
||||||
}
|
}
|
||||||
@ -51,7 +51,7 @@ data "coder_parameter" "ai_prompt" {
|
|||||||
|
|
||||||
module "copilot" {
|
module "copilot" {
|
||||||
source = "registry.coder.com/coder-labs/copilot/coder"
|
source = "registry.coder.com/coder-labs/copilot/coder"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
workdir = "/home/coder/projects"
|
workdir = "/home/coder/projects"
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ Customize tool permissions, MCP servers, and Copilot settings:
|
|||||||
```tf
|
```tf
|
||||||
module "copilot" {
|
module "copilot" {
|
||||||
source = "registry.coder.com/coder-labs/copilot/coder"
|
source = "registry.coder.com/coder-labs/copilot/coder"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
workdir = "/home/coder/projects"
|
workdir = "/home/coder/projects"
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ variable "github_token" {
|
|||||||
|
|
||||||
module "copilot" {
|
module "copilot" {
|
||||||
source = "registry.coder.com/coder-labs/copilot/coder"
|
source = "registry.coder.com/coder-labs/copilot/coder"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
workdir = "/home/coder/projects"
|
workdir = "/home/coder/projects"
|
||||||
github_token = var.github_token
|
github_token = var.github_token
|
||||||
@ -156,7 +156,7 @@ Run Copilot as a command-line tool without task reporting or web interface. This
|
|||||||
```tf
|
```tf
|
||||||
module "copilot" {
|
module "copilot" {
|
||||||
source = "registry.coder.com/coder-labs/copilot/coder"
|
source = "registry.coder.com/coder-labs/copilot/coder"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
workdir = "/home/coder"
|
workdir = "/home/coder"
|
||||||
report_tasks = false
|
report_tasks = false
|
||||||
|
|||||||
@ -3,7 +3,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
coder = {
|
coder = {
|
||||||
source = "coder/coder"
|
source = "coder/coder"
|
||||||
version = ">= 2.7"
|
version = ">= 2.12"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -242,7 +242,7 @@ resource "coder_env" "github_token" {
|
|||||||
|
|
||||||
module "agentapi" {
|
module "agentapi" {
|
||||||
source = "registry.coder.com/coder/agentapi/coder"
|
source = "registry.coder.com/coder/agentapi/coder"
|
||||||
version = "1.2.0"
|
version = "2.0.0"
|
||||||
|
|
||||||
agent_id = var.agent_id
|
agent_id = var.agent_id
|
||||||
folder = local.workdir
|
folder = local.workdir
|
||||||
@ -268,7 +268,7 @@ module "agentapi" {
|
|||||||
set -o pipefail
|
set -o pipefail
|
||||||
echo -n '${base64encode(local.start_script)}' | base64 -d > /tmp/start.sh
|
echo -n '${base64encode(local.start_script)}' | base64 -d > /tmp/start.sh
|
||||||
chmod +x /tmp/start.sh
|
chmod +x /tmp/start.sh
|
||||||
|
|
||||||
ARG_WORKDIR='${local.workdir}' \
|
ARG_WORKDIR='${local.workdir}' \
|
||||||
ARG_AI_PROMPT='${base64encode(var.ai_prompt)}' \
|
ARG_AI_PROMPT='${base64encode(var.ai_prompt)}' \
|
||||||
ARG_SYSTEM_PROMPT='${base64encode(local.final_system_prompt)}' \
|
ARG_SYSTEM_PROMPT='${base64encode(local.final_system_prompt)}' \
|
||||||
@ -288,7 +288,7 @@ module "agentapi" {
|
|||||||
set -o pipefail
|
set -o pipefail
|
||||||
echo -n '${base64encode(local.install_script)}' | base64 -d > /tmp/install.sh
|
echo -n '${base64encode(local.install_script)}' | base64 -d > /tmp/install.sh
|
||||||
chmod +x /tmp/install.sh
|
chmod +x /tmp/install.sh
|
||||||
|
|
||||||
ARG_MCP_APP_STATUS_SLUG='${local.app_slug}' \
|
ARG_MCP_APP_STATUS_SLUG='${local.app_slug}' \
|
||||||
ARG_REPORT_TASKS='${var.report_tasks}' \
|
ARG_REPORT_TASKS='${var.report_tasks}' \
|
||||||
ARG_WORKDIR='${local.workdir}' \
|
ARG_WORKDIR='${local.workdir}' \
|
||||||
@ -299,4 +299,8 @@ module "agentapi" {
|
|||||||
ARG_COPILOT_MODEL='${var.copilot_model}' \
|
ARG_COPILOT_MODEL='${var.copilot_model}' \
|
||||||
/tmp/install.sh
|
/tmp/install.sh
|
||||||
EOT
|
EOT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
output "task_app_id" {
|
||||||
|
value = module.agentapi.task_app_id
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user