diff --git a/proxmoxve-python/__main__.py b/proxmoxve-python/__main__.py index aa8f69d..3c57fb5 100644 --- a/proxmoxve-python/__main__.py +++ b/proxmoxve-python/__main__.py @@ -32,7 +32,7 @@ vm = proxmox.vm.VirtualMachine("vm", dedicated = 2048 ), clone = proxmox.vm.VirtualMachineCloneArgs( - node_name = data.require("node_name"), + node_name = data.get("node_name"), vm_id = config.require("clonevm"), full = True ), @@ -71,5 +71,9 @@ vm = proxmox.vm.VirtualMachine("vm", provider = provider ) ) + +# Getting local IP +# First item of the ipv4_addresses is of the loopback interface (so the usual 127.0.0.1). Let's get the second and grab only the text. +lanip = vm.ipv4_addresses[1][0] -pulumi.export("ip", vm.ipv4_address) +pulumi.export("ip", lanip)