Skip to content

Commit 0449051

Browse files
iamriajulmatifali
andauthored
feat(KasmVNC): allow share variable to be passed with default: owner (#709)
Co-authored-by: Atif Ali <[email protected]>
1 parent 8e68c96 commit 0449051

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

registry/coder/modules/kasmvnc/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Automatically install [KasmVNC](https://kasmweb.com/kasmvnc) in a workspace, and
1414
module "kasmvnc" {
1515
count = data.coder_workspace.me.start_count
1616
source = "registry.coder.com/coder/kasmvnc/coder"
17-
version = "1.2.7"
17+
version = "1.3.0"
1818
agent_id = coder_agent.example.id
1919
desktop_environment = "xfce"
2020
subdomain = true

registry/coder/modules/kasmvnc/main.tf

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ variable "subdomain" {
5454
description = "Is subdomain sharing enabled in your cluster?"
5555
}
5656

57+
variable "share" {
58+
type = string
59+
default = "owner"
60+
validation {
61+
condition = var.share == "owner" || var.share == "authenticated" || var.share == "public"
62+
error_message = "Incorrect value. Please set either 'owner', 'authenticated', or 'public'."
63+
}
64+
}
65+
5766
resource "coder_script" "kasm_vnc" {
5867
agent_id = var.agent_id
5968
display_name = "KasmVNC"
@@ -75,7 +84,7 @@ resource "coder_app" "kasm_vnc" {
7584
url = "http://localhost:${var.port}"
7685
icon = "/icon/kasmvnc.svg"
7786
subdomain = var.subdomain
78-
share = "owner"
87+
share = var.share
7988
order = var.order
8089
group = var.group
8190

0 commit comments

Comments
 (0)