From 3efc22c58909b97426d65b3c2cf69f78a108cbce Mon Sep 17 00:00:00 2001 From: Michael Orlov <34108460+harleylrn@users.noreply.github.com> Date: Sun, 3 Aug 2025 02:27:46 -0400 Subject: [PATCH] fix/amazon-q mcp integration (#248) Co-authored-by: Michael Orlov Co-authored-by: DevCats --- registry/coder/modules/amazon-q/main.tf | 32 ++++++------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/registry/coder/modules/amazon-q/main.tf b/registry/coder/modules/amazon-q/main.tf index 851aa062..dcc03156 100644 --- a/registry/coder/modules/amazon-q/main.tf +++ b/registry/coder/modules/amazon-q/main.tf @@ -125,24 +125,7 @@ variable "ai_prompt" { locals { encoded_pre_install_script = var.experiment_pre_install_script != null ? base64encode(var.experiment_pre_install_script) : "" encoded_post_install_script = var.experiment_post_install_script != null ? base64encode(var.experiment_post_install_script) : "" - # We need to use allowed tools to limit the context Amazon Q receives. - # Amazon Q can't handle big contexts, and the `create_template_version` tool - # has a description that's too long. - mcp_json = < /tmp/post_install.sh @@ -218,13 +207,6 @@ resource "coder_script" "amazon_q" { /tmp/post_install.sh fi - if [ "${var.experiment_report_tasks}" = "true" ]; then - echo "Configuring Amazon Q to report tasks via Coder MCP..." - mkdir -p ~/.aws/amazonq - echo "${local.encoded_mcp_json}" | base64 -d > ~/.aws/amazonq/mcp.json - echo "Created the ~/.aws/amazonq/mcp.json configuration file" - fi - if [ "${var.experiment_use_tmux}" = "true" ] && [ "${var.experiment_use_screen}" = "true" ]; then echo "Error: Both experiment_use_tmux and experiment_use_screen cannot be true simultaneously." echo "Please set only one of them to true."