Skip to content

Commit

Permalink
Update docs for vsphere_distributed_virtual_switch
Browse files Browse the repository at this point in the history
Addresses #981 - a documentation issue.
- Clarifies the support for LBT - `loadbalance_loadbased`
- Corrects the name and acronym of the vSphere object (_vSphere Distributed Switch (VDS)_) in the resource and data source documentation.
- Additional updates to the resource and data source documentation for accuracy and quality improvements.

Ryan Johnson <[email protected]>
  • Loading branch information
Ryan Johnson authored and appilon committed Jan 19, 2022
1 parent 621d75c commit 6f0b7ad
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 85 deletions.
32 changes: 16 additions & 16 deletions website/docs/d/distributed_virtual_switch.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@ layout: "vsphere"
page_title: "VMware vSphere: vsphere_distributed_virtual_switch"
sidebar_current: "docs-vsphere-data-source-distributed-virtual-switch"
description: |-
Provides a vSphere distributed virtual switch data source. This can be used to get select attributes of a DVS.
Provides a vSphere Distributed Switch data source. This can be used to get select attributes of a VDS.
---

# vsphere\_distributed\_virtual\_switch

The `vsphere_distributed_virtual_switch` data source can be used to discover
the ID and uplink data of a of a vSphere distributed virtual switch (DVS). This
can then be used with resources or data sources that require a DVS, such as the
the ID and uplink data of a of a vSphere Distributed Switch (VDS). This
can then be used with resources or data sources that require a VDS, such as the
[`vsphere_distributed_port_group`][distributed-port-group] resource, for which
an example is shown below.

[distributed-port-group]: /docs/providers/vsphere/r/distributed_port_group.html

~> **NOTE:** This data source requires vCenter and is not available on direct
ESXi connections.
~> **NOTE:** This data source requires vCenter Server and is not available on direct
ESXi host connections.

## Example Usage

The following example locates a DVS that is named `terraform-test-dvs`, in the
datacenter `dc1`. It then uses this DVS to set up a
The following example locates a VDS that is named `terraform-test-vds`, in the
datacenter `dc1`. It then uses this VDS to set up a
`vsphere_distributed_port_group` resource that uses the first uplink as a
primary uplink and the second uplink as a secondary.

Expand All @@ -31,28 +31,28 @@ data "vsphere_datacenter" "datacenter" {
name = "dc1"
}
data "vsphere_distributed_virtual_switch" "dvs" {
name = "terraform-test-dvs"
data "vsphere_distributed_virtual_switch" "vds" {
name = "terraform-test-vds"
datacenter_id = "${data.vsphere_datacenter.datacenter.id}"
}
resource "vsphere_distributed_port_group" "pg" {
name = "terraform-test-pg"
distributed_virtual_switch_uuid = "${data.vsphere_distributed_virtual_switch.dvs.id}"
distributed_virtual_switch_uuid = "${data.vsphere_distributed_virtual_switch.vds.id}"
active_uplinks = ["${data.vsphere_distributed_virtual_switch.dvs.uplinks[0]}"]
standby_uplinks = ["${data.vsphere_distributed_virtual_switch.dvs.uplinks[1]}"]
active_uplinks = ["${data.vsphere_distributed_virtual_switch.vds.uplinks[0]}"]
standby_uplinks = ["${data.vsphere_distributed_virtual_switch.vds.uplinks[1]}"]
}
```

## Argument Reference

The following arguments are supported:

* `name` - (Required) The name of the distributed virtual switch. This can be a
* `name` - (Required) The name of the VDS. This can be a
name or path.
* `datacenter_id` - (Optional) The [managed object reference
ID][docs-about-morefs] of the datacenter the DVS is located in. This can be
ID][docs-about-morefs] of the datacenter the VDS is located in. This can be
omitted if the search path used in `name` is an absolute path. For default
datacenters, use the id attribute from an empty `vsphere_datacenter` data
source.
Expand All @@ -63,8 +63,8 @@ The following arguments are supported:

The following attributes are exported:

* `id`: The UUID of the distributed virtual switch.
* `uplinks`: The list of the uplinks on this DVS, as per the
* `id`: The UUID of the VDS.
* `uplinks`: The list of the uplinks on this VDS, as per the
[`uplinks`][distributed-virtual-switch-uplinks] argument to the
[`vsphere_distributed_virtual_switch`][distributed-virtual-switch-resource]
resource.
Expand Down
Loading

0 comments on commit 6f0b7ad

Please sign in to comment.