From ab749f7e111478cc20175c77e920cdb6a639b5d9 Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Fri, 19 Apr 2024 01:05:26 +0200 Subject: [PATCH] Piccoli aggiustamenti ai template per proxmox vm. --- pvm-ansible/__main__.py | 13 ++++++------- pvm/__main__.py | 7 ++++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pvm-ansible/__main__.py b/pvm-ansible/__main__.py index 13dc43e..0249be8 100644 --- a/pvm-ansible/__main__.py +++ b/pvm-ansible/__main__.py @@ -14,12 +14,10 @@ i.close() config = pulumi.Config() provider = proxmox.Provider("proxmoxve", - virtual_environment = { - "endpoint": input_['pve']['url'], - "insecure": input_['pve']['insecure'], - "username": input_['pve']['username'], - "password": config.require_secret("password") - } + endpoint=input_['pve']['url'], + insecure=input_['pve']['insecure'], + username=input_['pve']['username'], + password=config.require_secret("password") ) vm_name = input_['vm']['name'] @@ -75,7 +73,8 @@ vm = proxmox.vm.VirtualMachine("vm", ) ), opts = pulumi.ResourceOptions( - provider = provider + provider = provider, + custom_timeouts=pulumi.CustomTimeouts(create="3m") ) ) diff --git a/pvm/__main__.py b/pvm/__main__.py index 8379a7d..825c782 100644 --- a/pvm/__main__.py +++ b/pvm/__main__.py @@ -1,9 +1,9 @@ """A ProxmoxVE VM template with Python""" -import yaml -from dotmap import DotMap import pulumi import pulumi_proxmoxve as proxmox +import yaml +from dotmap import DotMap conf = DotMap(yaml.safe_load(open("input.yaml").read())) config = pulumi.Config() @@ -63,7 +63,8 @@ vm = proxmox.vm.VirtualMachine(conf.vm.name, ) ), opts = pulumi.ResourceOptions( - provider = provider + provider = provider, + custom_timeouts=pulumi.CustomTimeouts(create="3m") ) )