aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.terraform/terraform-nomad-vpp-device/main.tf
blob: b176172d00b73f307ba1e74d2415468f0e62e37c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
locals {
  datacenters = join(",", var.datacenters)
}

resource "nomad_job" "nomad_job" {
  jobspec = templatefile(
    "${path.module}/conf/nomad/${var.job_name}.hcl.tftpl",
    {
      datacenters   = local.datacenters,
      job_name      = var.job_name,
      group_count   = var.group_count,
      cpu           = var.cpu,
      memory        = var.memory,
      image_aarch64 = var.image_aarch64,
      image_x86_64  = var.image_x86_64
    }
  )
  detach = false
}