Add support for the vsphere_host_pci_device
data source to return all PCI devices which share the same details
#1572
Labels
acknowledged
Status: Issue or Pull Request Acknowledged
enhancement
Type: Enhancement
new-data-source
Feature: New Data Source
Milestone
Description
Using vsphere_host_pci_device data source, unable to get ID of the second device when there is a situation where there are 2 PCI devices on the same host which share same vendor, name, model.
For example, I have an esxi host which has 2 GPU cards from the same vendor, and are the same.
and
Now, if i want to get the ID of these devices, ill need to use code below.
Potential Terraform Configuration
Here im using name_regex to find a matching device, problem is, this returns only a single ID of the first match. Its impossible to get the ID of the second GPU.
Same happens when trying to filter using
vendor_id
orclass_id
When I run the above code, and use output to see output:
this is the result:
Only the first GPU is "reachable"
Community Note
The text was updated successfully, but these errors were encountered: