Skip to content

Commit

Permalink
tf: Replace deprecated nomad_volume
Browse files Browse the repository at this point in the history
  • Loading branch information
lens0021 committed Mar 1, 2024
1 parent ed22a09 commit 0bae1c0
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions terraform/volumes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit 0bae1c0

Please sign in to comment.