diff --git a/proxmoxve-python/__main__.py b/proxmoxve-python/__main__.py index 43f6f97..fb37d45 100644 --- a/proxmoxve-python/__main__.py +++ b/proxmoxve-python/__main__.py @@ -4,19 +4,20 @@ import pulumi import pulumi_proxmoxve as proxmox config = pulumi.Config() +data = pulumi.require_object("pve") -#provider = proxmox.Provider("proxmoxve", -# virtual_environment = { -# "endpoint": config.require("endpoint"), -# "insecure": True, -# "username": "root@pam", -# "password": config.require_secret("pvepassword") -# } -#) +provider = proxmox.Provider("proxmoxve", + virtual_environment = { + "endpoint": data.get("endpoint"), + "insecure": True, + "username": "root@pam", + "password": data.get_secret("password") + } +) vm = proxmox.vm.VirtualMachine("vm", name = "virtual-machine", - node_name = config.require("node_name"), + node_name = data.get("node_name"), agent = proxmox.vm.VirtualMachineAgentArgs( enabled = True, trim = True, @@ -31,7 +32,7 @@ vm = proxmox.vm.VirtualMachine("vm", dedicated = 2048 ), clone = proxmox.vm.VirtualMachineCloneArgs( - node_name = config.require("node_name"), + node_name = data.require("node_name"), vm_id = config.require("clonevm"), full = True ),