Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit cf1807d

Browse files
authored
Allow custom display name and slug for VS Code Web (#146)
1 parent 4c993d3 commit cf1807d

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

vscode-web/main.tf

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ variable "port" {
2020
default = 13338
2121
}
2222

23+
variable "display_name" {
24+
type = string
25+
description = "The display name for the VS Code Web application."
26+
default = "VS Code Web"
27+
}
28+
29+
variable "slug" {
30+
type = string
31+
description = "The slug for the VS Code Web application."
32+
default = "vscode-web"
33+
}
34+
2335
variable "folder" {
2436
type = string
2537
description = "The folder to open in vscode-web."
@@ -71,8 +83,8 @@ resource "coder_script" "vscode-web" {
7183

7284
resource "coder_app" "vscode-web" {
7385
agent_id = var.agent_id
74-
slug = "vscode-web"
75-
display_name = "VS Code Web"
86+
slug = var.slug
87+
display_name = var.display_name
7688
url = var.folder == "" ? "http://localhost:${var.port}" : "http://localhost:${var.port}?folder=${var.folder}"
7789
icon = "/icon/code.svg"
7890
subdomain = true

0 commit comments

Comments
 (0)