feat(terraform): Migrating old structures
[csit.git] / fdio.infra.terraform / terraform-nomad-vpp-device / main.tf
diff --git a/fdio.infra.terraform/terraform-nomad-vpp-device/main.tf b/fdio.infra.terraform/terraform-nomad-vpp-device/main.tf
new file mode 100644 (file)
index 0000000..2e67085
--- /dev/null
@@ -0,0 +1,19 @@
+locals {
+  datacenters = join(",", var.datacenters)
+}
+
+resource "nomad_job" "nomad_job_csit_shim" {
+  jobspec = templatefile(
+    "${path.module}/conf/nomad/vpp-device.hcl.tftpl",
+    {
+        datacenters   = local.datacenters
+        job_name      = var.job_name
+        group_count   = var.group_count
+        cpu           = var.cpu
+        mem           = var.memory
+        image_aarch64 = var.image_aarch64
+        image_x86_64  = var.image_x86_64
+    }
+  )
+  detach  = false
+}
\ No newline at end of file