cluster/nomad/regions/homelab-1/jellyfin.tf

81 lines
1.6 KiB
Terraform
Raw Normal View History

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