pulumi-vsphere 4.12.0__py3-none-any.whl → 4.12.0a1725603256__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pulumi-vsphere might be problematic. Click here for more details.
- pulumi_vsphere/_inputs.py +6 -1135
- pulumi_vsphere/_utilities.py +1 -1
- pulumi_vsphere/compute_cluster.py +2 -181
- pulumi_vsphere/compute_cluster_host_group.py +2 -67
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +2 -29
- pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +2 -41
- pulumi_vsphere/compute_cluster_vm_dependency_rule.py +2 -205
- pulumi_vsphere/compute_cluster_vm_group.py +2 -198
- pulumi_vsphere/compute_cluster_vm_host_rule.py +2 -73
- pulumi_vsphere/config/__init__.pyi +0 -5
- pulumi_vsphere/config/vars.py +0 -5
- pulumi_vsphere/content_library.py +2 -103
- pulumi_vsphere/content_library_item.py +2 -143
- pulumi_vsphere/custom_attribute.py +2 -77
- pulumi_vsphere/datacenter.py +4 -19
- pulumi_vsphere/datastore_cluster.py +2 -63
- pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +2 -159
- pulumi_vsphere/distributed_port_group.py +2 -285
- pulumi_vsphere/distributed_virtual_switch.py +2 -261
- pulumi_vsphere/dpm_host_override.py +2 -63
- pulumi_vsphere/drs_vm_override.py +2 -67
- pulumi_vsphere/entity_permissions.py +0 -5
- pulumi_vsphere/file.py +0 -5
- pulumi_vsphere/folder.py +2 -141
- pulumi_vsphere/get_compute_cluster.py +4 -15
- pulumi_vsphere/get_compute_cluster_host_group.py +6 -17
- pulumi_vsphere/get_content_library.py +4 -12
- pulumi_vsphere/get_content_library_item.py +4 -16
- pulumi_vsphere/get_custom_attribute.py +4 -13
- pulumi_vsphere/get_datacenter.py +7 -29
- pulumi_vsphere/get_datastore.py +4 -16
- pulumi_vsphere/get_datastore_cluster.py +5 -30
- pulumi_vsphere/get_datastore_stats.py +4 -16
- pulumi_vsphere/get_distributed_virtual_switch.py +4 -15
- pulumi_vsphere/get_dynamic.py +4 -16
- pulumi_vsphere/get_folder.py +4 -12
- pulumi_vsphere/get_guest_os_customization.py +4 -17
- pulumi_vsphere/get_host.py +4 -15
- pulumi_vsphere/get_host_base_images.py +4 -11
- pulumi_vsphere/get_host_pci_device.py +4 -19
- pulumi_vsphere/get_host_thumbprint.py +14 -34
- pulumi_vsphere/get_host_vgpu_profile.py +4 -15
- pulumi_vsphere/get_license.py +4 -17
- pulumi_vsphere/get_network.py +5 -65
- pulumi_vsphere/get_ovf_vm_template.py +4 -55
- pulumi_vsphere/get_policy.py +4 -12
- pulumi_vsphere/get_resource_pool.py +4 -14
- pulumi_vsphere/get_role.py +4 -18
- pulumi_vsphere/get_tag.py +4 -15
- pulumi_vsphere/get_tag_category.py +4 -15
- pulumi_vsphere/get_vapp_container.py +4 -14
- pulumi_vsphere/get_virtual_machine.py +5 -145
- pulumi_vsphere/get_vmfs_disks.py +4 -17
- pulumi_vsphere/guest_os_customization.py +0 -5
- pulumi_vsphere/ha_vm_override.py +2 -163
- pulumi_vsphere/host.py +12 -203
- pulumi_vsphere/host_port_group.py +2 -17
- pulumi_vsphere/host_virtual_switch.py +2 -69
- pulumi_vsphere/license.py +0 -5
- pulumi_vsphere/nas_datastore.py +2 -67
- pulumi_vsphere/offline_software_depot.py +0 -5
- pulumi_vsphere/outputs.py +0 -45
- pulumi_vsphere/provider.py +0 -5
- pulumi_vsphere/pulumi-plugin.json +1 -1
- pulumi_vsphere/resource_pool.py +437 -168
- pulumi_vsphere/role.py +2 -33
- pulumi_vsphere/storage_drs_vm_override.py +2 -133
- pulumi_vsphere/supervisor.py +0 -5
- pulumi_vsphere/tag.py +2 -159
- pulumi_vsphere/tag_category.py +2 -83
- pulumi_vsphere/vapp_container.py +2 -163
- pulumi_vsphere/vapp_entity.py +2 -147
- pulumi_vsphere/virtual_disk.py +2 -81
- pulumi_vsphere/virtual_machine.py +2 -100
- pulumi_vsphere/virtual_machine_class.py +0 -5
- pulumi_vsphere/virtual_machine_snapshot.py +0 -5
- pulumi_vsphere/vm_storage_policy.py +0 -5
- pulumi_vsphere/vmfs_datastore.py +2 -271
- pulumi_vsphere/vnic.py +4 -19
- {pulumi_vsphere-4.12.0.dist-info → pulumi_vsphere-4.12.0a1725603256.dist-info}/METADATA +2 -3
- pulumi_vsphere-4.12.0a1725603256.dist-info/RECORD +86 -0
- {pulumi_vsphere-4.12.0.dist-info → pulumi_vsphere-4.12.0a1725603256.dist-info}/WHEEL +1 -1
- pulumi_vsphere-4.12.0.dist-info/RECORD +0 -86
- {pulumi_vsphere-4.12.0.dist-info → pulumi_vsphere-4.12.0a1725603256.dist-info}/top_level.txt +0 -0
|
@@ -4,14 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
-
import sys
|
|
8
7
|
import pulumi
|
|
9
8
|
import pulumi.runtime
|
|
10
9
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
-
if sys.version_info >= (3, 11):
|
|
12
|
-
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
-
else:
|
|
14
|
-
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
15
10
|
from . import _utilities
|
|
16
11
|
from . import outputs
|
|
17
12
|
from ._inputs import *
|
|
@@ -1704,146 +1699,7 @@ class DistributedPortGroup(pulumi.CustomResource):
|
|
|
1704
1699
|
vlan_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DistributedPortGroupVlanRangeArgs', 'DistributedPortGroupVlanRangeArgsDict']]]]] = None,
|
|
1705
1700
|
__props__=None):
|
|
1706
1701
|
"""
|
|
1707
|
-
|
|
1708
|
-
distributed port groups connected to vSphere Distributed Switches (VDS).
|
|
1709
|
-
A vSphere Distributed Switch can be managed by the
|
|
1710
|
-
`DistributedVirtualSwitch` resource.
|
|
1711
|
-
|
|
1712
|
-
Distributed port groups can be used as networks for virtual machines, allowing
|
|
1713
|
-
the virtual machines to use the networking supplied by a vSphere Distributed
|
|
1714
|
-
Switch, with a set of policies that apply to that individual network, if
|
|
1715
|
-
desired.
|
|
1716
|
-
|
|
1717
|
-
* For an overview on vSphere networking concepts, refer to the vSphere
|
|
1718
|
-
[product documentation][ref-vsphere-net-concepts].
|
|
1719
|
-
|
|
1720
|
-
* For more information on distributed port groups, refer to the vSphere
|
|
1721
|
-
[product documentation][ref-vsphere-dvportgroup].
|
|
1722
|
-
|
|
1723
|
-
[ref-vsphere-net-concepts]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-2B11DBB8-CB3C-4AFF-8885-EFEA0FC562F4.html
|
|
1724
|
-
[ref-vsphere-dvportgroup]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-69933F6E-2442-46CF-AA17-1196CB9A0A09.html
|
|
1725
|
-
|
|
1726
|
-
> **NOTE:** This resource requires vCenter and is not available on
|
|
1727
|
-
direct ESXi host connections.
|
|
1728
|
-
|
|
1729
|
-
## Example Usage
|
|
1730
|
-
|
|
1731
|
-
The configuration below builds on the example given in the
|
|
1732
|
-
`DistributedVirtualSwitch` resource by
|
|
1733
|
-
adding the `DistributedPortGroup` resource, attaching itself to the
|
|
1734
|
-
vSphere Distributed Switch and assigning VLAN ID 1000.
|
|
1735
|
-
|
|
1736
|
-
```python
|
|
1737
|
-
import pulumi
|
|
1738
|
-
import pulumi_vsphere as vsphere
|
|
1739
|
-
|
|
1740
|
-
config = pulumi.Config()
|
|
1741
|
-
hosts = config.get_object("hosts")
|
|
1742
|
-
if hosts is None:
|
|
1743
|
-
hosts = [
|
|
1744
|
-
"esxi-01.example.com",
|
|
1745
|
-
"esxi-02.example.com",
|
|
1746
|
-
"esxi-03.example.com",
|
|
1747
|
-
]
|
|
1748
|
-
network_interfaces = config.get_object("networkInterfaces")
|
|
1749
|
-
if network_interfaces is None:
|
|
1750
|
-
network_interfaces = [
|
|
1751
|
-
"vmnic0",
|
|
1752
|
-
"vmnic1",
|
|
1753
|
-
"vmnic2",
|
|
1754
|
-
"vmnic3",
|
|
1755
|
-
]
|
|
1756
|
-
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
1757
|
-
host = [vsphere.get_host(name=hosts[__index],
|
|
1758
|
-
datacenter_id=datacenter.id) for __index in range(len(hosts))]
|
|
1759
|
-
vds = vsphere.DistributedVirtualSwitch("vds",
|
|
1760
|
-
name="vds-01",
|
|
1761
|
-
datacenter_id=datacenter.id,
|
|
1762
|
-
uplinks=[
|
|
1763
|
-
"uplink1",
|
|
1764
|
-
"uplink2",
|
|
1765
|
-
"uplink3",
|
|
1766
|
-
"uplink4",
|
|
1767
|
-
],
|
|
1768
|
-
active_uplinks=[
|
|
1769
|
-
"uplink1",
|
|
1770
|
-
"uplink2",
|
|
1771
|
-
],
|
|
1772
|
-
standby_uplinks=[
|
|
1773
|
-
"uplink3",
|
|
1774
|
-
"uplink4",
|
|
1775
|
-
],
|
|
1776
|
-
hosts=[
|
|
1777
|
-
{
|
|
1778
|
-
"host_system_id": host[0].id,
|
|
1779
|
-
"devices": [network_interfaces],
|
|
1780
|
-
},
|
|
1781
|
-
{
|
|
1782
|
-
"host_system_id": host[1].id,
|
|
1783
|
-
"devices": [network_interfaces],
|
|
1784
|
-
},
|
|
1785
|
-
{
|
|
1786
|
-
"host_system_id": host[2].id,
|
|
1787
|
-
"devices": [network_interfaces],
|
|
1788
|
-
},
|
|
1789
|
-
])
|
|
1790
|
-
pg = vsphere.DistributedPortGroup("pg",
|
|
1791
|
-
name="pg-01",
|
|
1792
|
-
distributed_virtual_switch_uuid=vds.id,
|
|
1793
|
-
vlan_id=1000)
|
|
1794
|
-
```
|
|
1795
|
-
|
|
1796
|
-
### Overriding VDS policies
|
|
1797
|
-
|
|
1798
|
-
All of the default port policies available in the
|
|
1799
|
-
`DistributedVirtualSwitch` resource can be overridden on the port
|
|
1800
|
-
group level by specifying new settings for them.
|
|
1801
|
-
|
|
1802
|
-
As an example, we also take this example from the
|
|
1803
|
-
`DistributedVirtualSwitch` resource where we manually specify our
|
|
1804
|
-
uplink count and uplink order. While the vSphere Distributed Switch has a
|
|
1805
|
-
default policy of using the first uplink as an active uplink and the second
|
|
1806
|
-
one as a standby, the overridden port group policy means that both uplinks
|
|
1807
|
-
will be used as active uplinks in this specific port group.
|
|
1808
|
-
|
|
1809
|
-
```python
|
|
1810
|
-
import pulumi
|
|
1811
|
-
import pulumi_vsphere as vsphere
|
|
1812
|
-
|
|
1813
|
-
vds = vsphere.DistributedVirtualSwitch("vds",
|
|
1814
|
-
name="vds-01",
|
|
1815
|
-
datacenter_id=datacenter["id"],
|
|
1816
|
-
uplinks=[
|
|
1817
|
-
"uplink1",
|
|
1818
|
-
"uplink2",
|
|
1819
|
-
],
|
|
1820
|
-
active_uplinks=["uplink1"],
|
|
1821
|
-
standby_uplinks=["uplink2"])
|
|
1822
|
-
pg = vsphere.DistributedPortGroup("pg",
|
|
1823
|
-
name="pg-01",
|
|
1824
|
-
distributed_virtual_switch_uuid=vds.id,
|
|
1825
|
-
vlan_id=1000,
|
|
1826
|
-
active_uplinks=[
|
|
1827
|
-
"uplink1",
|
|
1828
|
-
"uplink2",
|
|
1829
|
-
],
|
|
1830
|
-
standby_uplinks=[])
|
|
1831
|
-
```
|
|
1832
|
-
|
|
1833
|
-
## Import
|
|
1834
|
-
|
|
1835
|
-
An existing port group can be imported into this resource using
|
|
1836
|
-
|
|
1837
|
-
the managed object id of the port group, via the following command:
|
|
1838
|
-
|
|
1839
|
-
```sh
|
|
1840
|
-
$ pulumi import vsphere:index/distributedPortGroup:DistributedPortGroup pg /dc-01/network/pg-01
|
|
1841
|
-
```
|
|
1842
|
-
|
|
1843
|
-
The above would import the port group named `pg-01` that is located in the `dc-01`
|
|
1844
|
-
|
|
1845
|
-
datacenter.
|
|
1846
|
-
|
|
1702
|
+
Create a DistributedPortGroup resource with the given unique name, props, and options.
|
|
1847
1703
|
:param str resource_name: The name of the resource.
|
|
1848
1704
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
1849
1705
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] active_uplinks: List of active uplinks used for load balancing, matching the names of the uplinks assigned in the DVS.
|
|
@@ -1928,146 +1784,7 @@ class DistributedPortGroup(pulumi.CustomResource):
|
|
|
1928
1784
|
args: DistributedPortGroupArgs,
|
|
1929
1785
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
1930
1786
|
"""
|
|
1931
|
-
|
|
1932
|
-
distributed port groups connected to vSphere Distributed Switches (VDS).
|
|
1933
|
-
A vSphere Distributed Switch can be managed by the
|
|
1934
|
-
`DistributedVirtualSwitch` resource.
|
|
1935
|
-
|
|
1936
|
-
Distributed port groups can be used as networks for virtual machines, allowing
|
|
1937
|
-
the virtual machines to use the networking supplied by a vSphere Distributed
|
|
1938
|
-
Switch, with a set of policies that apply to that individual network, if
|
|
1939
|
-
desired.
|
|
1940
|
-
|
|
1941
|
-
* For an overview on vSphere networking concepts, refer to the vSphere
|
|
1942
|
-
[product documentation][ref-vsphere-net-concepts].
|
|
1943
|
-
|
|
1944
|
-
* For more information on distributed port groups, refer to the vSphere
|
|
1945
|
-
[product documentation][ref-vsphere-dvportgroup].
|
|
1946
|
-
|
|
1947
|
-
[ref-vsphere-net-concepts]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-2B11DBB8-CB3C-4AFF-8885-EFEA0FC562F4.html
|
|
1948
|
-
[ref-vsphere-dvportgroup]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-69933F6E-2442-46CF-AA17-1196CB9A0A09.html
|
|
1949
|
-
|
|
1950
|
-
> **NOTE:** This resource requires vCenter and is not available on
|
|
1951
|
-
direct ESXi host connections.
|
|
1952
|
-
|
|
1953
|
-
## Example Usage
|
|
1954
|
-
|
|
1955
|
-
The configuration below builds on the example given in the
|
|
1956
|
-
`DistributedVirtualSwitch` resource by
|
|
1957
|
-
adding the `DistributedPortGroup` resource, attaching itself to the
|
|
1958
|
-
vSphere Distributed Switch and assigning VLAN ID 1000.
|
|
1959
|
-
|
|
1960
|
-
```python
|
|
1961
|
-
import pulumi
|
|
1962
|
-
import pulumi_vsphere as vsphere
|
|
1963
|
-
|
|
1964
|
-
config = pulumi.Config()
|
|
1965
|
-
hosts = config.get_object("hosts")
|
|
1966
|
-
if hosts is None:
|
|
1967
|
-
hosts = [
|
|
1968
|
-
"esxi-01.example.com",
|
|
1969
|
-
"esxi-02.example.com",
|
|
1970
|
-
"esxi-03.example.com",
|
|
1971
|
-
]
|
|
1972
|
-
network_interfaces = config.get_object("networkInterfaces")
|
|
1973
|
-
if network_interfaces is None:
|
|
1974
|
-
network_interfaces = [
|
|
1975
|
-
"vmnic0",
|
|
1976
|
-
"vmnic1",
|
|
1977
|
-
"vmnic2",
|
|
1978
|
-
"vmnic3",
|
|
1979
|
-
]
|
|
1980
|
-
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
1981
|
-
host = [vsphere.get_host(name=hosts[__index],
|
|
1982
|
-
datacenter_id=datacenter.id) for __index in range(len(hosts))]
|
|
1983
|
-
vds = vsphere.DistributedVirtualSwitch("vds",
|
|
1984
|
-
name="vds-01",
|
|
1985
|
-
datacenter_id=datacenter.id,
|
|
1986
|
-
uplinks=[
|
|
1987
|
-
"uplink1",
|
|
1988
|
-
"uplink2",
|
|
1989
|
-
"uplink3",
|
|
1990
|
-
"uplink4",
|
|
1991
|
-
],
|
|
1992
|
-
active_uplinks=[
|
|
1993
|
-
"uplink1",
|
|
1994
|
-
"uplink2",
|
|
1995
|
-
],
|
|
1996
|
-
standby_uplinks=[
|
|
1997
|
-
"uplink3",
|
|
1998
|
-
"uplink4",
|
|
1999
|
-
],
|
|
2000
|
-
hosts=[
|
|
2001
|
-
{
|
|
2002
|
-
"host_system_id": host[0].id,
|
|
2003
|
-
"devices": [network_interfaces],
|
|
2004
|
-
},
|
|
2005
|
-
{
|
|
2006
|
-
"host_system_id": host[1].id,
|
|
2007
|
-
"devices": [network_interfaces],
|
|
2008
|
-
},
|
|
2009
|
-
{
|
|
2010
|
-
"host_system_id": host[2].id,
|
|
2011
|
-
"devices": [network_interfaces],
|
|
2012
|
-
},
|
|
2013
|
-
])
|
|
2014
|
-
pg = vsphere.DistributedPortGroup("pg",
|
|
2015
|
-
name="pg-01",
|
|
2016
|
-
distributed_virtual_switch_uuid=vds.id,
|
|
2017
|
-
vlan_id=1000)
|
|
2018
|
-
```
|
|
2019
|
-
|
|
2020
|
-
### Overriding VDS policies
|
|
2021
|
-
|
|
2022
|
-
All of the default port policies available in the
|
|
2023
|
-
`DistributedVirtualSwitch` resource can be overridden on the port
|
|
2024
|
-
group level by specifying new settings for them.
|
|
2025
|
-
|
|
2026
|
-
As an example, we also take this example from the
|
|
2027
|
-
`DistributedVirtualSwitch` resource where we manually specify our
|
|
2028
|
-
uplink count and uplink order. While the vSphere Distributed Switch has a
|
|
2029
|
-
default policy of using the first uplink as an active uplink and the second
|
|
2030
|
-
one as a standby, the overridden port group policy means that both uplinks
|
|
2031
|
-
will be used as active uplinks in this specific port group.
|
|
2032
|
-
|
|
2033
|
-
```python
|
|
2034
|
-
import pulumi
|
|
2035
|
-
import pulumi_vsphere as vsphere
|
|
2036
|
-
|
|
2037
|
-
vds = vsphere.DistributedVirtualSwitch("vds",
|
|
2038
|
-
name="vds-01",
|
|
2039
|
-
datacenter_id=datacenter["id"],
|
|
2040
|
-
uplinks=[
|
|
2041
|
-
"uplink1",
|
|
2042
|
-
"uplink2",
|
|
2043
|
-
],
|
|
2044
|
-
active_uplinks=["uplink1"],
|
|
2045
|
-
standby_uplinks=["uplink2"])
|
|
2046
|
-
pg = vsphere.DistributedPortGroup("pg",
|
|
2047
|
-
name="pg-01",
|
|
2048
|
-
distributed_virtual_switch_uuid=vds.id,
|
|
2049
|
-
vlan_id=1000,
|
|
2050
|
-
active_uplinks=[
|
|
2051
|
-
"uplink1",
|
|
2052
|
-
"uplink2",
|
|
2053
|
-
],
|
|
2054
|
-
standby_uplinks=[])
|
|
2055
|
-
```
|
|
2056
|
-
|
|
2057
|
-
## Import
|
|
2058
|
-
|
|
2059
|
-
An existing port group can be imported into this resource using
|
|
2060
|
-
|
|
2061
|
-
the managed object id of the port group, via the following command:
|
|
2062
|
-
|
|
2063
|
-
```sh
|
|
2064
|
-
$ pulumi import vsphere:index/distributedPortGroup:DistributedPortGroup pg /dc-01/network/pg-01
|
|
2065
|
-
```
|
|
2066
|
-
|
|
2067
|
-
The above would import the port group named `pg-01` that is located in the `dc-01`
|
|
2068
|
-
|
|
2069
|
-
datacenter.
|
|
2070
|
-
|
|
1787
|
+
Create a DistributedPortGroup resource with the given unique name, props, and options.
|
|
2071
1788
|
:param str resource_name: The name of the resource.
|
|
2072
1789
|
:param DistributedPortGroupArgs args: The arguments to use to populate this resource's properties.
|
|
2073
1790
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -4,14 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
-
import sys
|
|
8
7
|
import pulumi
|
|
9
8
|
import pulumi.runtime
|
|
10
9
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
-
if sys.version_info >= (3, 11):
|
|
12
|
-
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
-
else:
|
|
14
|
-
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
15
10
|
from . import _utilities
|
|
16
11
|
from . import outputs
|
|
17
12
|
from ._inputs import *
|
|
@@ -3244,134 +3239,7 @@ class DistributedVirtualSwitch(pulumi.CustomResource):
|
|
|
3244
3239
|
vsan_share_level: Optional[pulumi.Input[str]] = None,
|
|
3245
3240
|
__props__=None):
|
|
3246
3241
|
"""
|
|
3247
|
-
|
|
3248
|
-
Distributed Switches (VDS).
|
|
3249
|
-
|
|
3250
|
-
An essential component of a distributed, scalable vSphere infrastructure, the
|
|
3251
|
-
VDS provides centralized management and monitoring of the networking
|
|
3252
|
-
configuration for all the hosts that are associated with the switch.
|
|
3253
|
-
In addition to adding distributed port groups
|
|
3254
|
-
(see the `DistributedPortGroup` resource)
|
|
3255
|
-
that can be used as networks for virtual machines, a VDS can be configured to
|
|
3256
|
-
perform advanced high availability, traffic shaping, network monitoring, etc.
|
|
3257
|
-
|
|
3258
|
-
For an overview on vSphere networking concepts, see
|
|
3259
|
-
[this page][ref-vsphere-net-concepts].
|
|
3260
|
-
|
|
3261
|
-
For more information on the VDS, see [this page][ref-vsphere-vds].
|
|
3262
|
-
|
|
3263
|
-
[ref-vsphere-net-concepts]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-2B11DBB8-CB3C-4AFF-8885-EFEA0FC562F4.html
|
|
3264
|
-
[ref-vsphere-vds]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-375B45C7-684C-4C51-BA3C-70E48DFABF04.html
|
|
3265
|
-
|
|
3266
|
-
> **NOTE:** This resource requires vCenter and is not available on
|
|
3267
|
-
direct ESXi host connections.
|
|
3268
|
-
|
|
3269
|
-
## Example Usage
|
|
3270
|
-
|
|
3271
|
-
The following example below demonstrates a "standard" example of configuring a
|
|
3272
|
-
VDS in a 3-node vSphere datacenter named `dc1`, across 4 NICs with two being
|
|
3273
|
-
used as active, and two being used as passive. Note that the NIC failover order
|
|
3274
|
-
propagates to any port groups configured on this VDS and can be overridden.
|
|
3275
|
-
|
|
3276
|
-
```python
|
|
3277
|
-
import pulumi
|
|
3278
|
-
import pulumi_vsphere as vsphere
|
|
3279
|
-
|
|
3280
|
-
config = pulumi.Config()
|
|
3281
|
-
hosts = config.get_object("hosts")
|
|
3282
|
-
if hosts is None:
|
|
3283
|
-
hosts = [
|
|
3284
|
-
"esxi-01.example.com",
|
|
3285
|
-
"esxi-02.example.com",
|
|
3286
|
-
"esxi-03.example.com",
|
|
3287
|
-
]
|
|
3288
|
-
network_interfaces = config.get_object("networkInterfaces")
|
|
3289
|
-
if network_interfaces is None:
|
|
3290
|
-
network_interfaces = [
|
|
3291
|
-
"vmnic0",
|
|
3292
|
-
"vmnic1",
|
|
3293
|
-
"vmnic2",
|
|
3294
|
-
"vmnic3",
|
|
3295
|
-
]
|
|
3296
|
-
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
3297
|
-
host = [vsphere.get_host(name=hosts[__index],
|
|
3298
|
-
datacenter_id=datacenter.id) for __index in range(len(hosts))]
|
|
3299
|
-
vds = vsphere.DistributedVirtualSwitch("vds",
|
|
3300
|
-
name="vds-01",
|
|
3301
|
-
datacenter_id=datacenter.id,
|
|
3302
|
-
uplinks=[
|
|
3303
|
-
"uplink1",
|
|
3304
|
-
"uplink2",
|
|
3305
|
-
"uplink3",
|
|
3306
|
-
"uplink4",
|
|
3307
|
-
],
|
|
3308
|
-
active_uplinks=[
|
|
3309
|
-
"uplink1",
|
|
3310
|
-
"uplink2",
|
|
3311
|
-
],
|
|
3312
|
-
standby_uplinks=[
|
|
3313
|
-
"uplink3",
|
|
3314
|
-
"uplink4",
|
|
3315
|
-
],
|
|
3316
|
-
hosts=[
|
|
3317
|
-
{
|
|
3318
|
-
"host_system_id": host[0].id,
|
|
3319
|
-
"devices": [network_interfaces],
|
|
3320
|
-
},
|
|
3321
|
-
{
|
|
3322
|
-
"host_system_id": host[1].id,
|
|
3323
|
-
"devices": [network_interfaces],
|
|
3324
|
-
},
|
|
3325
|
-
{
|
|
3326
|
-
"host_system_id": host[2].id,
|
|
3327
|
-
"devices": [network_interfaces],
|
|
3328
|
-
},
|
|
3329
|
-
])
|
|
3330
|
-
```
|
|
3331
|
-
|
|
3332
|
-
### Uplink name and count control
|
|
3333
|
-
|
|
3334
|
-
The following abridged example below demonstrates how you can manage the number
|
|
3335
|
-
of uplinks, and the name of the uplinks via the `uplinks` parameter.
|
|
3336
|
-
|
|
3337
|
-
Note that if you change the uplink naming and count after creating the VDS, you
|
|
3338
|
-
may need to explicitly specify `active_uplinks` and `standby_uplinks` as these
|
|
3339
|
-
values are saved to state after creation, regardless of being
|
|
3340
|
-
specified in config, and will drift if not modified, causing errors.
|
|
3341
|
-
|
|
3342
|
-
```python
|
|
3343
|
-
import pulumi
|
|
3344
|
-
import pulumi_vsphere as vsphere
|
|
3345
|
-
|
|
3346
|
-
vds = vsphere.DistributedVirtualSwitch("vds",
|
|
3347
|
-
name="vds-01",
|
|
3348
|
-
datacenter_id=datacenter["id"],
|
|
3349
|
-
uplinks=[
|
|
3350
|
-
"uplink1",
|
|
3351
|
-
"uplink2",
|
|
3352
|
-
],
|
|
3353
|
-
active_uplinks=["uplink1"],
|
|
3354
|
-
standby_uplinks=["uplink2"])
|
|
3355
|
-
```
|
|
3356
|
-
|
|
3357
|
-
> **NOTE:** The default uplink names when a VDS is created are `uplink1`
|
|
3358
|
-
through to `uplink4`, however this default is not guaranteed to be stable and
|
|
3359
|
-
you are encouraged to set your own.
|
|
3360
|
-
|
|
3361
|
-
## Import
|
|
3362
|
-
|
|
3363
|
-
An existing VDS can be imported into this resource via the path
|
|
3364
|
-
|
|
3365
|
-
to the VDS, via the following command:
|
|
3366
|
-
|
|
3367
|
-
```sh
|
|
3368
|
-
$ pulumi import vsphere:index/distributedVirtualSwitch:DistributedVirtualSwitch vds /dc-01/network/vds-01
|
|
3369
|
-
```
|
|
3370
|
-
|
|
3371
|
-
The above would import the VDS named `vds-01` that is located in the `dc-01`
|
|
3372
|
-
|
|
3373
|
-
datacenter.
|
|
3374
|
-
|
|
3242
|
+
Create a DistributedVirtualSwitch resource with the given unique name, props, and options.
|
|
3375
3243
|
:param str resource_name: The name of the resource.
|
|
3376
3244
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
3377
3245
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] active_uplinks: List of active uplinks used for load balancing, matching the names of the uplinks assigned in the DVS.
|
|
@@ -3497,134 +3365,7 @@ class DistributedVirtualSwitch(pulumi.CustomResource):
|
|
|
3497
3365
|
args: DistributedVirtualSwitchArgs,
|
|
3498
3366
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
3499
3367
|
"""
|
|
3500
|
-
|
|
3501
|
-
Distributed Switches (VDS).
|
|
3502
|
-
|
|
3503
|
-
An essential component of a distributed, scalable vSphere infrastructure, the
|
|
3504
|
-
VDS provides centralized management and monitoring of the networking
|
|
3505
|
-
configuration for all the hosts that are associated with the switch.
|
|
3506
|
-
In addition to adding distributed port groups
|
|
3507
|
-
(see the `DistributedPortGroup` resource)
|
|
3508
|
-
that can be used as networks for virtual machines, a VDS can be configured to
|
|
3509
|
-
perform advanced high availability, traffic shaping, network monitoring, etc.
|
|
3510
|
-
|
|
3511
|
-
For an overview on vSphere networking concepts, see
|
|
3512
|
-
[this page][ref-vsphere-net-concepts].
|
|
3513
|
-
|
|
3514
|
-
For more information on the VDS, see [this page][ref-vsphere-vds].
|
|
3515
|
-
|
|
3516
|
-
[ref-vsphere-net-concepts]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-2B11DBB8-CB3C-4AFF-8885-EFEA0FC562F4.html
|
|
3517
|
-
[ref-vsphere-vds]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-375B45C7-684C-4C51-BA3C-70E48DFABF04.html
|
|
3518
|
-
|
|
3519
|
-
> **NOTE:** This resource requires vCenter and is not available on
|
|
3520
|
-
direct ESXi host connections.
|
|
3521
|
-
|
|
3522
|
-
## Example Usage
|
|
3523
|
-
|
|
3524
|
-
The following example below demonstrates a "standard" example of configuring a
|
|
3525
|
-
VDS in a 3-node vSphere datacenter named `dc1`, across 4 NICs with two being
|
|
3526
|
-
used as active, and two being used as passive. Note that the NIC failover order
|
|
3527
|
-
propagates to any port groups configured on this VDS and can be overridden.
|
|
3528
|
-
|
|
3529
|
-
```python
|
|
3530
|
-
import pulumi
|
|
3531
|
-
import pulumi_vsphere as vsphere
|
|
3532
|
-
|
|
3533
|
-
config = pulumi.Config()
|
|
3534
|
-
hosts = config.get_object("hosts")
|
|
3535
|
-
if hosts is None:
|
|
3536
|
-
hosts = [
|
|
3537
|
-
"esxi-01.example.com",
|
|
3538
|
-
"esxi-02.example.com",
|
|
3539
|
-
"esxi-03.example.com",
|
|
3540
|
-
]
|
|
3541
|
-
network_interfaces = config.get_object("networkInterfaces")
|
|
3542
|
-
if network_interfaces is None:
|
|
3543
|
-
network_interfaces = [
|
|
3544
|
-
"vmnic0",
|
|
3545
|
-
"vmnic1",
|
|
3546
|
-
"vmnic2",
|
|
3547
|
-
"vmnic3",
|
|
3548
|
-
]
|
|
3549
|
-
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
3550
|
-
host = [vsphere.get_host(name=hosts[__index],
|
|
3551
|
-
datacenter_id=datacenter.id) for __index in range(len(hosts))]
|
|
3552
|
-
vds = vsphere.DistributedVirtualSwitch("vds",
|
|
3553
|
-
name="vds-01",
|
|
3554
|
-
datacenter_id=datacenter.id,
|
|
3555
|
-
uplinks=[
|
|
3556
|
-
"uplink1",
|
|
3557
|
-
"uplink2",
|
|
3558
|
-
"uplink3",
|
|
3559
|
-
"uplink4",
|
|
3560
|
-
],
|
|
3561
|
-
active_uplinks=[
|
|
3562
|
-
"uplink1",
|
|
3563
|
-
"uplink2",
|
|
3564
|
-
],
|
|
3565
|
-
standby_uplinks=[
|
|
3566
|
-
"uplink3",
|
|
3567
|
-
"uplink4",
|
|
3568
|
-
],
|
|
3569
|
-
hosts=[
|
|
3570
|
-
{
|
|
3571
|
-
"host_system_id": host[0].id,
|
|
3572
|
-
"devices": [network_interfaces],
|
|
3573
|
-
},
|
|
3574
|
-
{
|
|
3575
|
-
"host_system_id": host[1].id,
|
|
3576
|
-
"devices": [network_interfaces],
|
|
3577
|
-
},
|
|
3578
|
-
{
|
|
3579
|
-
"host_system_id": host[2].id,
|
|
3580
|
-
"devices": [network_interfaces],
|
|
3581
|
-
},
|
|
3582
|
-
])
|
|
3583
|
-
```
|
|
3584
|
-
|
|
3585
|
-
### Uplink name and count control
|
|
3586
|
-
|
|
3587
|
-
The following abridged example below demonstrates how you can manage the number
|
|
3588
|
-
of uplinks, and the name of the uplinks via the `uplinks` parameter.
|
|
3589
|
-
|
|
3590
|
-
Note that if you change the uplink naming and count after creating the VDS, you
|
|
3591
|
-
may need to explicitly specify `active_uplinks` and `standby_uplinks` as these
|
|
3592
|
-
values are saved to state after creation, regardless of being
|
|
3593
|
-
specified in config, and will drift if not modified, causing errors.
|
|
3594
|
-
|
|
3595
|
-
```python
|
|
3596
|
-
import pulumi
|
|
3597
|
-
import pulumi_vsphere as vsphere
|
|
3598
|
-
|
|
3599
|
-
vds = vsphere.DistributedVirtualSwitch("vds",
|
|
3600
|
-
name="vds-01",
|
|
3601
|
-
datacenter_id=datacenter["id"],
|
|
3602
|
-
uplinks=[
|
|
3603
|
-
"uplink1",
|
|
3604
|
-
"uplink2",
|
|
3605
|
-
],
|
|
3606
|
-
active_uplinks=["uplink1"],
|
|
3607
|
-
standby_uplinks=["uplink2"])
|
|
3608
|
-
```
|
|
3609
|
-
|
|
3610
|
-
> **NOTE:** The default uplink names when a VDS is created are `uplink1`
|
|
3611
|
-
through to `uplink4`, however this default is not guaranteed to be stable and
|
|
3612
|
-
you are encouraged to set your own.
|
|
3613
|
-
|
|
3614
|
-
## Import
|
|
3615
|
-
|
|
3616
|
-
An existing VDS can be imported into this resource via the path
|
|
3617
|
-
|
|
3618
|
-
to the VDS, via the following command:
|
|
3619
|
-
|
|
3620
|
-
```sh
|
|
3621
|
-
$ pulumi import vsphere:index/distributedVirtualSwitch:DistributedVirtualSwitch vds /dc-01/network/vds-01
|
|
3622
|
-
```
|
|
3623
|
-
|
|
3624
|
-
The above would import the VDS named `vds-01` that is located in the `dc-01`
|
|
3625
|
-
|
|
3626
|
-
datacenter.
|
|
3627
|
-
|
|
3368
|
+
Create a DistributedVirtualSwitch resource with the given unique name, props, and options.
|
|
3628
3369
|
:param str resource_name: The name of the resource.
|
|
3629
3370
|
:param DistributedVirtualSwitchArgs args: The arguments to use to populate this resource's properties.
|
|
3630
3371
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -4,14 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
-
import sys
|
|
8
7
|
import pulumi
|
|
9
8
|
import pulumi.runtime
|
|
10
9
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
-
if sys.version_info >= (3, 11):
|
|
12
|
-
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
-
else:
|
|
14
|
-
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
15
10
|
from . import _utilities
|
|
16
11
|
|
|
17
12
|
__all__ = ['DpmHostOverrideArgs', 'DpmHostOverride']
|
|
@@ -205,35 +200,7 @@ class DpmHostOverride(pulumi.CustomResource):
|
|
|
205
200
|
host_system_id: Optional[pulumi.Input[str]] = None,
|
|
206
201
|
__props__=None):
|
|
207
202
|
"""
|
|
208
|
-
|
|
209
|
-
cluster for a particular host. This allows you to control the power management
|
|
210
|
-
settings for individual hosts in the cluster while leaving any unspecified ones
|
|
211
|
-
at the default power management settings.
|
|
212
|
-
|
|
213
|
-
For more information on DPM within vSphere clusters, see [this
|
|
214
|
-
page][ref-vsphere-cluster-dpm].
|
|
215
|
-
|
|
216
|
-
[ref-vsphere-cluster-dpm]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-5E5E349A-4644-4C9C-B434-1C0243EBDC80.html
|
|
217
|
-
|
|
218
|
-
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
219
|
-
connections.
|
|
220
|
-
|
|
221
|
-
## Import
|
|
222
|
-
|
|
223
|
-
An existing override can be imported into this resource by
|
|
224
|
-
|
|
225
|
-
supplying both the path to the cluster, and the path to the host, to `terraform
|
|
226
|
-
|
|
227
|
-
import`. If no override exists, an error will be given. An example is below:
|
|
228
|
-
|
|
229
|
-
```sh
|
|
230
|
-
$ pulumi import vsphere:index/dpmHostOverride:DpmHostOverride dpm_host_override \\
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
'{"compute_cluster_path": "/dc1/host/cluster1", \\
|
|
234
|
-
|
|
235
|
-
"host_path": "/dc1/host/esxi1"}'
|
|
236
|
-
|
|
203
|
+
Create a DpmHostOverride resource with the given unique name, props, and options.
|
|
237
204
|
:param str resource_name: The name of the resource.
|
|
238
205
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
239
206
|
:param pulumi.Input[str] compute_cluster_id: The managed object reference
|
|
@@ -257,35 +224,7 @@ class DpmHostOverride(pulumi.CustomResource):
|
|
|
257
224
|
args: DpmHostOverrideArgs,
|
|
258
225
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
259
226
|
"""
|
|
260
|
-
|
|
261
|
-
cluster for a particular host. This allows you to control the power management
|
|
262
|
-
settings for individual hosts in the cluster while leaving any unspecified ones
|
|
263
|
-
at the default power management settings.
|
|
264
|
-
|
|
265
|
-
For more information on DPM within vSphere clusters, see [this
|
|
266
|
-
page][ref-vsphere-cluster-dpm].
|
|
267
|
-
|
|
268
|
-
[ref-vsphere-cluster-dpm]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-5E5E349A-4644-4C9C-B434-1C0243EBDC80.html
|
|
269
|
-
|
|
270
|
-
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
271
|
-
connections.
|
|
272
|
-
|
|
273
|
-
## Import
|
|
274
|
-
|
|
275
|
-
An existing override can be imported into this resource by
|
|
276
|
-
|
|
277
|
-
supplying both the path to the cluster, and the path to the host, to `terraform
|
|
278
|
-
|
|
279
|
-
import`. If no override exists, an error will be given. An example is below:
|
|
280
|
-
|
|
281
|
-
```sh
|
|
282
|
-
$ pulumi import vsphere:index/dpmHostOverride:DpmHostOverride dpm_host_override \\
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
'{"compute_cluster_path": "/dc1/host/cluster1", \\
|
|
286
|
-
|
|
287
|
-
"host_path": "/dc1/host/esxi1"}'
|
|
288
|
-
|
|
227
|
+
Create a DpmHostOverride resource with the given unique name, props, and options.
|
|
289
228
|
:param str resource_name: The name of the resource.
|
|
290
229
|
:param DpmHostOverrideArgs args: The arguments to use to populate this resource's properties.
|
|
291
230
|
:param pulumi.ResourceOptions opts: Options for the resource.
|