This commit is contained in:
Ryan Toler
2026-03-01 21:43:26 +00:00
parent 1daab293a7
commit a548c2709e

View File

@@ -42,19 +42,14 @@ provider "proxmox" {
locals { locals {
lxc_containers = [ lxc_containers = [
"./lxc/foo", "./lxc/downloader"
"./lxc/bar",
"./lxc/baz"
] ]
} }
variable "lxc_dirs" {
type = list(string) # or set(string)
}
module "lxc_containers" { module "lxc_containers" {
for_each = toset(local.lxc_dirs) for_each = { for path in local.lxc_containers : path => {} }
source = each.value source = "./modules/lxc_container"
dir = each.key # or whatever input your module expects
} }