2022-11-11 13:34:08 -08:00
|
|
|
resource "nomad_job" "service" {
|
|
|
|
jobspec = templatefile("${path.module}/service_template.nomad", {
|
2023-02-27 11:48:24 -08:00
|
|
|
name = var.name
|
2023-07-07 15:51:19 -07:00
|
|
|
count = var.instance_count
|
2023-07-06 17:23:20 -07:00
|
|
|
priority = var.priority
|
2023-02-27 11:48:24 -08:00
|
|
|
image = var.image
|
|
|
|
image_pull_timeout = var.image_pull_timeout
|
|
|
|
args = var.args
|
|
|
|
env = var.env
|
|
|
|
meta = var.meta
|
|
|
|
group_meta = var.group_meta
|
2023-04-20 16:47:07 -07:00
|
|
|
constraints = var.constraints
|
|
|
|
docker_devices = var.docker_devices
|
2022-11-11 13:34:08 -08:00
|
|
|
|
2023-07-07 16:33:36 -07:00
|
|
|
service_port = var.service_port
|
|
|
|
service_port_static = var.service_port_static
|
|
|
|
ports = var.ports
|
|
|
|
sticky_disk = var.sticky_disk
|
|
|
|
resources = var.resources
|
2023-08-07 11:31:35 -07:00
|
|
|
stunnel_resources = var.stunnel_resources
|
2023-07-07 16:33:36 -07:00
|
|
|
service_tags = var.service_tags
|
2023-07-24 15:21:20 -07:00
|
|
|
custom_services = var.custom_services
|
2023-08-24 12:36:47 -07:00
|
|
|
use_wesher = var.use_wesher
|
2022-11-11 13:34:08 -08:00
|
|
|
|
|
|
|
ingress = var.ingress
|
|
|
|
ingress_rule = var.ingress_rule
|
|
|
|
ingress_middlewares = var.ingress_middlewares
|
2023-03-24 22:58:44 -07:00
|
|
|
prometheus = var.prometheus
|
2022-11-11 13:34:08 -08:00
|
|
|
|
|
|
|
templates = var.templates
|
|
|
|
host_volumes = var.host_volumes
|
|
|
|
|
2023-07-25 10:59:33 -07:00
|
|
|
use_mysql = var.use_mysql || var.mysql_bootstrap != null
|
|
|
|
use_redis = var.use_redis
|
|
|
|
use_ldap = var.use_ldap
|
|
|
|
use_postgres = var.use_postgres || var.postgres_bootstrap != null
|
2022-11-11 13:34:08 -08:00
|
|
|
|
2023-07-25 10:59:33 -07:00
|
|
|
mysql_bootstrap = var.mysql_bootstrap
|
|
|
|
postgres_bootstrap = var.postgres_bootstrap
|
2022-11-11 13:34:08 -08:00
|
|
|
})
|
|
|
|
}
|