pulumi-vsphere 4.11.0__py3-none-any.whl → 4.11.0a1710920591__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/__init__.py +0 -28
- pulumi_vsphere/_inputs.py +236 -646
- pulumi_vsphere/_utilities.py +4 -40
- pulumi_vsphere/compute_cluster.py +1486 -756
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +34 -42
- pulumi_vsphere/content_library.py +10 -10
- pulumi_vsphere/datacenter.py +40 -33
- pulumi_vsphere/datastore_cluster.py +364 -154
- pulumi_vsphere/distributed_port_group.py +187 -131
- pulumi_vsphere/distributed_virtual_switch.py +828 -310
- pulumi_vsphere/entity_permissions.py +38 -59
- pulumi_vsphere/file.py +24 -16
- pulumi_vsphere/folder.py +28 -7
- pulumi_vsphere/get_compute_cluster.py +4 -0
- pulumi_vsphere/get_compute_cluster_host_group.py +20 -20
- pulumi_vsphere/get_content_library.py +10 -10
- pulumi_vsphere/get_content_library_item.py +8 -12
- pulumi_vsphere/get_custom_attribute.py +4 -0
- pulumi_vsphere/get_datacenter.py +4 -0
- pulumi_vsphere/get_datastore.py +16 -12
- pulumi_vsphere/get_datastore_cluster.py +4 -0
- pulumi_vsphere/get_datastore_stats.py +52 -46
- pulumi_vsphere/get_distributed_virtual_switch.py +4 -2
- pulumi_vsphere/get_dynamic.py +20 -18
- pulumi_vsphere/get_folder.py +6 -10
- pulumi_vsphere/get_guest_os_customization.py +47 -8
- pulumi_vsphere/get_host.py +4 -0
- pulumi_vsphere/get_host_pci_device.py +14 -8
- pulumi_vsphere/get_host_thumbprint.py +16 -12
- pulumi_vsphere/get_host_vgpu_profile.py +10 -4
- pulumi_vsphere/get_license.py +5 -2
- pulumi_vsphere/get_network.py +18 -14
- pulumi_vsphere/get_policy.py +4 -0
- pulumi_vsphere/get_resource_pool.py +18 -14
- pulumi_vsphere/get_role.py +8 -4
- pulumi_vsphere/get_tag.py +4 -0
- pulumi_vsphere/get_tag_category.py +4 -0
- pulumi_vsphere/get_vapp_container.py +4 -0
- pulumi_vsphere/get_virtual_machine.py +43 -60
- pulumi_vsphere/get_vmfs_disks.py +4 -0
- pulumi_vsphere/guest_os_customization.py +5 -55
- pulumi_vsphere/ha_vm_override.py +378 -189
- pulumi_vsphere/host.py +60 -49
- pulumi_vsphere/host_port_group.py +26 -14
- pulumi_vsphere/host_virtual_switch.py +287 -140
- pulumi_vsphere/license.py +32 -0
- pulumi_vsphere/nas_datastore.py +7 -7
- pulumi_vsphere/outputs.py +270 -672
- pulumi_vsphere/provider.py +6 -2
- pulumi_vsphere/pulumi-plugin.json +1 -2
- pulumi_vsphere/resource_pool.py +24 -50
- pulumi_vsphere/virtual_disk.py +34 -42
- pulumi_vsphere/virtual_machine.py +827 -598
- pulumi_vsphere/virtual_machine_snapshot.py +12 -8
- pulumi_vsphere/vm_storage_policy.py +127 -115
- pulumi_vsphere/vnic.py +105 -89
- {pulumi_vsphere-4.11.0.dist-info → pulumi_vsphere-4.11.0a1710920591.dist-info}/METADATA +1 -1
- pulumi_vsphere-4.11.0a1710920591.dist-info/RECORD +82 -0
- {pulumi_vsphere-4.11.0.dist-info → pulumi_vsphere-4.11.0a1710920591.dist-info}/WHEEL +1 -1
- pulumi_vsphere/get_host_base_images.py +0 -97
- pulumi_vsphere/offline_software_depot.py +0 -180
- pulumi_vsphere/supervisor.py +0 -962
- pulumi_vsphere/virtual_machine_class.py +0 -442
- pulumi_vsphere-4.11.0.dist-info/RECORD +0 -86
- {pulumi_vsphere-4.11.0.dist-info → pulumi_vsphere-4.11.0a1710920591.dist-info}/top_level.txt +0 -0
pulumi_vsphere/host.py
CHANGED
|
@@ -8,8 +8,6 @@ import pulumi
|
|
|
8
8
|
import pulumi.runtime
|
|
9
9
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
10
10
|
from . import _utilities
|
|
11
|
-
from . import outputs
|
|
12
|
-
from ._inputs import *
|
|
13
11
|
|
|
14
12
|
__all__ = ['HostArgs', 'Host']
|
|
15
13
|
|
|
@@ -28,7 +26,6 @@ class HostArgs:
|
|
|
28
26
|
license: Optional[pulumi.Input[str]] = None,
|
|
29
27
|
lockdown: Optional[pulumi.Input[str]] = None,
|
|
30
28
|
maintenance: Optional[pulumi.Input[bool]] = None,
|
|
31
|
-
services: Optional[pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]]] = None,
|
|
32
29
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
33
30
|
thumbprint: Optional[pulumi.Input[str]] = None):
|
|
34
31
|
"""
|
|
@@ -66,7 +63,6 @@ class HostArgs:
|
|
|
66
63
|
`disabled`, `normal`, and `strict`. Default is `disabled`.
|
|
67
64
|
:param pulumi.Input[bool] maintenance: Set the management state of the host.
|
|
68
65
|
Default is `false`.
|
|
69
|
-
:param pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]] services: Set Services on host, the settings to be set are based on service being set as part of import.
|
|
70
66
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource. Please
|
|
71
67
|
refer to the `Tag` resource for more information on applying
|
|
72
68
|
tags to resources.
|
|
@@ -99,8 +95,6 @@ class HostArgs:
|
|
|
99
95
|
pulumi.set(__self__, "lockdown", lockdown)
|
|
100
96
|
if maintenance is not None:
|
|
101
97
|
pulumi.set(__self__, "maintenance", maintenance)
|
|
102
|
-
if services is not None:
|
|
103
|
-
pulumi.set(__self__, "services", services)
|
|
104
98
|
if tags is not None:
|
|
105
99
|
pulumi.set(__self__, "tags", tags)
|
|
106
100
|
if thumbprint is not None:
|
|
@@ -271,18 +265,6 @@ class HostArgs:
|
|
|
271
265
|
def maintenance(self, value: Optional[pulumi.Input[bool]]):
|
|
272
266
|
pulumi.set(self, "maintenance", value)
|
|
273
267
|
|
|
274
|
-
@property
|
|
275
|
-
@pulumi.getter
|
|
276
|
-
def services(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]]]:
|
|
277
|
-
"""
|
|
278
|
-
Set Services on host, the settings to be set are based on service being set as part of import.
|
|
279
|
-
"""
|
|
280
|
-
return pulumi.get(self, "services")
|
|
281
|
-
|
|
282
|
-
@services.setter
|
|
283
|
-
def services(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]]]):
|
|
284
|
-
pulumi.set(self, "services", value)
|
|
285
|
-
|
|
286
268
|
@property
|
|
287
269
|
@pulumi.getter
|
|
288
270
|
def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
|
@@ -330,7 +312,6 @@ class _HostState:
|
|
|
330
312
|
lockdown: Optional[pulumi.Input[str]] = None,
|
|
331
313
|
maintenance: Optional[pulumi.Input[bool]] = None,
|
|
332
314
|
password: Optional[pulumi.Input[str]] = None,
|
|
333
|
-
services: Optional[pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]]] = None,
|
|
334
315
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
335
316
|
thumbprint: Optional[pulumi.Input[str]] = None,
|
|
336
317
|
username: Optional[pulumi.Input[str]] = None):
|
|
@@ -367,7 +348,6 @@ class _HostState:
|
|
|
367
348
|
Default is `false`.
|
|
368
349
|
:param pulumi.Input[str] password: Password that will be used by vSphere to authenticate
|
|
369
350
|
to the host.
|
|
370
|
-
:param pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]] services: Set Services on host, the settings to be set are based on service being set as part of import.
|
|
371
351
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource. Please
|
|
372
352
|
refer to the `Tag` resource for more information on applying
|
|
373
353
|
tags to resources.
|
|
@@ -403,8 +383,6 @@ class _HostState:
|
|
|
403
383
|
pulumi.set(__self__, "maintenance", maintenance)
|
|
404
384
|
if password is not None:
|
|
405
385
|
pulumi.set(__self__, "password", password)
|
|
406
|
-
if services is not None:
|
|
407
|
-
pulumi.set(__self__, "services", services)
|
|
408
386
|
if tags is not None:
|
|
409
387
|
pulumi.set(__self__, "tags", tags)
|
|
410
388
|
if thumbprint is not None:
|
|
@@ -564,18 +542,6 @@ class _HostState:
|
|
|
564
542
|
def password(self, value: Optional[pulumi.Input[str]]):
|
|
565
543
|
pulumi.set(self, "password", value)
|
|
566
544
|
|
|
567
|
-
@property
|
|
568
|
-
@pulumi.getter
|
|
569
|
-
def services(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]]]:
|
|
570
|
-
"""
|
|
571
|
-
Set Services on host, the settings to be set are based on service being set as part of import.
|
|
572
|
-
"""
|
|
573
|
-
return pulumi.get(self, "services")
|
|
574
|
-
|
|
575
|
-
@services.setter
|
|
576
|
-
def services(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]]]):
|
|
577
|
-
pulumi.set(self, "services", value)
|
|
578
|
-
|
|
579
545
|
@property
|
|
580
546
|
@pulumi.getter
|
|
581
547
|
def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
|
@@ -638,7 +604,6 @@ class Host(pulumi.CustomResource):
|
|
|
638
604
|
lockdown: Optional[pulumi.Input[str]] = None,
|
|
639
605
|
maintenance: Optional[pulumi.Input[bool]] = None,
|
|
640
606
|
password: Optional[pulumi.Input[str]] = None,
|
|
641
|
-
services: Optional[pulumi.Input[Sequence[pulumi.Input[Union['HostServiceArgs', 'HostServiceArgsDict']]]]] = None,
|
|
642
607
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
643
608
|
thumbprint: Optional[pulumi.Input[str]] = None,
|
|
644
609
|
username: Optional[pulumi.Input[str]] = None,
|
|
@@ -651,6 +616,7 @@ class Host(pulumi.CustomResource):
|
|
|
651
616
|
|
|
652
617
|
### Create a standalone host
|
|
653
618
|
|
|
619
|
+
<!--Start PulumiCodeChooser -->
|
|
654
620
|
```python
|
|
655
621
|
import pulumi
|
|
656
622
|
import pulumi_vsphere as vsphere
|
|
@@ -666,6 +632,29 @@ class Host(pulumi.CustomResource):
|
|
|
666
632
|
thumbprint=thumbprint.id,
|
|
667
633
|
datacenter=datacenter.id)
|
|
668
634
|
```
|
|
635
|
+
<!--End PulumiCodeChooser -->
|
|
636
|
+
|
|
637
|
+
### Create host in a compute cluster
|
|
638
|
+
|
|
639
|
+
<!--Start PulumiCodeChooser -->
|
|
640
|
+
```python
|
|
641
|
+
import pulumi
|
|
642
|
+
import pulumi_vsphere as vsphere
|
|
643
|
+
|
|
644
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
645
|
+
cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
646
|
+
datacenter_id=datacenter.id)
|
|
647
|
+
thumbprint = vsphere.get_host_thumbprint(address="esx-01.example.com",
|
|
648
|
+
insecure=True)
|
|
649
|
+
esx_01 = vsphere.Host("esx-01",
|
|
650
|
+
hostname="esx-01.example.com",
|
|
651
|
+
username="root",
|
|
652
|
+
password="password",
|
|
653
|
+
license="00000-00000-00000-00000-00000",
|
|
654
|
+
thumbprint=thumbprint.id,
|
|
655
|
+
cluster=cluster.id)
|
|
656
|
+
```
|
|
657
|
+
<!--End PulumiCodeChooser -->
|
|
669
658
|
|
|
670
659
|
## Importing
|
|
671
660
|
|
|
@@ -674,6 +663,12 @@ class Host(pulumi.CustomResource):
|
|
|
674
663
|
|
|
675
664
|
[docs-import]: /docs/import/index.html
|
|
676
665
|
|
|
666
|
+
<!--Start PulumiCodeChooser -->
|
|
667
|
+
```python
|
|
668
|
+
import pulumi
|
|
669
|
+
```
|
|
670
|
+
<!--End PulumiCodeChooser -->
|
|
671
|
+
|
|
677
672
|
The above would import the host with ID `host-123`.
|
|
678
673
|
|
|
679
674
|
:param str resource_name: The name of the resource.
|
|
@@ -709,7 +704,6 @@ class Host(pulumi.CustomResource):
|
|
|
709
704
|
Default is `false`.
|
|
710
705
|
:param pulumi.Input[str] password: Password that will be used by vSphere to authenticate
|
|
711
706
|
to the host.
|
|
712
|
-
:param pulumi.Input[Sequence[pulumi.Input[Union['HostServiceArgs', 'HostServiceArgsDict']]]] services: Set Services on host, the settings to be set are based on service being set as part of import.
|
|
713
707
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource. Please
|
|
714
708
|
refer to the `Tag` resource for more information on applying
|
|
715
709
|
tags to resources.
|
|
@@ -737,6 +731,7 @@ class Host(pulumi.CustomResource):
|
|
|
737
731
|
|
|
738
732
|
### Create a standalone host
|
|
739
733
|
|
|
734
|
+
<!--Start PulumiCodeChooser -->
|
|
740
735
|
```python
|
|
741
736
|
import pulumi
|
|
742
737
|
import pulumi_vsphere as vsphere
|
|
@@ -752,6 +747,29 @@ class Host(pulumi.CustomResource):
|
|
|
752
747
|
thumbprint=thumbprint.id,
|
|
753
748
|
datacenter=datacenter.id)
|
|
754
749
|
```
|
|
750
|
+
<!--End PulumiCodeChooser -->
|
|
751
|
+
|
|
752
|
+
### Create host in a compute cluster
|
|
753
|
+
|
|
754
|
+
<!--Start PulumiCodeChooser -->
|
|
755
|
+
```python
|
|
756
|
+
import pulumi
|
|
757
|
+
import pulumi_vsphere as vsphere
|
|
758
|
+
|
|
759
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
760
|
+
cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
761
|
+
datacenter_id=datacenter.id)
|
|
762
|
+
thumbprint = vsphere.get_host_thumbprint(address="esx-01.example.com",
|
|
763
|
+
insecure=True)
|
|
764
|
+
esx_01 = vsphere.Host("esx-01",
|
|
765
|
+
hostname="esx-01.example.com",
|
|
766
|
+
username="root",
|
|
767
|
+
password="password",
|
|
768
|
+
license="00000-00000-00000-00000-00000",
|
|
769
|
+
thumbprint=thumbprint.id,
|
|
770
|
+
cluster=cluster.id)
|
|
771
|
+
```
|
|
772
|
+
<!--End PulumiCodeChooser -->
|
|
755
773
|
|
|
756
774
|
## Importing
|
|
757
775
|
|
|
@@ -760,6 +778,12 @@ class Host(pulumi.CustomResource):
|
|
|
760
778
|
|
|
761
779
|
[docs-import]: /docs/import/index.html
|
|
762
780
|
|
|
781
|
+
<!--Start PulumiCodeChooser -->
|
|
782
|
+
```python
|
|
783
|
+
import pulumi
|
|
784
|
+
```
|
|
785
|
+
<!--End PulumiCodeChooser -->
|
|
786
|
+
|
|
763
787
|
The above would import the host with ID `host-123`.
|
|
764
788
|
|
|
765
789
|
:param str resource_name: The name of the resource.
|
|
@@ -788,7 +812,6 @@ class Host(pulumi.CustomResource):
|
|
|
788
812
|
lockdown: Optional[pulumi.Input[str]] = None,
|
|
789
813
|
maintenance: Optional[pulumi.Input[bool]] = None,
|
|
790
814
|
password: Optional[pulumi.Input[str]] = None,
|
|
791
|
-
services: Optional[pulumi.Input[Sequence[pulumi.Input[Union['HostServiceArgs', 'HostServiceArgsDict']]]]] = None,
|
|
792
815
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
793
816
|
thumbprint: Optional[pulumi.Input[str]] = None,
|
|
794
817
|
username: Optional[pulumi.Input[str]] = None,
|
|
@@ -816,7 +839,6 @@ class Host(pulumi.CustomResource):
|
|
|
816
839
|
if password is None and not opts.urn:
|
|
817
840
|
raise TypeError("Missing required property 'password'")
|
|
818
841
|
__props__.__dict__["password"] = None if password is None else pulumi.Output.secret(password)
|
|
819
|
-
__props__.__dict__["services"] = services
|
|
820
842
|
__props__.__dict__["tags"] = tags
|
|
821
843
|
__props__.__dict__["thumbprint"] = thumbprint
|
|
822
844
|
if username is None and not opts.urn:
|
|
@@ -845,7 +867,6 @@ class Host(pulumi.CustomResource):
|
|
|
845
867
|
lockdown: Optional[pulumi.Input[str]] = None,
|
|
846
868
|
maintenance: Optional[pulumi.Input[bool]] = None,
|
|
847
869
|
password: Optional[pulumi.Input[str]] = None,
|
|
848
|
-
services: Optional[pulumi.Input[Sequence[pulumi.Input[Union['HostServiceArgs', 'HostServiceArgsDict']]]]] = None,
|
|
849
870
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
850
871
|
thumbprint: Optional[pulumi.Input[str]] = None,
|
|
851
872
|
username: Optional[pulumi.Input[str]] = None) -> 'Host':
|
|
@@ -887,7 +908,6 @@ class Host(pulumi.CustomResource):
|
|
|
887
908
|
Default is `false`.
|
|
888
909
|
:param pulumi.Input[str] password: Password that will be used by vSphere to authenticate
|
|
889
910
|
to the host.
|
|
890
|
-
:param pulumi.Input[Sequence[pulumi.Input[Union['HostServiceArgs', 'HostServiceArgsDict']]]] services: Set Services on host, the settings to be set are based on service being set as part of import.
|
|
891
911
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource. Please
|
|
892
912
|
refer to the `Tag` resource for more information on applying
|
|
893
913
|
tags to resources.
|
|
@@ -916,7 +936,6 @@ class Host(pulumi.CustomResource):
|
|
|
916
936
|
__props__.__dict__["lockdown"] = lockdown
|
|
917
937
|
__props__.__dict__["maintenance"] = maintenance
|
|
918
938
|
__props__.__dict__["password"] = password
|
|
919
|
-
__props__.__dict__["services"] = services
|
|
920
939
|
__props__.__dict__["tags"] = tags
|
|
921
940
|
__props__.__dict__["thumbprint"] = thumbprint
|
|
922
941
|
__props__.__dict__["username"] = username
|
|
@@ -1030,14 +1049,6 @@ class Host(pulumi.CustomResource):
|
|
|
1030
1049
|
"""
|
|
1031
1050
|
return pulumi.get(self, "password")
|
|
1032
1051
|
|
|
1033
|
-
@property
|
|
1034
|
-
@pulumi.getter
|
|
1035
|
-
def services(self) -> pulumi.Output[Optional[Sequence['outputs.HostService']]]:
|
|
1036
|
-
"""
|
|
1037
|
-
Set Services on host, the settings to be set are based on service being set as part of import.
|
|
1038
|
-
"""
|
|
1039
|
-
return pulumi.get(self, "services")
|
|
1040
|
-
|
|
1041
1052
|
@property
|
|
1042
1053
|
@pulumi.getter
|
|
1043
1054
|
def tags(self) -> pulumi.Output[Optional[Sequence[str]]]:
|
|
@@ -696,6 +696,7 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
696
696
|
|
|
697
697
|
**Create a Virtual Switch and Bind a Port Group:**
|
|
698
698
|
|
|
699
|
+
<!--Start PulumiCodeChooser -->
|
|
699
700
|
```python
|
|
700
701
|
import pulumi
|
|
701
702
|
import pulumi_vsphere as vsphere
|
|
@@ -703,8 +704,7 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
703
704
|
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
704
705
|
host = vsphere.get_host(name="esxi-01.example.com",
|
|
705
706
|
datacenter_id=datacenter.id)
|
|
706
|
-
host_virtual_switch = vsphere.HostVirtualSwitch("
|
|
707
|
-
name="switch-01",
|
|
707
|
+
host_virtual_switch = vsphere.HostVirtualSwitch("hostVirtualSwitch",
|
|
708
708
|
host_system_id=host.id,
|
|
709
709
|
network_adapters=[
|
|
710
710
|
"vmnic0",
|
|
@@ -713,10 +713,10 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
713
713
|
active_nics=["vmnic0"],
|
|
714
714
|
standby_nics=["vmnic1"])
|
|
715
715
|
pg = vsphere.HostPortGroup("pg",
|
|
716
|
-
name="portgroup-01",
|
|
717
716
|
host_system_id=host.id,
|
|
718
717
|
virtual_switch_name=host_virtual_switch.name)
|
|
719
718
|
```
|
|
719
|
+
<!--End PulumiCodeChooser -->
|
|
720
720
|
|
|
721
721
|
**Create a Port Group with a VLAN and ab Override:**
|
|
722
722
|
|
|
@@ -726,6 +726,7 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
726
726
|
to ensure that all traffic is seen on the port. The setting overrides
|
|
727
727
|
the implicit default of `false` set on the standard switch.
|
|
728
728
|
|
|
729
|
+
<!--Start PulumiCodeChooser -->
|
|
729
730
|
```python
|
|
730
731
|
import pulumi
|
|
731
732
|
import pulumi_vsphere as vsphere
|
|
@@ -733,8 +734,7 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
733
734
|
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
734
735
|
host = vsphere.get_host(name="esxi-01.example.com",
|
|
735
736
|
datacenter_id=datacenter.id)
|
|
736
|
-
host_virtual_switch = vsphere.HostVirtualSwitch("
|
|
737
|
-
name="switch-01",
|
|
737
|
+
host_virtual_switch = vsphere.HostVirtualSwitch("hostVirtualSwitch",
|
|
738
738
|
host_system_id=host.id,
|
|
739
739
|
network_adapters=[
|
|
740
740
|
"vmnic0",
|
|
@@ -743,18 +743,24 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
743
743
|
active_nics=["vmnic0"],
|
|
744
744
|
standby_nics=["vmnic1"])
|
|
745
745
|
pg = vsphere.HostPortGroup("pg",
|
|
746
|
-
name="portgroup-01",
|
|
747
746
|
host_system_id=host.id,
|
|
748
747
|
virtual_switch_name=host_virtual_switch.name,
|
|
749
748
|
vlan_id=4095,
|
|
750
749
|
allow_promiscuous=True)
|
|
751
750
|
```
|
|
751
|
+
<!--End PulumiCodeChooser -->
|
|
752
752
|
|
|
753
753
|
## Importing
|
|
754
754
|
|
|
755
755
|
An existing host port group can be imported into this resource
|
|
756
756
|
using the host port group's ID. An example is below:
|
|
757
757
|
|
|
758
|
+
<!--Start PulumiCodeChooser -->
|
|
759
|
+
```python
|
|
760
|
+
import pulumi
|
|
761
|
+
```
|
|
762
|
+
<!--End PulumiCodeChooser -->
|
|
763
|
+
|
|
758
764
|
The above would import the `management` host port group from host with ID `host-123`.
|
|
759
765
|
|
|
760
766
|
:param str resource_name: The name of the resource.
|
|
@@ -806,6 +812,7 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
806
812
|
|
|
807
813
|
**Create a Virtual Switch and Bind a Port Group:**
|
|
808
814
|
|
|
815
|
+
<!--Start PulumiCodeChooser -->
|
|
809
816
|
```python
|
|
810
817
|
import pulumi
|
|
811
818
|
import pulumi_vsphere as vsphere
|
|
@@ -813,8 +820,7 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
813
820
|
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
814
821
|
host = vsphere.get_host(name="esxi-01.example.com",
|
|
815
822
|
datacenter_id=datacenter.id)
|
|
816
|
-
host_virtual_switch = vsphere.HostVirtualSwitch("
|
|
817
|
-
name="switch-01",
|
|
823
|
+
host_virtual_switch = vsphere.HostVirtualSwitch("hostVirtualSwitch",
|
|
818
824
|
host_system_id=host.id,
|
|
819
825
|
network_adapters=[
|
|
820
826
|
"vmnic0",
|
|
@@ -823,10 +829,10 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
823
829
|
active_nics=["vmnic0"],
|
|
824
830
|
standby_nics=["vmnic1"])
|
|
825
831
|
pg = vsphere.HostPortGroup("pg",
|
|
826
|
-
name="portgroup-01",
|
|
827
832
|
host_system_id=host.id,
|
|
828
833
|
virtual_switch_name=host_virtual_switch.name)
|
|
829
834
|
```
|
|
835
|
+
<!--End PulumiCodeChooser -->
|
|
830
836
|
|
|
831
837
|
**Create a Port Group with a VLAN and ab Override:**
|
|
832
838
|
|
|
@@ -836,6 +842,7 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
836
842
|
to ensure that all traffic is seen on the port. The setting overrides
|
|
837
843
|
the implicit default of `false` set on the standard switch.
|
|
838
844
|
|
|
845
|
+
<!--Start PulumiCodeChooser -->
|
|
839
846
|
```python
|
|
840
847
|
import pulumi
|
|
841
848
|
import pulumi_vsphere as vsphere
|
|
@@ -843,8 +850,7 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
843
850
|
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
844
851
|
host = vsphere.get_host(name="esxi-01.example.com",
|
|
845
852
|
datacenter_id=datacenter.id)
|
|
846
|
-
host_virtual_switch = vsphere.HostVirtualSwitch("
|
|
847
|
-
name="switch-01",
|
|
853
|
+
host_virtual_switch = vsphere.HostVirtualSwitch("hostVirtualSwitch",
|
|
848
854
|
host_system_id=host.id,
|
|
849
855
|
network_adapters=[
|
|
850
856
|
"vmnic0",
|
|
@@ -853,18 +859,24 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
853
859
|
active_nics=["vmnic0"],
|
|
854
860
|
standby_nics=["vmnic1"])
|
|
855
861
|
pg = vsphere.HostPortGroup("pg",
|
|
856
|
-
name="portgroup-01",
|
|
857
862
|
host_system_id=host.id,
|
|
858
863
|
virtual_switch_name=host_virtual_switch.name,
|
|
859
864
|
vlan_id=4095,
|
|
860
865
|
allow_promiscuous=True)
|
|
861
866
|
```
|
|
867
|
+
<!--End PulumiCodeChooser -->
|
|
862
868
|
|
|
863
869
|
## Importing
|
|
864
870
|
|
|
865
871
|
An existing host port group can be imported into this resource
|
|
866
872
|
using the host port group's ID. An example is below:
|
|
867
873
|
|
|
874
|
+
<!--Start PulumiCodeChooser -->
|
|
875
|
+
```python
|
|
876
|
+
import pulumi
|
|
877
|
+
```
|
|
878
|
+
<!--End PulumiCodeChooser -->
|
|
879
|
+
|
|
868
880
|
The above would import the `management` host port group from host with ID `host-123`.
|
|
869
881
|
|
|
870
882
|
:param str resource_name: The name of the resource.
|
|
@@ -953,7 +965,7 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
953
965
|
key: Optional[pulumi.Input[str]] = None,
|
|
954
966
|
name: Optional[pulumi.Input[str]] = None,
|
|
955
967
|
notify_switches: Optional[pulumi.Input[bool]] = None,
|
|
956
|
-
ports: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
968
|
+
ports: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['HostPortGroupPortArgs']]]]] = None,
|
|
957
969
|
shaping_average_bandwidth: Optional[pulumi.Input[int]] = None,
|
|
958
970
|
shaping_burst_size: Optional[pulumi.Input[int]] = None,
|
|
959
971
|
shaping_enabled: Optional[pulumi.Input[bool]] = None,
|
|
@@ -986,7 +998,7 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
986
998
|
:param pulumi.Input[str] name: The name of the port group. Forces a new resource if
|
|
987
999
|
changed.
|
|
988
1000
|
:param pulumi.Input[bool] notify_switches: If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
|
|
989
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
|
1001
|
+
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['HostPortGroupPortArgs']]]] ports: A list of ports that currently exist and are used on this port group.
|
|
990
1002
|
:param pulumi.Input[int] shaping_average_bandwidth: The average bandwidth in bits per second if traffic shaping is enabled.
|
|
991
1003
|
:param pulumi.Input[int] shaping_burst_size: The maximum burst size allowed in bytes if traffic shaping is enabled.
|
|
992
1004
|
:param pulumi.Input[bool] shaping_enabled: Enable traffic shaping on this virtual switch or port group.
|