Make appdata and unraid smb modules to reduce duplication
This commit is contained in:
@@ -26,53 +26,13 @@ resource "postgresql_database" "sonarr_log" {
|
||||
owner = postgresql_role.sonarr.name
|
||||
}
|
||||
|
||||
resource "nomad_csi_volume_registration" "unraid_appdata_sonarr" {
|
||||
#Note: Before chaning the definition of this volume you need to stop the jobs that are using it
|
||||
depends_on = [data.nomad_plugin.smb]
|
||||
plugin_id = "smb"
|
||||
|
||||
volume_id = "unraid_appdata_sonarr"
|
||||
name = "unraid_appdata_sonarr"
|
||||
|
||||
external_id = "unraid_appdata_sonarr"
|
||||
|
||||
capability {
|
||||
access_mode = "single-node-writer"
|
||||
attachment_mode = "file-system"
|
||||
}
|
||||
|
||||
context = {
|
||||
source = "//betelgeuse-seven-unraid.lan/appdata"
|
||||
subDir = "sonarr" # Note: Needs to be manually created on the share
|
||||
}
|
||||
|
||||
secrets = {
|
||||
"username" = "nomad"
|
||||
"password" = data.sops_file.secrets.data["unraid.nomad"]
|
||||
}
|
||||
module "appdata_sonarr" {
|
||||
source = "./modules/appdata"
|
||||
name = "sonarr"
|
||||
}
|
||||
|
||||
resource "nomad_csi_volume_registration" "unraid_media_sonarr" {
|
||||
#Note: Before chaning the definition of this volume you need to stop the jobs that are using it
|
||||
depends_on = [data.nomad_plugin.smb]
|
||||
plugin_id = "smb"
|
||||
|
||||
volume_id = "unraid_media_sonarr"
|
||||
name = "unraid_media_sonarr"
|
||||
|
||||
external_id = "unraid_media_sonarr"
|
||||
|
||||
capability {
|
||||
access_mode = "single-node-writer"
|
||||
attachment_mode = "file-system"
|
||||
}
|
||||
|
||||
context = {
|
||||
source = "//betelgeuse-seven-unraid.lan/media"
|
||||
}
|
||||
|
||||
secrets = {
|
||||
"username" = "nomad"
|
||||
"password" = data.sops_file.secrets.data["unraid.nomad"]
|
||||
}
|
||||
module "unraid_smb_sonarr_media" {
|
||||
source = "./modules/unraid_smb"
|
||||
name = "sonarr"
|
||||
share = "media"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user