replace nomad_volume and nomad_external_volume with new resources

This commit is contained in:
Bertrand Lanson 2023-08-22 18:32:17 +02:00
parent e1a002b740
commit 082bad9837
2 changed files with 2 additions and 6 deletions

View File

@ -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 {

View File

@ -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)