diff --git a/lxc/grail-2/main.tf b/lxc/grail-2/main.tf index e755a51..a3e3a7e 100644 --- a/lxc/grail-2/main.tf +++ b/lxc/grail-2/main.tf @@ -7,6 +7,20 @@ terraform { } } +# --------------------------------------------------------------- +# Cloud‑Init snippet – must live in the same module as the VM +# --------------------------------------------------------------- +resource "proxmox_virtual_environment_file" "cloud_config" { + content_type = "snippets" + datastore_id = "local" + node_name = "pve-node" + + source_raw { + data = file("${path.module}/user-data.yaml") + file_name = "debian-cloud-config.yaml" + } +} + resource "proxmox_virtual_environment_vm" "debian_vm" { name = "debian-bgp-node" node_name = var.node_name