diff --git a/main.tf b/main.tf index b61b9e3..8b9090b 100644 --- a/main.tf +++ b/main.tf @@ -16,12 +16,11 @@ resource "nomad_job" "this" { } } -resource "nomad_external_volume" "this" { +resource "nomad_csi_volume" "this" { for_each = var.volumes volume_id = each.key name = each.key - type = each.value.type plugin_id = each.value.plugin_id namespace = each.value.namespace capacity_min = each.value.capacity_min @@ -34,13 +33,12 @@ resource "nomad_external_volume" "this" { secrets = sensitive(each.value.secrets) } -resource "nomad_volume" "this" { +resource "nomad_csi_volume_registration" "this" { for_each = var.nfs_volumes volume_id = each.key external_id = each.key name = each.key - type = each.value.type plugin_id = each.value.plugin_id namespace = each.value.namespace capability { diff --git a/variables.tf b/variables.tf index f5162e1..d1ba18f 100644 --- a/variables.tf +++ b/variables.tf @@ -7,7 +7,6 @@ variable "jobs" { variable "volumes" { type = map(object({ - type = string plugin_id = string namespace = string capacity_min = string @@ -22,7 +21,6 @@ variable "volumes" { variable "nfs_volumes" { type = map(object({ - type = string plugin_id = string namespace = string capability = map(string)