-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
d/vsphere_network
errors if networks of different types use the same name
#1143
Comments
I think a better approach, in my opinion, would be to split out the vsphere_network data resource in to 3 separate ones:
I'd also suggest adding a data resource for vsphere_host_port_group (there is already one for DVS). That would bring the network data resources into line with the regular resource types + an extra one for opaque networks. Looking at the docs, Thoughts? I'd be happy to take a look at this as part of #1145 Edit - It looks like the [1] - https://vdc-download.vmware.com/vmwb-repository/dcr-public/b50dcbbf-051d-4204-a3e7-e1b618c1e384/538cf2ec-b34f-4bae-a332-3820ef9e7773/vim.Network.html |
Yes - agreed - that sounds like a sensible approach, although I'm very new to the provider so don't really have a feel for the best architectural way to address this. Others are probably in a better position to provide concrete input. My first thought was thinking about backwards compatibility, but I believe you are suggesting leaving the current vsphere_network functionality as is, and simply ensuring there are more specific network data resources for each of the potential types, so no concerns there. |
I don't really have an opinion on the backwards compatibility but I would hazard a guess that either the existing vsphere_network data resource would stay as an option or get deprecated. I think that's up to the core maintainers but I think the additional functionality and specificity suggested would still be useful. |
I can see the benefits to both approaches, but I think that it would be better to add the |
d/vsphere_network
errors if networks of different types use the same name
I am having the same issue, where I cannot specify a host-based port group with the same name as a VDS port group. It is possible to specify the distributed port group by using |
This functionality has been released in v2.10.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
I am working with a vSphere set-up in which there is a standard (host-based) port group and a DVS port group that both have the same name. Thus trying to create a
vsphere_network
data object fails with the following error:Here's the vsphere_network data object from the Terraform file:
I'm trying to get the standard port group, so it would be really useful to be able to specify the type in the above to be able to indicate which type of network I am interested in.
This looks related to the change that was made by this pull request: #1001 - for differentiating between DVS port groups with the same name where a distributed_virtual_switch_uuid argument was added.
Does such a change sound sensible? Or am I missing something and there is already a way I could disambiguate the two port groups?
Potential Terraform Configuration
where
type of network
is one of "DistributedVirtualPortgroup", "Network" or "OpaqueNetwork".References
#925
Community Note
The text was updated successfully, but these errors were encountered: