commit f3e0b2271ad91ee499cc25d76a5c1cc8b0119085 Author: Amneesh Singh Date: Tue Mar 29 08:46:30 2022 +0530 initial commit Signed-off-by: Amneesh Singh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cfe8974 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.terraform* +*.tstate diff --git a/bots/main.tf b/bots/main.tf new file mode 100644 index 0000000..c24c86a --- /dev/null +++ b/bots/main.tf @@ -0,0 +1,10 @@ +provider "nomad" {} +//Set everything via environment variables + +resource "nomad_job" "singh3" { + jobspec = file("./singh3.nomad") + purge_on_destroy = true + hcl2 { + enabled = true + } +} diff --git a/bots/singh3.nomad b/bots/singh3.nomad new file mode 100644 index 0000000..8cbb861 --- /dev/null +++ b/bots/singh3.nomad @@ -0,0 +1,81 @@ +job "singh3" { + region = "global" + datacenters = ["nazrin"] + type = "service" + + group "svc" { + count = 1 + + network { + mode = "bridge" + + port "db" { + static = 5454 + to = 5432 + } + } + + vault { + policies = ["singh3-policy"] + } + + service { + name = "singh3-db" + port = "db" + } + + task "db" { + template { + data = <