From 06d2573aefac38c1a3a58283db87307ef63c1b22 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Thu, 29 Aug 2024 12:31:45 -0500 Subject: [PATCH] chore: add subdomain option to terraform module --- vscode-web/main.tf | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/vscode-web/main.tf b/vscode-web/main.tf index 084f830..26cde98 100644 --- a/vscode-web/main.tf +++ b/vscode-web/main.tf @@ -121,6 +121,15 @@ variable "auto_install_extensions" { default = false } +variable "subdomain" { + type = bool + description = <<-EOT + Determines whether the app will be accessed via it's own subdomain or whether it will be accessed via a path on Coder. + If wildcards have not been setup by the administrator then apps with "subdomain" set to true will not be accessible. + EOT + default = true +} + resource "coder_script" "vscode-web" { agent_id = var.agent_id display_name = "VS Code Web" @@ -160,7 +169,7 @@ resource "coder_app" "vscode-web" { display_name = var.display_name url = var.folder == "" ? "http://localhost:${var.port}" : "http://localhost:${var.port}?folder=${var.folder}" icon = "/icon/code.svg" - subdomain = true + subdomain = var.subdomain share = var.share order = var.order