Skip to content

Commit c07e4f0

Browse files
refactor(coder-labs/sourcegraph-amp): support terraform provider coder v2.12.0
1 parent 4c9fab8 commit c07e4f0

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

registry/coder-labs/modules/sourcegraph-amp/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Run [Amp CLI](https://ampcode.com/) in your workspace to access Sourcegraph's AI
1313
```tf
1414
module "amp-cli" {
1515
source = "registry.coder.com/coder-labs/sourcegraph-amp/coder"
16-
version = "2.0.0"
16+
version = "3.0.0"
1717
agent_id = coder_agent.example.id
1818
sourcegraph_amp_api_key = var.sourcegraph_amp_api_key
1919
install_sourcegraph_amp = true
@@ -48,7 +48,7 @@ variable "amp_api_key" {
4848
module "amp-cli" {
4949
count = data.coder_workspace.me.start_count
5050
source = "registry.coder.com/coder-labs/sourcegraph-amp/coder"
51-
amp_version = "2.0.0"
51+
amp_version = "3.0.0"
5252
agent_id = coder_agent.example.id
5353
amp_api_key = var.amp_api_key # recommended for tasks usage
5454
workdir = "/home/coder/project"

registry/coder-labs/modules/sourcegraph-amp/main.tf

Lines changed: 7 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
}
@@ -135,15 +135,15 @@ variable "base_amp_config" {
135135
type = string
136136
description = <<-EOT
137137
Base AMP configuration in JSON format. Can be overridden to customize AMP settings.
138-
138+
139139
If empty, defaults enable thinking and todos for autonomous operation. Additional options include:
140140
- "amp.permissions": [] (tool permissions)
141141
- "amp.tools.stopTimeout": 600 (extend timeout for long operations)
142142
- "amp.terminal.commands.nodeSpawn.loadProfile": "daily" (environment loading)
143143
- "amp.tools.disable": ["builtin:open"] (disable tools for containers)
144144
- "amp.git.commit.ampThread.enabled": true (link commits to threads)
145145
- "amp.git.commit.coauthor.enabled": true (add Amp as co-author)
146-
146+
147147
Reference: https://ampcode.com/manual
148148
EOT
149149
default = ""
@@ -204,7 +204,7 @@ locals {
204204

205205
module "agentapi" {
206206
source = "registry.coder.com/coder/agentapi/coder"
207-
version = "1.2.0"
207+
version = "2.0.0"
208208

209209
agent_id = var.agent_id
210210
folder = local.workdir
@@ -251,4 +251,6 @@ module "agentapi" {
251251
EOT
252252
}
253253

254-
254+
output "task_app_id" {
255+
value = module.agentapi.task_app_id
256+
}

0 commit comments

Comments
 (0)