From cf1807dd5c0f84148cc1cf198bae17d527644fd9 Mon Sep 17 00:00:00 2001 From: Florian Gareis Date: Fri, 9 Feb 2024 19:18:20 +0100 Subject: [PATCH] Allow custom display name and slug for VS Code Web (#146) --- vscode-web/main.tf | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/vscode-web/main.tf b/vscode-web/main.tf index 1c5e9e7..9932fac 100644 --- a/vscode-web/main.tf +++ b/vscode-web/main.tf @@ -20,6 +20,18 @@ variable "port" { default = 13338 } +variable "display_name" { + type = string + description = "The display name for the VS Code Web application." + default = "VS Code Web" +} + +variable "slug" { + type = string + description = "The slug for the VS Code Web application." + default = "vscode-web" +} + variable "folder" { type = string description = "The folder to open in vscode-web." @@ -71,8 +83,8 @@ resource "coder_script" "vscode-web" { resource "coder_app" "vscode-web" { agent_id = var.agent_id - slug = "vscode-web" - display_name = "VS Code Web" + slug = var.slug + 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