orchestration-tests/nomad/services.tf

56 lines
997 B
Terraform
Raw Normal View History

2022-07-29 20:01:40 +00:00
# module "nextcloud" {
# source = "./nextcloud"
#
# depends_on = [module.databases]
# }
module "backups" {
source = "./backups"
2022-06-23 16:48:01 +00:00
depends_on = [module.databases]
}
module "media" {
source = "./media"
}
2022-02-16 17:56:18 +00:00
resource "nomad_job" "whoami" {
hcl2 {
enabled = true
vars = {
"count" = 1,
# "count" = "${2 * length(data.consul_service.nomad.service)}",
}
2022-02-16 17:56:18 +00:00
}
jobspec = file("${path.module}/whoami.nomad")
}
module "sonarr" {
source = "./levant"
template_path = "service.nomad"
variables = {
name = "sonarr"
image = "linuxserver/sonarr"
service_port = 8989
ingress = true
env = jsonencode({
PGID = 100
PUID = 1001
})
host_volumes = jsonencode([
{
name = "media-write"
dest = "/srv/volumes/media-write"
read_only = false
},
{
name = "download"
dest = "/srv/volumes/download"
read_only = false
},
])
}
}