From 4de43732b9fdf10b0b3e62090eb76827c472e6e1 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Mon, 25 Sep 2023 20:25:23 +0300 Subject: [PATCH] update docs --- vscode-server/README.md | 3 +-- vscode-server/main.tf | 21 +++++---------------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/vscode-server/README.md b/vscode-server/README.md index 399290b..e4941bd 100644 --- a/vscode-server/README.md +++ b/vscode-server/README.md @@ -9,7 +9,7 @@ tags: [helper, ide, vscode, web] # VS Code Web -Automatically install [Visual Studio Code Server](https://code.visualstudio.com/docs/remote/vscode-server) in a workspace, create an app to access it via the dashboard. +Automatically install [Visual Studio Code Server](https://code.visualstudio.com/docs/remote/vscode-server) in a workspace using the [VS Code CLIs](https://code.visualstudio.com/docs/editor/command-line) and create an app to access it via the dashboard. ## Examples @@ -20,7 +20,6 @@ Automatically install [Visual Studio Code Server](https://code.visualstudio.com/ source = "https://registry.coder.com/modules/vscode-web" agent_id = coder_agent.example.id accept_license = true - telemetry = "off" } ``` diff --git a/vscode-server/main.tf b/vscode-server/main.tf index 3eaabbe..bd86703 100644 --- a/vscode-server/main.tf +++ b/vscode-server/main.tf @@ -16,7 +16,7 @@ variable "agent_id" { variable "port" { type = number - description = "The port to run VS Code Wbe on." + description = "The port to run VS Code Web on." default = 13338 } @@ -32,20 +32,10 @@ variable "log_path" { default = "/tmp/vscode-server.log" } -variable "telemetry" { - type = string - description = "Telemetry options for vscode-server." - default = "off" - validation { - condition = var.telemetry == "off" || var.telemetry == "crash" || var.telemetry == "error" || var.telemetry == "all" - error_message = "Variable telemetry must be set to 'off', 'crash', 'error' or 'all'." - } -} - variable "install_dir" { type = string - description = "The directory to install VS Code Server" - default = "/tmp/vscode-server" + description = "The directory to install VS Code CLI" + default = "/tmp/vscode-cli" } variable "accept_license" { @@ -60,13 +50,12 @@ variable "accept_license" { resource "coder_script" "vscode-server" { agent_id = var.agent_id - display_name = "vscode-server" + display_name = "VS Code Web" icon = "/icon/code.svg" script = templatefile("${path.module}/run.sh", { PORT : var.port, LOG_PATH : var.log_path, INSTALL_DIR : var.install_dir, - TELEMETRY : var.telemetry, }) run_on_start = true } @@ -74,7 +63,7 @@ resource "coder_script" "vscode-server" { resource "coder_app" "vscode-server" { agent_id = var.agent_id slug = "vscode-server" - display_name = "VS Code Server" + display_name = "VS Code Web" url = var.folder == "" ? "http://localhost:${var.port}" : "http://localhost:${var.port}?folder=${var.folder}" icon = "/icon/code.svg" subdomain = true