bpg / terraform-provider-proxmox

Terraform Provider for Proxmox
https://registry.terraform.io/providers/bpg/proxmox
Mozilla Public License 2.0
759 stars 125 forks source link

[Datasource - proxmox_virtual_environment_vms] Request fails if one of the nodes of the cluster fails #1460

Open Dr-Shadow opened 1 month ago

Dr-Shadow commented 1 month ago

Describe the bug When one of my cluster node is down, the datasource request fails.

To Reproduce Steps to reproduce the behavior:

  1. Create a resource
    data "proxmox_virtual_environment_vms" "base_vm" {
    tags = "some_tag"
    }
  2. Run 'terraform plan' when one node of the cluster is down
  3. Error => error retrieving VMs: received an HTTP 595 response - Reason: No route to host

Expected behavior Should it fail ? It is hard to tell since there could be some nodes down for maintenance. This could happen for other ressources as well (if they're requesting the node which is down for maintenance) I can use node_name to filter on a working node but it seems a bit "hacky"

bpg commented 1 month ago

Hi @Dr-Shadow 👋🏼

Yeah, that shouldn't cause an error, the datasource should be able to filter out unavailable nodes or handle that error.