Astrazione per provider.

This commit is contained in:
Emiliano Vavassori 2022-08-17 02:09:02 +02:00
parent d24d0fe790
commit b75c5f6981
1 changed files with 11 additions and 11 deletions

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)