You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vote on this issue by adding a 👍 reaction to the original issue initial description to help the maintainers prioritize.
Do not leave "+1" or other comments that do not add relevant information or questions.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Terraform
2.10.0
Terraform Provider
hashicorp/vsphere
VMware vSphere
7.0.3
Description
Description
When configuring SR-IOV network interfaces in Terraform, there's a discrepancy between how vSphere and the Terraform provider handle automatically assigned physical functions. In vSphere, when SR-IOV networks are configured, the system automatically assigns physical functions with the prefix "Automatic-" followed by the PCI address (e.g., "Automatic-0000:19:00.3"). However, the Terraform provider doesn't recognize this format and throws an error.
Current Behavior
When specifying the exact format shown in vSphere:
Error: unable to find SR-IOV physical adapter Automatic-0000:19:00.3 on host esxi-host-01.domain.com
Additional Context
This appears to be a disconnect between how vSphere represents automatically assigned SR-IOV physical functions and how the Terraform provider validates them. The "Automatic-" prefix is a valid vSphere construct that should be recognized by the provider.
The provider should recognize and accept the "Automatic-" prefix format as it is the valid format shown in vSphere UI and API responses.
Actual Behavior
Tries to set a manual physical_function with the "Automatic-" included as the value.
Steps to Reproduce
Steps to Reproduce
Initial Environment Setup:
Have an existing vSphere cluster with VMs configured with SR-IOV networks via vCenter GUI
SR-IOV is properly configured on ESXi hosts and working
VMs are running with SR-IOV network interfaces that show as "Automatic-[PCI_ADDRESS]" in vCenter
Import Existing Infrastructure to Terraform:
# First, create basic Terraform configuration with provider
terraform init
# Import existing VM
terraform import vsphere_virtual_machine.ISP-server01 'datastore/vm/ISP-server01'# run plan to compare my main.tf resource config with vspheres actual state.
terraform plan
Environment Details
No response
Screenshots
No response
References
No response
The text was updated successfully, but these errors were encountered:
Community Guidelines
Terraform
2.10.0
Terraform Provider
hashicorp/vsphere
VMware vSphere
7.0.3
Description
Description
When configuring SR-IOV network interfaces in Terraform, there's a discrepancy between how vSphere and the Terraform provider handle automatically assigned physical functions. In vSphere, when SR-IOV networks are configured, the system automatically assigns physical functions with the prefix "Automatic-" followed by the PCI address (e.g., "Automatic-0000:19:00.3"). However, the Terraform provider doesn't recognize this format and throws an error.
Current Behavior
When specifying the exact format shown in vSphere:
Error: unable to find SR-IOV physical adapter Automatic-0000:19:00.3 on host esxi-host-01.domain.com
Additional Context
This appears to be a disconnect between how vSphere represents automatically assigned SR-IOV physical functions and how the Terraform provider validates them. The "Automatic-" prefix is a valid vSphere construct that should be recognized by the provider.
Affected Resources or Data Sources
resource/vsphere_virtual_machine
Terraform Configuration
Debug Output
https://gist.github.com/RocketLR/ad446bb6b149c0b4f5b1aa281ad872b9
Panic Output
No response
Expected Behavior
The provider should recognize and accept the "Automatic-" prefix format as it is the valid format shown in vSphere UI and API responses.
Actual Behavior
Tries to set a manual physical_function with the "Automatic-" included as the value.
Steps to Reproduce
Steps to Reproduce
Initial Environment Setup:
Import Existing Infrastructure to Terraform:
Environment Details
No response
Screenshots
No response
References
No response
The text was updated successfully, but these errors were encountered: