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()
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": config.require("endpoint"),
# "insecure": True,
# "username": "root@pam",
# "password": config.require_secret("pvepassword")
# }
#)
vm = proxmox.vm.VirtualMachine("vm",
name = "virtual-machine",
@ -66,9 +66,9 @@ vm = proxmox.vm.VirtualMachine("vm",
]
)
),
opts = pulumi.ResourceOptions(
provider = provider
)
#opts = pulumi.ResourceOptions(
# provider = provider
#)
)
pulumi.export("ip", vm.ipv4_address)