feat: share variable

This commit is contained in:
Eric Paulsen
2023-10-15 21:58:03 -04:00
parent b6ec1d85a7
commit 11d7787cb0
5 changed files with 55 additions and 5 deletions

View File

@@ -27,6 +27,16 @@ variable "port" {
default = 19999
}
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" "jupyterlab" {
agent_id = var.agent_id
display_name = "jupyterlab"
@@ -45,5 +55,5 @@ resource "coder_app" "jupyterlab" {
url = "http://localhost:${var.port}"
icon = "/icon/jupyter.svg"
subdomain = true
share = "owner"
share = var.share
}