Add reusable storage pool module with lvmcluster san pool
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
32
incus/modules/storage/main.tf
Normal file
32
incus/modules/storage/main.tf
Normal file
@@ -0,0 +1,32 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
incus = {
|
||||
source = "lxc/incus"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "incus_storage_pool" "hypervisor" {
|
||||
for_each = var.hypervisors
|
||||
name = var.name
|
||||
driver = var.driver
|
||||
target = each.key
|
||||
config = var.hypervisor_config
|
||||
}
|
||||
|
||||
resource "incus_storage_pool" "witness" {
|
||||
for_each = var.witnesses
|
||||
name = var.name
|
||||
driver = var.driver
|
||||
target = each.key
|
||||
config = var.witness_config
|
||||
}
|
||||
|
||||
resource "incus_storage_pool" "this" {
|
||||
depends_on = [
|
||||
incus_storage_pool.hypervisor,
|
||||
incus_storage_pool.witness,
|
||||
]
|
||||
name = var.name
|
||||
driver = var.driver
|
||||
}
|
||||
Reference in New Issue
Block a user