variable "stunnel_version" {
  description = "Stunnel image version"
  type        = string
  default     = "latest"
}

variable "wireguard_version" {
  description = "Wireguard image version"
  type        = string
  default     = "1.0.20210914-r4-ls54"
}

variable "issuer_name" {
  description = "The name of the issuer to use for TLS certificates, internal certificates"
  type        = string
  default     = "internal-ca"
}

variable "local_targets" {
  description = "Map of local services to expose via stunnel"
  type = map(object({
    listen_port = number
    target_host = string
    target_port = number
    protocol    = string
  }))
  default = {}
}

variable "wireguard_config" {
  description = "The Wireguard configuration file"
  type = object({
    private_key    = string
    public_key     = string
    pre_shared_key = string
    endpoint       = string
    endpoint_port  = number
    address        = string
    dns            = string
    allowed_ips    = list(string)
  })
  default   = null
  sensitive = true
}

variable "remote_targets" {
  description = "Map of remote services to connect to via stunnel"
  type = map(object({
    listen_port = number
    target_host = string
    target_port = number
    protocol    = string
  }))
  default = {}
}
