module "s1" {
  source                = "./lib/grey.ooo/products/socket-proxy"
  stack_name            = "printers"
  service_name          = "s1"
  target                = { host = "s1.prin.ti", port = 80 }
  traefik               = { domain = "s1.${var.base_domain}", basic-auth-users = ["techinc"], ssl = true, non-ssl = true }
  placement_constraints = ["node.hostname == california"]
}
module "label_printer" {
  source                = "./lib/grey.ooo/products/socket-proxy"
  stack_name            = "printers"
  service_name          = "labelprinter"
  target                = { host = "labelprinter.ti", port = 80 }
  traefik               = { domain = "labelprinter.${var.base_domain}", basic-auth-users = ["techinc"], ssl = true, non-ssl = true }
  placement_constraints = ["node.hostname == california"]
}

output "printers" {
  value = {
    s1            = module.s1.endpoint
    label_printer = module.label_printer.endpoint
  }
}