fix: add local for workdir and pass to agentapi

This commit is contained in:
DevelopmentCats 2025-10-14 09:18:59 -05:00
parent 36943d1dfb
commit fa46f76f54

View File

@ -96,8 +96,6 @@ variable "workdir" {
description = "The folder to run Amazon Q in." description = "The folder to run Amazon Q in."
} }
# ---------------------------------------------
variable "install_amazon_q" { variable "install_amazon_q" {
type = bool type = bool
description = "Whether to install Amazon Q." description = "Whether to install Amazon Q."
@ -190,6 +188,7 @@ resource "coder_env" "auth_tarball" {
locals { locals {
app_slug = "amazonq" app_slug = "amazonq"
workdir = trimsuffix(var.workdir, "/")
install_script = file("${path.module}/scripts/install.sh") install_script = file("${path.module}/scripts/install.sh")
start_script = file("${path.module}/scripts/start.sh") start_script = file("${path.module}/scripts/start.sh")
module_dir_name = ".amazonq-module" module_dir_name = ".amazonq-module"
@ -218,6 +217,7 @@ module "agentapi" {
version = "1.2.0" version = "1.2.0"
agent_id = var.agent_id agent_id = var.agent_id
folder = local.workdir
web_app_slug = local.app_slug web_app_slug = local.app_slug
web_app_order = var.order web_app_order = var.order
web_app_group = var.group web_app_group = var.group