From 0bae1c0df7c665b249e2217977ed93cbda5ce1cd Mon Sep 17 00:00:00 2001 From: lens0021 Date: Sat, 2 Mar 2024 07:13:14 +0900 Subject: [PATCH] tf: Replace deprecated nomad_volume --- terraform/volumes.tf | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/terraform/volumes.tf b/terraform/volumes.tf index 26c4b4c..7fe9e94 100644 --- a/terraform/volumes.tf +++ b/terraform/volumes.tf @@ -19,9 +19,12 @@ data "nomad_plugin" "ebs" { wait_for_healthy = true } -resource "nomad_volume" "mysql" { +import { + id = "mysql" + to = nomad_csi_volume_registration.mysql +} +resource "nomad_csi_volume_registration" "mysql" { depends_on = [data.nomad_plugin.ebs] - type = "csi" plugin_id = "aws-ebs0" volume_id = "mysql" name = "mysql" @@ -33,9 +36,12 @@ resource "nomad_volume" "mysql" { } } -resource "nomad_volume" "caddycerts" { +import { + id = "caddycerts" + to = nomad_csi_volume_registration.caddycerts +} +resource "nomad_csi_volume_registration" "caddycerts" { depends_on = [data.nomad_plugin.ebs] - type = "csi" plugin_id = "aws-ebs0" volume_id = "caddycerts" name = "caddycerts"