aboutsummaryrefslogtreecommitdiffstats
path: root/terraform-ci-infra/1n_nmd/nginx/main.tf
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2020-12-09 20:11:42 +0000
committerPeter Mikus <pmikus@cisco.com>2020-12-12 07:59:30 +0000
commitfd4d85865e145f12330a4266be48fbdd6e919cf4 (patch)
treea94252782163c250a29a0551ba48df2e023d0692 /terraform-ci-infra/1n_nmd/nginx/main.tf
parent688a68a8f6d8a69a85cb76421a16dff9c4105c52 (diff)
Refactor storage solution
+ Minio terraform module + XL mode enabled with erasure code + Upload script as a sample + Nginx terraform module + Updating ansible to reflect changes Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: Ia8c439b749aa0de82bd6f1d0cfbecce4d7000a8f
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