aboutsummaryrefslogtreecommitdiffstats
path: root/terraform-ci-infra/1n_nmd/nginx/main.tf
blob: 025fcb6b8b2eaadf4ee5a4456cd0a09e80413bcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
locals {
  datacenters = join(",", var.nomad_datacenters)
}

data "template_file" "nomad_job_nginx" {
  template    = file("${path.module}/conf/nomad/nginx.hcl")
  vars        = {
    job_name        = var.nginx_job_name
    datacenters     = local.datacenters
    use_host_volume = var.nginx_use_host_volume
    host_volume     = var.nomad_host_volume
  }
}

resource "nomad_job" "nomad_job_nginx" {
  jobspec     = data.template_file.nomad_job_nginx.rendered
  detach      = false
}