variable "persistent_folder" {
  description = "The path to the persistent folder"
  type        = string
}

variable "tag" {
  description = "The version of the websites to install"
  type        = string
  default     = "30-apache"
}

variable "fqdn" {
  description = "The fully qualified domain name for the Rustdesk server"
  type        = string
}

variable "tls_enabled" {
  description = "Enable TLS for the SFTPGo server"
  type        = bool
  default     = true
}

variable "issuer" {
  description = "The issuer for the certificate"
  type        = string
  default     = "internal-ca"
}

variable "db_credentials_are_secrets" {
  description = "set to true if the database credentials are secrets"
  type        = bool
  default     = false
}

variable "app_config" {
  description = "The configuration for the SFTPGo server"
  type = object({
    mail_from      = string
    mail_domain    = string
    smtp_user      = string
    smtp_password  = string
    smtp_host      = string
    admin_password = string
    db_host        = string
    db_name        = string
    db_user        = string
    db_password    = string
    smtp_port      = optional(number, 465)
    smtp_secure    = optional(string, "ssl")
    admin_username = optional(string, "admin")
  })
}
