aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.terraform/1n_nmd/etl/main.tf
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2022-02-22 11:00:47 +0100
committerPeter Mikus <pmikus@cisco.com>2022-02-24 08:01:53 +0000
commit54fd337e30acc97434b33a6d0d3c19e4aa3051ab (patch)
tree5d131a1d7c0846a209e85380b66dfc7770cbe32e /fdio.infra.terraform/1n_nmd/etl/main.tf
parentb2cb835b34c7404b2aaee3ec30700c67537da66d (diff)
feat(uti): etl
Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: I7cdcdcbf1e4986664d5d48357688185319f67b0c
Diffstat (limited to 'fdio.infra.terraform/1n_nmd/etl/main.tf')
-rw-r--r--fdio.infra.terraform/1n_nmd/etl/main.tf33
1 files changed, 33 insertions, 0 deletions
diff --git a/fdio.infra.terraform/1n_nmd/etl/main.tf b/fdio.infra.terraform/1n_nmd/etl/main.tf
new file mode 100644
index 0000000000..c477da81a8
--- /dev/null
+++ b/fdio.infra.terraform/1n_nmd/etl/main.tf
@@ -0,0 +1,33 @@
+locals {
+ datacenters = join(",", var.datacenters)
+ envs = join("\n", concat([], var.envs))
+}
+
+resource "nomad_job" "nomad_job_etl" {
+ jobspec = templatefile(
+ "${path.module}/conf/nomad/etl.hcl.tftpl",
+ {
+ aws_access_key_id = var.aws_access_key_id,
+ aws_secret_access_key = var.aws_secret_access_key,
+ aws_default_region = var.aws_default_region
+ cpu = var.cpu,
+ cron = var.cron,
+ datacenters = local.datacenters,
+ envs = local.envs,
+ image = var.image,
+ job_name = var.job_name,
+ memory = var.memory,
+ out_aws_access_key_id = var.out_aws_access_key_id,
+ out_aws_secret_access_key = var.out_aws_secret_access_key,
+ out_aws_default_region = var.out_aws_default_region
+ prohibit_overlap = var.prohibit_overlap,
+ time_zone = var.time_zone,
+ type = var.type,
+ use_vault_provider = var.vault_secret.use_vault_provider,
+ vault_kv_policy_name = var.vault_secret.vault_kv_policy_name,
+ vault_kv_path = var.vault_secret.vault_kv_path,
+ vault_kv_field_access_key = var.vault_secret.vault_kv_field_access_key,
+ vault_kv_field_secret_key = var.vault_secret.vault_kv_field_secret_key
+ })
+ detach = false
+}