mirror of
https://github.com/outbackdingo/homelab-v.git
synced 2026-08-25 14:53:19 +00:00
Picking sides No real functional change except the cute tofu icon in my IDE instead of the purple T
34 lines
768 B
HCL
34 lines
768 B
HCL
module "proxmox-volume" {
|
|
for_each = var.volumes
|
|
source = "./proxmox-volume"
|
|
|
|
providers = {
|
|
restapi = restapi
|
|
}
|
|
|
|
volume = {
|
|
name = each.key
|
|
node = each.value.node
|
|
size = each.value.size
|
|
storage = each.value.storage
|
|
vmid = each.value.vmid
|
|
format = each.value.format
|
|
}
|
|
}
|
|
|
|
module "persistent-volume" {
|
|
for_each = var.volumes
|
|
source = "./persistent-volume"
|
|
|
|
providers = {
|
|
kubernetes = kubernetes
|
|
}
|
|
|
|
volume = {
|
|
name = each.key
|
|
capacity = each.value.size
|
|
volume_handle = "${var.proxmox_api.cluster_name}/${module.proxmox-volume[each.key].node}/${module.proxmox-volume[each.key].storage}/${module.proxmox-volume[each.key].filename}"
|
|
storage = each.value.storage
|
|
}
|
|
}
|