From 4264806f7fb1eb1e9ad941158d59753ea89ea3e4 Mon Sep 17 00:00:00 2001 From: Danielle Maywood Date: Mon, 20 Oct 2025 12:16:05 +0000 Subject: [PATCH] refactor(coder-labs/sourcegraph-amp): support terraform provider coder v2.12.0 --- .../coder-labs/modules/sourcegraph-amp/README.md | 4 ++-- registry/coder-labs/modules/sourcegraph-amp/main.tf | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/registry/coder-labs/modules/sourcegraph-amp/README.md b/registry/coder-labs/modules/sourcegraph-amp/README.md index 5a5039f00..9626403ca 100644 --- a/registry/coder-labs/modules/sourcegraph-amp/README.md +++ b/registry/coder-labs/modules/sourcegraph-amp/README.md @@ -13,7 +13,7 @@ Run [Amp CLI](https://ampcode.com/) in your workspace to access Sourcegraph's AI ```tf module "amp-cli" { source = "registry.coder.com/coder-labs/sourcegraph-amp/coder" - version = "2.0.0" + version = "3.0.0" agent_id = coder_agent.example.id sourcegraph_amp_api_key = var.sourcegraph_amp_api_key install_sourcegraph_amp = true @@ -48,7 +48,7 @@ variable "amp_api_key" { module "amp-cli" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder-labs/sourcegraph-amp/coder" - amp_version = "2.0.0" + amp_version = "3.0.0" agent_id = coder_agent.example.id amp_api_key = var.amp_api_key # recommended for tasks usage workdir = "/home/coder/project" diff --git a/registry/coder-labs/modules/sourcegraph-amp/main.tf b/registry/coder-labs/modules/sourcegraph-amp/main.tf index ddaa475d6..900ff0411 100644 --- a/registry/coder-labs/modules/sourcegraph-amp/main.tf +++ b/registry/coder-labs/modules/sourcegraph-amp/main.tf @@ -4,7 +4,7 @@ terraform { required_providers { coder = { source = "coder/coder" - version = ">= 2.7" + version = ">= 2.12" } } } @@ -135,7 +135,7 @@ variable "base_amp_config" { type = string description = <<-EOT Base AMP configuration in JSON format. Can be overridden to customize AMP settings. - + If empty, defaults enable thinking and todos for autonomous operation. Additional options include: - "amp.permissions": [] (tool permissions) - "amp.tools.stopTimeout": 600 (extend timeout for long operations) @@ -143,7 +143,7 @@ variable "base_amp_config" { - "amp.tools.disable": ["builtin:open"] (disable tools for containers) - "amp.git.commit.ampThread.enabled": true (link commits to threads) - "amp.git.commit.coauthor.enabled": true (add Amp as co-author) - + Reference: https://ampcode.com/manual EOT default = "" @@ -204,7 +204,7 @@ locals { module "agentapi" { source = "registry.coder.com/coder/agentapi/coder" - version = "1.2.0" + version = "2.0.0" agent_id = var.agent_id folder = local.workdir @@ -251,4 +251,6 @@ module "agentapi" { EOT } - +output "task_app_id" { + value = module.agentapi.task_app_id +}