Skip to content
Snippets Groups Projects
Commit c06beab4 authored by Sebastian Karius's avatar Sebastian Karius
Browse files

dev coder filebrowser module

parent fb81cb64
Branches
No related tags found
No related merge requests found
......@@ -9,6 +9,55 @@ terraform {
}
}
variable "agent_id" {
type = string
description = "The ID of a Coder agent."
}
variable "database_path" {
type = string
description = "The path to the filebrowser database."
default = "filebrowser.db"
validation {
# Ensures path leads to */filebrowser.db
condition = can(regex(".*filebrowser\\.db$", var.database_path))
error_message = "The database_path must end with 'filebrowser.db'."
}
}
variable "log_path" {
type = string
description = "The path to log filebrowser to."
default = "/tmp/filebrowser.log"
}
variable "port" {
type = number
description = "The port to run filebrowser on."
default = 13339
}
variable "folder" {
type = string
description = "--root value for filebrowser."
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'."
}
}
variable "order" {
type = number
description = "The order determines the position of app in the UI presentation. The lowest order is shown first and apps with equal order are sorted by name (ascending order)."
default = null
}
resource "coder_script" "filebrowser" {
agent_id = var.agent_id
display_name = "File Browser"
......
variable "agent_id" {
type = string
description = "The ID of a Coder agent."
}
variable "database_path" {
type = string
description = "The path to the filebrowser database."
default = "filebrowser.db"
validation {
# Ensures path leads to */filebrowser.db
condition = can(regex(".*filebrowser\\.db$", var.database_path))
error_message = "The database_path must end with 'filebrowser.db'."
}
}
variable "log_path" {
type = string
description = "The path to log filebrowser to."
default = "/tmp/filebrowser.log"
}
variable "port" {
type = number
description = "The port to run filebrowser on."
default = 13339
}
variable "folder" {
type = string
description = "--root value for filebrowser."
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'."
}
}
variable "order" {
type = number
description = "The order determines the position of app in the UI presentation. The lowest order is shown first and apps with equal order are sorted by name (ascending order)."
default = null
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment