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

Allow custom display name and slug for VS Code Web #146

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions vscode-web/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down Expand Up @@ -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
Expand Down