2026-09-12 15:33:40 +01:00
|
|
|
module "proxmox_ubuntu_cloudinit_clone" {
|
2026-09-07 21:04:47 +00:00
|
|
|
for_each = local.instance_map
|
|
|
|
|
source = "./modules/proxmox_ubuntu_cloudinit_clone"
|
|
|
|
|
|
|
|
|
|
vm_name = each.value.vm_name
|
2026-09-12 16:02:35 +01:00
|
|
|
service_name = each.value.service_name
|
2026-09-07 21:04:47 +00:00
|
|
|
node_name = each.value.node_name
|
|
|
|
|
node_datastore = var.vm_defaults.node_datastore
|
|
|
|
|
bridge = var.vm_defaults.bridge
|
|
|
|
|
vm_cpu = coalesce(try(each.value.vm_cpu, null), var.vm_defaults.vm_cpu)
|
|
|
|
|
vm_ram = coalesce(try(each.value.vm_ram, null), var.vm_defaults.vm_ram)
|
|
|
|
|
vm_size = coalesce(try(each.value.vm_size, null), var.vm_defaults.vm_size)
|
|
|
|
|
vm_bios = var.vm_defaults.vm_bios
|
|
|
|
|
vm_machine = var.vm_defaults.vm_machine
|
2026-09-12 15:17:04 +01:00
|
|
|
vm_tags = concat(
|
2026-09-07 21:04:47 +00:00
|
|
|
try(each.value.vm_tags, []),
|
|
|
|
|
["terraform", "docker", each.value.service_name]
|
|
|
|
|
)
|
|
|
|
|
vm_user_sshkey = var.vm_defaults.vm_user_sshkey
|
2026-09-12 15:33:40 +01:00
|
|
|
compose_file_content = file("${path.root}/../compose/docker-compose.yml")
|
|
|
|
|
env_file_content = file("${path.root}/../compose/.env")
|
2026-09-07 21:04:47 +00:00
|
|
|
}
|
|
|
|
|
|
2026-09-12 15:33:40 +01:00
|
|
|
# module "inventory" {
|
|
|
|
|
# source = "./modules/proxmox_ansible_inventory"
|
|
|
|
|
# filename = "${abspath("${path.root}/..")}/ansible/inventory/inventory.yml"
|
|
|
|
|
# instances = local.vm_created
|
|
|
|
|
# }
|
2026-09-07 21:04:47 +00:00
|
|
|
|
2026-09-12 15:33:40 +01:00
|
|
|
# module "vm_data" {
|
|
|
|
|
# source = "./modules/proxmox_vm_data"
|
|
|
|
|
# filename = "${abspath("${path.root}/..")}/terraform/vm_data.yml"
|
|
|
|
|
# instances = local.vm_created
|
|
|
|
|
# }
|