Skip to content
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

New data source: vsphere_network #201

Merged
merged 1 commit into from
Oct 12, 2017
Merged

Conversation

vancluever
Copy link
Contributor

This introduces the vsphere_network data source, which allows one to
look up a general network in vSphere via a path.

This will be useful in upcoming resources that will require a network
managed object ID, versus a network name or path, effectively moving all
of the "heavy lifting" in translating a network from a human-readable
name to an object over to this data source, versus being handled in the
resource itself (which will ultimately just fetch the network by its
MOID, without worrying about the details underneath).

This introduces the vsphere_network data source, which allows one to
look up a general network in vSphere via a path.

This will be useful in upcoming resources that will require a network
managed object ID, versus a network name or path, effectively moving all
of the "heavy lifting" in translating a network from a human-readable
name to an object over to this data source, versus being handled in the
resource itself (which will ultimately just fetch the network by its
MOID, without worrying about the details underneath).
@vancluever vancluever added enhancement Type: Enhancement new-data-source Feature: New Data Source labels Oct 12, 2017
vancluever added a commit that referenced this pull request Oct 12, 2017
The additions that are in #201 dictate the basis for how we will be
working with vSphere networks in the future - any resource that requires
a network for a backing (ie: virtual ethernet cards, VMkernel nics, etc)
will require a MOID to some sort of network, versus the name itself,
allowing us to circumvent actually searching for the network in the
downstream resource itself. Searching would be circumvented altogether
in the case of DVS portgroups being managed by TF completely as we would
just pass the MOID to the downstream resource.

The current behaviour of the vsphere_distributed_port_group resource is
to use the key attribute in the MO as the ID of the resource, which is
documented in the API as the UUID of the DVS port group, although in
reality it actually seems to be the MOID, which allows #201 to work
without issue right now. However, in order to guarantee that things will
be stable in the long run, we need to be sure we are using the right
values, so this update changes the ID to be the MOID of the object
itself. key is now being exported as a computed attribute of the same
name.
Copy link

@catsby catsby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@vancluever vancluever merged commit 8911813 into master Oct 12, 2017
@vancluever
Copy link
Contributor Author

Thanks @catsby! 🙂

@vancluever vancluever deleted the f-network-data-source branch November 22, 2017 00:09
@ghost ghost locked and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Type: Enhancement new-data-source Feature: New Data Source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants