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

@@ -43,6 +43,16 @@ variable "folder" {
default = "~"
}
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" "filebrowser" {
agent_id = var.agent_id
display_name = "File Browser"
@@ -64,5 +74,5 @@ resource "coder_app" "filebrowser" {
url = "http://localhost:${var.port}"
icon = "https://raw.githubusercontent.com/filebrowser/logo/master/icon_raw.svg"
subdomain = true
share = "owner"
share = var.share
}