cluster/nomad/regions/homelab-1/conduit.tf
main 5d38fe62c9
Add conduit
Signed-off-by: main <magic_rb@redalder.org>
2022-09-18 18:24:43 +02:00

35 lines
692 B
HCL

resource "nomad_volume" "conduit-data" {
type = "csi"
plugin_id = "nfs"
volume_id = "conduit-data"
name = "conduit-data"
external_id = "conduit-data"
capability {
access_mode = "single-node-writer"
attachment_mode = "file-system"
}
context = {
server = "blowhole.hosts.in.redalder.org"
share = "/var/nfs/conduit-data"
}
mount_options {
fs_type = "nfs"
mount_flags = [ "nolock", "hard" ]
}
}
resource "nomad_job" "conduit" {
jobspec = file("${path.module}/job/conduit.hcl")
hcl2 {
enabled = true
vars = {
flake_ref = "${var.flake_host_alt}?rev=${var.flake_rev}"
flake_sha = var.flake_sha
}
}
}