Astrazione per provider.

This commit is contained in:
Emiliano Vavassori 2022-08-17 02:09:02 +02:00
parent d24d0fe790
commit b75c5f6981

View File

@ -5,14 +5,14 @@ import pulumi_proxmoxve as proxmox
config = pulumi.Config() config = pulumi.Config()
provider = proxmox.Provider("proxmoxve", #provider = proxmox.Provider("proxmoxve",
virtual_environment = { # virtual_environment = {
"endpoint": config.require("endpoint"), # "endpoint": config.require("endpoint"),
"insecure": True, # "insecure": True,
"username": "root@pam", # "username": "root@pam",
"password": config.require_secret("pvepassword") # "password": config.require_secret("pvepassword")
} # }
) #)
vm = proxmox.vm.VirtualMachine("vm", vm = proxmox.vm.VirtualMachine("vm",
name = "virtual-machine", name = "virtual-machine",
@ -66,9 +66,9 @@ vm = proxmox.vm.VirtualMachine("vm",
] ]
) )
), ),
opts = pulumi.ResourceOptions( #opts = pulumi.ResourceOptions(
provider = provider # provider = provider
) #)
) )
pulumi.export("ip", vm.ipv4_address) pulumi.export("ip", vm.ipv4_address)