feat(KasmVNC): allow share variable to be passed with default: owner (#709)

Co-authored-by: Atif Ali <atif@coder.com>
This commit is contained in:
Riajul Islam 2026-02-11 13:34:37 +06:00 committed by GitHub
parent 8e68c96633
commit 0449051828
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 2 deletions

View File

@ -14,7 +14,7 @@ Automatically install [KasmVNC](https://kasmweb.com/kasmvnc) in a workspace, and
module "kasmvnc" { module "kasmvnc" {
count = data.coder_workspace.me.start_count count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/kasmvnc/coder" source = "registry.coder.com/coder/kasmvnc/coder"
version = "1.2.7" version = "1.3.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
desktop_environment = "xfce" desktop_environment = "xfce"
subdomain = true subdomain = true

View File

@ -54,6 +54,15 @@ variable "subdomain" {
description = "Is subdomain sharing enabled in your cluster?" description = "Is subdomain sharing enabled in your cluster?"
} }
variable "share" {
type = string
default = "owner"
validation {
condition = var.share == "owner" || var.share == "authenticated" || var.share == "public"
error_message = "Incorrect value. Please set either 'owner', 'authenticated', or 'public'."
}
}
resource "coder_script" "kasm_vnc" { resource "coder_script" "kasm_vnc" {
agent_id = var.agent_id agent_id = var.agent_id
display_name = "KasmVNC" display_name = "KasmVNC"
@ -75,7 +84,7 @@ resource "coder_app" "kasm_vnc" {
url = "http://localhost:${var.port}" url = "http://localhost:${var.port}"
icon = "/icon/kasmvnc.svg" icon = "/icon/kasmvnc.svg"
subdomain = var.subdomain subdomain = var.subdomain
share = "owner" share = var.share
order = var.order order = var.order
group = var.group group = var.group