OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
OpenTofu will perform the following actions:
# proxmox_virtual_environment_vm.test_vm will be created
+ resource "proxmox_virtual_environment_vm" "test_vm" {
+ acpi = true
+ bios = "seabios"
+ id = (known after apply)
+ ipv4_addresses = (known after apply)
+ ipv6_addresses = (known after apply)
+ keyboard_layout = "en-us"
+ mac_addresses = (known after apply)
+ migrate = false
+ name = "test-hostpci"
+ network_interface_names = (known after apply)
+ node_name = "pve"
+ on_boot = true
+ protection = false
+ reboot = false
+ scsi_hardware = "virtio-scsi-pci"
+ started = false
+ stop_on_destroy = false
+ tablet_device = true
+ template = false
+ timeout_clone = 1800
+ timeout_create = 1800
+ timeout_migrate = 1800
+ timeout_move_disk = 1800
+ timeout_reboot = 1800
+ timeout_shutdown_vm = 1800
+ timeout_start_vm = 1800
+ timeout_stop_vm = 300
+ vm_id = 999
+ hostpci {
+ device = "hostpci0"
+ id = "0000:01:00.0"
+ pcie = true
}
+ hostpci {
+ device = "hostpci2"
+ id = "0000:01:00.0"
+ pcie = true
}
+ hostpci {
+ device = "hostpci4"
+ id = "0000:01:00.0"
+ pcie = true
}
+ hostpci {
+ device = "hostpci6"
+ id = "0000:01:00.0"
+ pcie = true
}
+ hostpci {
+ device = "hostpci8"
+ id = "0000:01:00.0"
+ pcie = true
}
}
Plan: 1 to add, 0 to change, 0 to destroy.
proxmox_virtual_environment_vm.test_vm: Creating...
proxmox_virtual_environment_vm.test_vm: Creation complete after 1s [id=999]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
❯ tofu apply -auto-approve
proxmox_virtual_environment_vm.test_vm: Refreshing state... [id=999]
OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
~ update in-place
OpenTofu will perform the following actions:
# proxmox_virtual_environment_vm.test_vm will be updated in-place
~ resource "proxmox_virtual_environment_vm" "test_vm" {
id = "999"
name = "test-hostpci"
tags = []
# (26 unchanged attributes hidden)
~ hostpci {
~ device = "hostpci1" -> "hostpci2"
id = "0000:01:00.0"
# (3 unchanged attributes hidden)
}
~ hostpci {
~ device = "hostpci2" -> "hostpci4"
id = "0000:01:00.0"
# (3 unchanged attributes hidden)
}
~ hostpci {
~ device = "hostpci3" -> "hostpci6"
id = "0000:01:00.0"
# (3 unchanged attributes hidden)
}
+ hostpci {
+ device = "hostpci8"
+ id = "0000:01:00.0"
+ pcie = true
}
# (1 unchanged block hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
proxmox_virtual_environment_vm.test_vm: Modifying... [id=999]
proxmox_virtual_environment_vm.test_vm: Modifications complete after 1s [id=999]
Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
After the fix:
❯ tofu apply -auto-approve
OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
OpenTofu will perform the following actions:
# proxmox_virtual_environment_vm.test_vm will be created
+ resource "proxmox_virtual_environment_vm" "test_vm" {
+ acpi = true
+ bios = "seabios"
+ id = (known after apply)
+ ipv4_addresses = (known after apply)
+ ipv6_addresses = (known after apply)
+ keyboard_layout = "en-us"
+ mac_addresses = (known after apply)
+ migrate = false
+ name = "test-hostpci"
+ network_interface_names = (known after apply)
+ node_name = "pve"
+ on_boot = true
+ protection = false
+ reboot = false
+ scsi_hardware = "virtio-scsi-pci"
+ started = false
+ stop_on_destroy = false
+ tablet_device = true
+ template = false
+ timeout_clone = 1800
+ timeout_create = 1800
+ timeout_migrate = 1800
+ timeout_move_disk = 1800
+ timeout_reboot = 1800
+ timeout_shutdown_vm = 1800
+ timeout_start_vm = 1800
+ timeout_stop_vm = 300
+ vm_id = 999
+ hostpci {
+ device = "hostpci0"
+ id = "0000:01:00.0"
+ pcie = true
}
+ hostpci {
+ device = "hostpci2"
+ id = "0000:01:00.0"
+ pcie = true
}
+ hostpci {
+ device = "hostpci4"
+ id = "0000:01:00.0"
+ pcie = true
}
+ hostpci {
+ device = "hostpci6"
+ id = "0000:01:00.0"
+ pcie = true
}
+ hostpci {
+ device = "hostpci8"
+ id = "0000:01:00.0"
+ pcie = true
}
}
Plan: 1 to add, 0 to change, 0 to destroy.
proxmox_virtual_environment_vm.test_vm: Creating...
proxmox_virtual_environment_vm.test_vm: Creation complete after 1s [id=999]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
❯ tofu apply -auto-approve
proxmox_virtual_environment_vm.test_vm: Refreshing state... [id=999]
No changes. Your infrastructure matches the configuration.
OpenTofu has compared your real infrastructure against your configuration and found no differences, so no changes are needed.
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
Community Note
Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request
Contributor's Note
/docs
for any user-facing features or additions./fwprovider/tests
for any new or updated resources / data sources.make example
to verify that the change works as expected.Proof of Work
Using template:
Before the fix:
After the fix:
Community Note
Closes #1541