-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for a vsphere_distributed_port_group
data source
#1410
Comments
To add colour to why this would be useful - We would like to start deploying VMs via Terraform in an environment which already contains distributed port groups. We currently would need to create a new dpg managed by Terraform or import the existing dpg to the state which is not an optimal way of doing this. |
vsphere_distributed_virtual_switch
data source
vsphere_distributed_virtual_switch
data sourcevsphere_distributed_port_group
data source
so this was just write for vsphere_network to pull back the distribution or standard switch portgroup by network_type and name would it work for this problem? |
That might work? From my read of the Changelog on that PR, it would seem to cover my use case. |
i updated it so it would look like this
give it a run through, we can create a new data source with the same type code but did not know if this would work |
yeah that should work for me.! |
I had to make a couple changes to the code, once it is release it, i will close out this issue |
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
Although we have a resource for creating/manipulating a new distributed port group, there is no data source for retrieving a current distributed port group. This is challenging when attempting to use other resources (e.g.
vsphere_entity_permissions
) - requiring the end user to find the mo-ref/entity id manually.The data resource would require a parent distributed virtual switch id and a port group name (used for searching/filtering distributed port groups). For brevity, I chose
dvs_id
but that could easily bevirtualswitch_id
or something else that's more robust.Potential Terraform Configuration
References
Community Note
The text was updated successfully, but these errors were encountered: