aboutsummaryrefslogtreecommitdiffstats
path: root/terraform-ci-infra/1n_nmd/nginx/main.tf
diff options
context:
space:
mode:
Diffstat (limited to 'terraform-ci-infra/1n_nmd/nginx/main.tf')
-rw-r--r--terraform-ci-infra/1n_nmd/nginx/main.tf16
1 files changed, 16 insertions, 0 deletions
diff --git a/terraform-ci-infra/1n_nmd/nginx/main.tf b/terraform-ci-infra/1n_nmd/nginx/main.tf
new file mode 100644
index 0000000000..96696922ff
--- /dev/null
+++ b/terraform-ci-infra/1n_nmd/nginx/main.tf
@@ -0,0 +1,16 @@
+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
+ }
+}
+
+resource "nomad_job" "nomad_job_nginx" {
+ jobspec = data.template_file.nomad_job_nginx.rendered
+ detach = false
+} \ No newline at end of file