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:
parent
8e68c96633
commit
0449051828
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user