pulumi-vsphere 4.10.0a1710245029__py3-none-any.whl → 4.13.0a1736836157__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.

Files changed (85) hide show
  1. pulumi_vsphere/__init__.py +28 -0
  2. pulumi_vsphere/_inputs.py +1816 -277
  3. pulumi_vsphere/_utilities.py +41 -5
  4. pulumi_vsphere/compute_cluster.py +937 -1488
  5. pulumi_vsphere/compute_cluster_host_group.py +67 -2
  6. pulumi_vsphere/compute_cluster_vm_affinity_rule.py +69 -34
  7. pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +41 -2
  8. pulumi_vsphere/compute_cluster_vm_dependency_rule.py +205 -2
  9. pulumi_vsphere/compute_cluster_vm_group.py +198 -2
  10. pulumi_vsphere/compute_cluster_vm_host_rule.py +73 -2
  11. pulumi_vsphere/config/__init__.pyi +5 -0
  12. pulumi_vsphere/config/vars.py +5 -0
  13. pulumi_vsphere/content_library.py +113 -12
  14. pulumi_vsphere/content_library_item.py +143 -2
  15. pulumi_vsphere/custom_attribute.py +77 -2
  16. pulumi_vsphere/datacenter.py +48 -40
  17. pulumi_vsphere/datastore_cluster.py +217 -366
  18. pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +159 -2
  19. pulumi_vsphere/distributed_port_group.py +416 -189
  20. pulumi_vsphere/distributed_virtual_switch.py +571 -830
  21. pulumi_vsphere/dpm_host_override.py +63 -2
  22. pulumi_vsphere/drs_vm_override.py +67 -2
  23. pulumi_vsphere/entity_permissions.py +64 -38
  24. pulumi_vsphere/file.py +21 -24
  25. pulumi_vsphere/folder.py +148 -30
  26. pulumi_vsphere/get_compute_cluster.py +16 -9
  27. pulumi_vsphere/get_compute_cluster_host_group.py +36 -25
  28. pulumi_vsphere/get_content_library.py +23 -15
  29. pulumi_vsphere/get_content_library_item.py +29 -13
  30. pulumi_vsphere/get_custom_attribute.py +14 -9
  31. pulumi_vsphere/get_datacenter.py +30 -12
  32. pulumi_vsphere/get_datastore.py +29 -21
  33. pulumi_vsphere/get_datastore_cluster.py +31 -10
  34. pulumi_vsphere/get_datastore_stats.py +63 -57
  35. pulumi_vsphere/get_distributed_virtual_switch.py +18 -9
  36. pulumi_vsphere/get_dynamic.py +35 -25
  37. pulumi_vsphere/get_folder.py +23 -11
  38. pulumi_vsphere/get_guest_os_customization.py +26 -52
  39. pulumi_vsphere/get_host.py +16 -9
  40. pulumi_vsphere/get_host_base_images.py +104 -0
  41. pulumi_vsphere/get_host_pci_device.py +28 -19
  42. pulumi_vsphere/get_host_thumbprint.py +41 -25
  43. pulumi_vsphere/get_host_vgpu_profile.py +20 -15
  44. pulumi_vsphere/get_license.py +20 -10
  45. pulumi_vsphere/get_network.py +80 -24
  46. pulumi_vsphere/get_ovf_vm_template.py +56 -5
  47. pulumi_vsphere/get_policy.py +13 -9
  48. pulumi_vsphere/get_resource_pool.py +29 -23
  49. pulumi_vsphere/get_role.py +23 -13
  50. pulumi_vsphere/get_tag.py +16 -9
  51. pulumi_vsphere/get_tag_category.py +16 -9
  52. pulumi_vsphere/get_vapp_container.py +15 -9
  53. pulumi_vsphere/get_virtual_machine.py +205 -48
  54. pulumi_vsphere/get_vmfs_disks.py +18 -9
  55. pulumi_vsphere/guest_os_customization.py +60 -5
  56. pulumi_vsphere/ha_vm_override.py +352 -380
  57. pulumi_vsphere/host.py +244 -64
  58. pulumi_vsphere/host_port_group.py +27 -24
  59. pulumi_vsphere/host_virtual_switch.py +209 -289
  60. pulumi_vsphere/license.py +5 -32
  61. pulumi_vsphere/nas_datastore.py +74 -9
  62. pulumi_vsphere/offline_software_depot.py +185 -0
  63. pulumi_vsphere/outputs.py +717 -270
  64. pulumi_vsphere/provider.py +7 -6
  65. pulumi_vsphere/pulumi-plugin.json +2 -1
  66. pulumi_vsphere/resource_pool.py +168 -411
  67. pulumi_vsphere/role.py +33 -2
  68. pulumi_vsphere/storage_drs_vm_override.py +133 -2
  69. pulumi_vsphere/supervisor.py +967 -0
  70. pulumi_vsphere/tag.py +159 -2
  71. pulumi_vsphere/tag_category.py +83 -2
  72. pulumi_vsphere/vapp_container.py +163 -2
  73. pulumi_vsphere/vapp_entity.py +147 -2
  74. pulumi_vsphere/virtual_disk.py +123 -36
  75. pulumi_vsphere/virtual_machine.py +698 -829
  76. pulumi_vsphere/virtual_machine_class.py +447 -0
  77. pulumi_vsphere/virtual_machine_snapshot.py +13 -12
  78. pulumi_vsphere/vm_storage_policy.py +120 -127
  79. pulumi_vsphere/vmfs_datastore.py +271 -2
  80. pulumi_vsphere/vnic.py +104 -105
  81. {pulumi_vsphere-4.10.0a1710245029.dist-info → pulumi_vsphere-4.13.0a1736836157.dist-info}/METADATA +7 -6
  82. pulumi_vsphere-4.13.0a1736836157.dist-info/RECORD +86 -0
  83. {pulumi_vsphere-4.10.0a1710245029.dist-info → pulumi_vsphere-4.13.0a1736836157.dist-info}/WHEEL +1 -1
  84. pulumi_vsphere-4.10.0a1710245029.dist-info/RECORD +0 -82
  85. {pulumi_vsphere-4.10.0a1710245029.dist-info → pulumi_vsphere-4.13.0a1736836157.dist-info}/top_level.txt +0 -0
pulumi_vsphere/host.py CHANGED
@@ -4,10 +4,17 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  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
10
15
  from . import _utilities
16
+ from . import outputs
17
+ from ._inputs import *
11
18
 
12
19
  __all__ = ['HostArgs', 'Host']
13
20
 
@@ -26,6 +33,7 @@ class HostArgs:
26
33
  license: Optional[pulumi.Input[str]] = None,
27
34
  lockdown: Optional[pulumi.Input[str]] = None,
28
35
  maintenance: Optional[pulumi.Input[bool]] = None,
36
+ services: Optional[pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]]] = None,
29
37
  tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
30
38
  thumbprint: Optional[pulumi.Input[str]] = None):
31
39
  """
@@ -63,6 +71,7 @@ class HostArgs:
63
71
  `disabled`, `normal`, and `strict`. Default is `disabled`.
64
72
  :param pulumi.Input[bool] maintenance: Set the management state of the host.
65
73
  Default is `false`.
74
+ :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.
66
75
  :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource. Please
67
76
  refer to the `Tag` resource for more information on applying
68
77
  tags to resources.
@@ -95,6 +104,8 @@ class HostArgs:
95
104
  pulumi.set(__self__, "lockdown", lockdown)
96
105
  if maintenance is not None:
97
106
  pulumi.set(__self__, "maintenance", maintenance)
107
+ if services is not None:
108
+ pulumi.set(__self__, "services", services)
98
109
  if tags is not None:
99
110
  pulumi.set(__self__, "tags", tags)
100
111
  if thumbprint is not None:
@@ -265,6 +276,18 @@ class HostArgs:
265
276
  def maintenance(self, value: Optional[pulumi.Input[bool]]):
266
277
  pulumi.set(self, "maintenance", value)
267
278
 
279
+ @property
280
+ @pulumi.getter
281
+ def services(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]]]:
282
+ """
283
+ Set Services on host, the settings to be set are based on service being set as part of import.
284
+ """
285
+ return pulumi.get(self, "services")
286
+
287
+ @services.setter
288
+ def services(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]]]):
289
+ pulumi.set(self, "services", value)
290
+
268
291
  @property
269
292
  @pulumi.getter
270
293
  def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
@@ -312,6 +335,7 @@ class _HostState:
312
335
  lockdown: Optional[pulumi.Input[str]] = None,
313
336
  maintenance: Optional[pulumi.Input[bool]] = None,
314
337
  password: Optional[pulumi.Input[str]] = None,
338
+ services: Optional[pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]]] = None,
315
339
  tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
316
340
  thumbprint: Optional[pulumi.Input[str]] = None,
317
341
  username: Optional[pulumi.Input[str]] = None):
@@ -348,6 +372,7 @@ class _HostState:
348
372
  Default is `false`.
349
373
  :param pulumi.Input[str] password: Password that will be used by vSphere to authenticate
350
374
  to the host.
375
+ :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.
351
376
  :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource. Please
352
377
  refer to the `Tag` resource for more information on applying
353
378
  tags to resources.
@@ -383,6 +408,8 @@ class _HostState:
383
408
  pulumi.set(__self__, "maintenance", maintenance)
384
409
  if password is not None:
385
410
  pulumi.set(__self__, "password", password)
411
+ if services is not None:
412
+ pulumi.set(__self__, "services", services)
386
413
  if tags is not None:
387
414
  pulumi.set(__self__, "tags", tags)
388
415
  if thumbprint is not None:
@@ -542,6 +569,18 @@ class _HostState:
542
569
  def password(self, value: Optional[pulumi.Input[str]]):
543
570
  pulumi.set(self, "password", value)
544
571
 
572
+ @property
573
+ @pulumi.getter
574
+ def services(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]]]:
575
+ """
576
+ Set Services on host, the settings to be set are based on service being set as part of import.
577
+ """
578
+ return pulumi.get(self, "services")
579
+
580
+ @services.setter
581
+ def services(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]]]):
582
+ pulumi.set(self, "services", value)
583
+
545
584
  @property
546
585
  @pulumi.getter
547
586
  def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
@@ -604,6 +643,7 @@ class Host(pulumi.CustomResource):
604
643
  lockdown: Optional[pulumi.Input[str]] = None,
605
644
  maintenance: Optional[pulumi.Input[bool]] = None,
606
645
  password: Optional[pulumi.Input[str]] = None,
646
+ services: Optional[pulumi.Input[Sequence[pulumi.Input[Union['HostServiceArgs', 'HostServiceArgsDict']]]]] = None,
607
647
  tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
608
648
  thumbprint: Optional[pulumi.Input[str]] = None,
609
649
  username: Optional[pulumi.Input[str]] = None,
@@ -616,60 +656,123 @@ class Host(pulumi.CustomResource):
616
656
 
617
657
  ### Create a standalone host
618
658
 
619
- <!--Start PulumiCodeChooser -->
620
659
  ```python
621
660
  import pulumi
622
661
  import pulumi_vsphere as vsphere
623
662
 
624
663
  datacenter = vsphere.get_datacenter(name="dc-01")
625
- thumbprint = vsphere.get_host_thumbprint(address="esx-01.example.com",
664
+ thumbprint = vsphere.get_host_thumbprint(address="esxi-01.example.com",
626
665
  insecure=True)
627
666
  esx_01 = vsphere.Host("esx-01",
628
- hostname="esx-01.example.com",
667
+ hostname="esxi-01.example.com",
629
668
  username="root",
630
669
  password="password",
631
670
  license="00000-00000-00000-00000-00000",
632
671
  thumbprint=thumbprint.id,
633
672
  datacenter=datacenter.id)
634
673
  ```
635
- <!--End PulumiCodeChooser -->
636
674
 
637
- ### Create host in a compute cluster
675
+ ## Import
638
676
 
639
- <!--Start PulumiCodeChooser -->
640
- ```python
641
- import pulumi
642
- import pulumi_vsphere as vsphere
677
+ An existing host can be imported into this resource by supplying
643
678
 
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 -->
679
+ the host's ID.
658
680
 
659
- ## Importing
681
+ [docs-import]: /docs/import/index.html
660
682
 
661
- An existing host can be [imported][docs-import] into this resource by supplying
662
- the host's ID. An example is below:
683
+ Obtain the host's ID using the data source. For example:
663
684
 
664
- [docs-import]: /docs/import/index.html
685
+ hcl
665
686
 
666
- <!--Start PulumiCodeChooser -->
667
- ```python
668
- import pulumi
687
+ data "vsphere_datacenter" "datacenter" {
688
+
689
+ name = "dc-01"
690
+
691
+ }
692
+
693
+ data "vsphere_host" "host" {
694
+
695
+ name = "esxi-01.example.com"
696
+
697
+ datacenter_id = data.vsphere_datacenter.datacenter.id
698
+
699
+ }
700
+
701
+ output "host_id" {
702
+
703
+ value = data.vsphere_host.host.id
704
+
705
+ }
706
+
707
+ Next, create a resource configuration, For example:
708
+
709
+ hcl
710
+
711
+ data "vsphere_datacenter" "datacenter" {
712
+
713
+ name = "dc-01"
714
+
715
+ }
716
+
717
+ data "vsphere_host_thumbprint" "thumbprint" {
718
+
719
+ address = "esxi-01.example.com"
720
+
721
+ insecure = true
722
+
723
+ }
724
+
725
+ resource "vsphere_host" "esx-01" {
726
+
727
+ hostname = "esxi-01.example.com"
728
+
729
+ username = "root"
730
+
731
+ password = "password"
732
+
733
+ thumbprint = data.vsphere_host_thumbprint.thumbprint.id
734
+
735
+ datacenter = data.vsphere_datacenter.datacenter.id
736
+
737
+ }
738
+
739
+ hcl
740
+
741
+ resource "vsphere_host" "esx-01" {
742
+
743
+ hostname = "esxi-01.example.com"
744
+
745
+ username = "root"
746
+
747
+ password = "password"
748
+
749
+ license = "00000-00000-00000-00000-00000"
750
+
751
+ thumbprint = data.vsphere_host_thumbprint.thumbprint.id
752
+
753
+ cluster = data.vsphere_compute_cluster.cluster.id
754
+
755
+ services {
756
+
757
+ ntpd {
758
+
759
+ enabled = true
760
+
761
+ policy = "on"
762
+
763
+ ntp_servers = ["pool.ntp.org"]
764
+
765
+ }
766
+
767
+ }
768
+
769
+ console
770
+
771
+ ```sh
772
+ $ pulumi import vsphere:index/host:Host esx-01 host-123
669
773
  ```
670
- <!--End PulumiCodeChooser -->
671
774
 
672
- The above would import the host with ID `host-123`.
775
+ The above would import the host `esxi-01.example.com` with the host ID `host-123`.
673
776
 
674
777
  :param str resource_name: The name of the resource.
675
778
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -704,6 +807,7 @@ class Host(pulumi.CustomResource):
704
807
  Default is `false`.
705
808
  :param pulumi.Input[str] password: Password that will be used by vSphere to authenticate
706
809
  to the host.
810
+ :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.
707
811
  :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource. Please
708
812
  refer to the `Tag` resource for more information on applying
709
813
  tags to resources.
@@ -731,60 +835,123 @@ class Host(pulumi.CustomResource):
731
835
 
732
836
  ### Create a standalone host
733
837
 
734
- <!--Start PulumiCodeChooser -->
735
838
  ```python
736
839
  import pulumi
737
840
  import pulumi_vsphere as vsphere
738
841
 
739
842
  datacenter = vsphere.get_datacenter(name="dc-01")
740
- thumbprint = vsphere.get_host_thumbprint(address="esx-01.example.com",
843
+ thumbprint = vsphere.get_host_thumbprint(address="esxi-01.example.com",
741
844
  insecure=True)
742
845
  esx_01 = vsphere.Host("esx-01",
743
- hostname="esx-01.example.com",
846
+ hostname="esxi-01.example.com",
744
847
  username="root",
745
848
  password="password",
746
849
  license="00000-00000-00000-00000-00000",
747
850
  thumbprint=thumbprint.id,
748
851
  datacenter=datacenter.id)
749
852
  ```
750
- <!--End PulumiCodeChooser -->
751
853
 
752
- ### Create host in a compute cluster
854
+ ## Import
753
855
 
754
- <!--Start PulumiCodeChooser -->
755
- ```python
756
- import pulumi
757
- import pulumi_vsphere as vsphere
856
+ An existing host can be imported into this resource by supplying
758
857
 
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 -->
858
+ the host's ID.
773
859
 
774
- ## Importing
860
+ [docs-import]: /docs/import/index.html
775
861
 
776
- An existing host can be [imported][docs-import] into this resource by supplying
777
- the host's ID. An example is below:
862
+ Obtain the host's ID using the data source. For example:
778
863
 
779
- [docs-import]: /docs/import/index.html
864
+ hcl
780
865
 
781
- <!--Start PulumiCodeChooser -->
782
- ```python
783
- import pulumi
866
+ data "vsphere_datacenter" "datacenter" {
867
+
868
+ name = "dc-01"
869
+
870
+ }
871
+
872
+ data "vsphere_host" "host" {
873
+
874
+ name = "esxi-01.example.com"
875
+
876
+ datacenter_id = data.vsphere_datacenter.datacenter.id
877
+
878
+ }
879
+
880
+ output "host_id" {
881
+
882
+ value = data.vsphere_host.host.id
883
+
884
+ }
885
+
886
+ Next, create a resource configuration, For example:
887
+
888
+ hcl
889
+
890
+ data "vsphere_datacenter" "datacenter" {
891
+
892
+ name = "dc-01"
893
+
894
+ }
895
+
896
+ data "vsphere_host_thumbprint" "thumbprint" {
897
+
898
+ address = "esxi-01.example.com"
899
+
900
+ insecure = true
901
+
902
+ }
903
+
904
+ resource "vsphere_host" "esx-01" {
905
+
906
+ hostname = "esxi-01.example.com"
907
+
908
+ username = "root"
909
+
910
+ password = "password"
911
+
912
+ thumbprint = data.vsphere_host_thumbprint.thumbprint.id
913
+
914
+ datacenter = data.vsphere_datacenter.datacenter.id
915
+
916
+ }
917
+
918
+ hcl
919
+
920
+ resource "vsphere_host" "esx-01" {
921
+
922
+ hostname = "esxi-01.example.com"
923
+
924
+ username = "root"
925
+
926
+ password = "password"
927
+
928
+ license = "00000-00000-00000-00000-00000"
929
+
930
+ thumbprint = data.vsphere_host_thumbprint.thumbprint.id
931
+
932
+ cluster = data.vsphere_compute_cluster.cluster.id
933
+
934
+ services {
935
+
936
+ ntpd {
937
+
938
+ enabled = true
939
+
940
+ policy = "on"
941
+
942
+ ntp_servers = ["pool.ntp.org"]
943
+
944
+ }
945
+
946
+ }
947
+
948
+ console
949
+
950
+ ```sh
951
+ $ pulumi import vsphere:index/host:Host esx-01 host-123
784
952
  ```
785
- <!--End PulumiCodeChooser -->
786
953
 
787
- The above would import the host with ID `host-123`.
954
+ The above would import the host `esxi-01.example.com` with the host ID `host-123`.
788
955
 
789
956
  :param str resource_name: The name of the resource.
790
957
  :param HostArgs args: The arguments to use to populate this resource's properties.
@@ -812,6 +979,7 @@ class Host(pulumi.CustomResource):
812
979
  lockdown: Optional[pulumi.Input[str]] = None,
813
980
  maintenance: Optional[pulumi.Input[bool]] = None,
814
981
  password: Optional[pulumi.Input[str]] = None,
982
+ services: Optional[pulumi.Input[Sequence[pulumi.Input[Union['HostServiceArgs', 'HostServiceArgsDict']]]]] = None,
815
983
  tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
816
984
  thumbprint: Optional[pulumi.Input[str]] = None,
817
985
  username: Optional[pulumi.Input[str]] = None,
@@ -839,6 +1007,7 @@ class Host(pulumi.CustomResource):
839
1007
  if password is None and not opts.urn:
840
1008
  raise TypeError("Missing required property 'password'")
841
1009
  __props__.__dict__["password"] = None if password is None else pulumi.Output.secret(password)
1010
+ __props__.__dict__["services"] = services
842
1011
  __props__.__dict__["tags"] = tags
843
1012
  __props__.__dict__["thumbprint"] = thumbprint
844
1013
  if username is None and not opts.urn:
@@ -867,6 +1036,7 @@ class Host(pulumi.CustomResource):
867
1036
  lockdown: Optional[pulumi.Input[str]] = None,
868
1037
  maintenance: Optional[pulumi.Input[bool]] = None,
869
1038
  password: Optional[pulumi.Input[str]] = None,
1039
+ services: Optional[pulumi.Input[Sequence[pulumi.Input[Union['HostServiceArgs', 'HostServiceArgsDict']]]]] = None,
870
1040
  tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
871
1041
  thumbprint: Optional[pulumi.Input[str]] = None,
872
1042
  username: Optional[pulumi.Input[str]] = None) -> 'Host':
@@ -908,6 +1078,7 @@ class Host(pulumi.CustomResource):
908
1078
  Default is `false`.
909
1079
  :param pulumi.Input[str] password: Password that will be used by vSphere to authenticate
910
1080
  to the host.
1081
+ :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.
911
1082
  :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource. Please
912
1083
  refer to the `Tag` resource for more information on applying
913
1084
  tags to resources.
@@ -936,6 +1107,7 @@ class Host(pulumi.CustomResource):
936
1107
  __props__.__dict__["lockdown"] = lockdown
937
1108
  __props__.__dict__["maintenance"] = maintenance
938
1109
  __props__.__dict__["password"] = password
1110
+ __props__.__dict__["services"] = services
939
1111
  __props__.__dict__["tags"] = tags
940
1112
  __props__.__dict__["thumbprint"] = thumbprint
941
1113
  __props__.__dict__["username"] = username
@@ -1049,6 +1221,14 @@ class Host(pulumi.CustomResource):
1049
1221
  """
1050
1222
  return pulumi.get(self, "password")
1051
1223
 
1224
+ @property
1225
+ @pulumi.getter
1226
+ def services(self) -> pulumi.Output[Optional[Sequence['outputs.HostService']]]:
1227
+ """
1228
+ Set Services on host, the settings to be set are based on service being set as part of import.
1229
+ """
1230
+ return pulumi.get(self, "services")
1231
+
1052
1232
  @property
1053
1233
  @pulumi.getter
1054
1234
  def tags(self) -> pulumi.Output[Optional[Sequence[str]]]:
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  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
10
15
  from . import _utilities
11
16
  from . import outputs
12
17
  from ._inputs import *
@@ -696,7 +701,6 @@ class HostPortGroup(pulumi.CustomResource):
696
701
 
697
702
  **Create a Virtual Switch and Bind a Port Group:**
698
703
 
699
- <!--Start PulumiCodeChooser -->
700
704
  ```python
701
705
  import pulumi
702
706
  import pulumi_vsphere as vsphere
@@ -704,7 +708,8 @@ class HostPortGroup(pulumi.CustomResource):
704
708
  datacenter = vsphere.get_datacenter(name="dc-01")
705
709
  host = vsphere.get_host(name="esxi-01.example.com",
706
710
  datacenter_id=datacenter.id)
707
- host_virtual_switch = vsphere.HostVirtualSwitch("hostVirtualSwitch",
711
+ host_virtual_switch = vsphere.HostVirtualSwitch("host_virtual_switch",
712
+ name="switch-01",
708
713
  host_system_id=host.id,
709
714
  network_adapters=[
710
715
  "vmnic0",
@@ -713,10 +718,10 @@ class HostPortGroup(pulumi.CustomResource):
713
718
  active_nics=["vmnic0"],
714
719
  standby_nics=["vmnic1"])
715
720
  pg = vsphere.HostPortGroup("pg",
721
+ name="portgroup-01",
716
722
  host_system_id=host.id,
717
723
  virtual_switch_name=host_virtual_switch.name)
718
724
  ```
719
- <!--End PulumiCodeChooser -->
720
725
 
721
726
  **Create a Port Group with a VLAN and ab Override:**
722
727
 
@@ -726,7 +731,6 @@ class HostPortGroup(pulumi.CustomResource):
726
731
  to ensure that all traffic is seen on the port. The setting overrides
727
732
  the implicit default of `false` set on the standard switch.
728
733
 
729
- <!--Start PulumiCodeChooser -->
730
734
  ```python
731
735
  import pulumi
732
736
  import pulumi_vsphere as vsphere
@@ -734,7 +738,8 @@ class HostPortGroup(pulumi.CustomResource):
734
738
  datacenter = vsphere.get_datacenter(name="dc-01")
735
739
  host = vsphere.get_host(name="esxi-01.example.com",
736
740
  datacenter_id=datacenter.id)
737
- host_virtual_switch = vsphere.HostVirtualSwitch("hostVirtualSwitch",
741
+ host_virtual_switch = vsphere.HostVirtualSwitch("host_virtual_switch",
742
+ name="switch-01",
738
743
  host_system_id=host.id,
739
744
  network_adapters=[
740
745
  "vmnic0",
@@ -743,23 +748,22 @@ class HostPortGroup(pulumi.CustomResource):
743
748
  active_nics=["vmnic0"],
744
749
  standby_nics=["vmnic1"])
745
750
  pg = vsphere.HostPortGroup("pg",
751
+ name="portgroup-01",
746
752
  host_system_id=host.id,
747
753
  virtual_switch_name=host_virtual_switch.name,
748
754
  vlan_id=4095,
749
755
  allow_promiscuous=True)
750
756
  ```
751
- <!--End PulumiCodeChooser -->
752
757
 
753
- ## Importing
758
+ ## Import
754
759
 
755
760
  An existing host port group can be imported into this resource
761
+
756
762
  using the host port group's ID. An example is below:
757
763
 
758
- <!--Start PulumiCodeChooser -->
759
- ```python
760
- import pulumi
764
+ ```sh
765
+ $ pulumi import vsphere:index/hostPortGroup:HostPortGroup management tf-HostPortGroup:host-123:management
761
766
  ```
762
- <!--End PulumiCodeChooser -->
763
767
 
764
768
  The above would import the `management` host port group from host with ID `host-123`.
765
769
 
@@ -812,7 +816,6 @@ class HostPortGroup(pulumi.CustomResource):
812
816
 
813
817
  **Create a Virtual Switch and Bind a Port Group:**
814
818
 
815
- <!--Start PulumiCodeChooser -->
816
819
  ```python
817
820
  import pulumi
818
821
  import pulumi_vsphere as vsphere
@@ -820,7 +823,8 @@ class HostPortGroup(pulumi.CustomResource):
820
823
  datacenter = vsphere.get_datacenter(name="dc-01")
821
824
  host = vsphere.get_host(name="esxi-01.example.com",
822
825
  datacenter_id=datacenter.id)
823
- host_virtual_switch = vsphere.HostVirtualSwitch("hostVirtualSwitch",
826
+ host_virtual_switch = vsphere.HostVirtualSwitch("host_virtual_switch",
827
+ name="switch-01",
824
828
  host_system_id=host.id,
825
829
  network_adapters=[
826
830
  "vmnic0",
@@ -829,10 +833,10 @@ class HostPortGroup(pulumi.CustomResource):
829
833
  active_nics=["vmnic0"],
830
834
  standby_nics=["vmnic1"])
831
835
  pg = vsphere.HostPortGroup("pg",
836
+ name="portgroup-01",
832
837
  host_system_id=host.id,
833
838
  virtual_switch_name=host_virtual_switch.name)
834
839
  ```
835
- <!--End PulumiCodeChooser -->
836
840
 
837
841
  **Create a Port Group with a VLAN and ab Override:**
838
842
 
@@ -842,7 +846,6 @@ class HostPortGroup(pulumi.CustomResource):
842
846
  to ensure that all traffic is seen on the port. The setting overrides
843
847
  the implicit default of `false` set on the standard switch.
844
848
 
845
- <!--Start PulumiCodeChooser -->
846
849
  ```python
847
850
  import pulumi
848
851
  import pulumi_vsphere as vsphere
@@ -850,7 +853,8 @@ class HostPortGroup(pulumi.CustomResource):
850
853
  datacenter = vsphere.get_datacenter(name="dc-01")
851
854
  host = vsphere.get_host(name="esxi-01.example.com",
852
855
  datacenter_id=datacenter.id)
853
- host_virtual_switch = vsphere.HostVirtualSwitch("hostVirtualSwitch",
856
+ host_virtual_switch = vsphere.HostVirtualSwitch("host_virtual_switch",
857
+ name="switch-01",
854
858
  host_system_id=host.id,
855
859
  network_adapters=[
856
860
  "vmnic0",
@@ -859,23 +863,22 @@ class HostPortGroup(pulumi.CustomResource):
859
863
  active_nics=["vmnic0"],
860
864
  standby_nics=["vmnic1"])
861
865
  pg = vsphere.HostPortGroup("pg",
866
+ name="portgroup-01",
862
867
  host_system_id=host.id,
863
868
  virtual_switch_name=host_virtual_switch.name,
864
869
  vlan_id=4095,
865
870
  allow_promiscuous=True)
866
871
  ```
867
- <!--End PulumiCodeChooser -->
868
872
 
869
- ## Importing
873
+ ## Import
870
874
 
871
875
  An existing host port group can be imported into this resource
876
+
872
877
  using the host port group's ID. An example is below:
873
878
 
874
- <!--Start PulumiCodeChooser -->
875
- ```python
876
- import pulumi
879
+ ```sh
880
+ $ pulumi import vsphere:index/hostPortGroup:HostPortGroup management tf-HostPortGroup:host-123:management
877
881
  ```
878
- <!--End PulumiCodeChooser -->
879
882
 
880
883
  The above would import the `management` host port group from host with ID `host-123`.
881
884
 
@@ -965,7 +968,7 @@ class HostPortGroup(pulumi.CustomResource):
965
968
  key: Optional[pulumi.Input[str]] = None,
966
969
  name: Optional[pulumi.Input[str]] = None,
967
970
  notify_switches: Optional[pulumi.Input[bool]] = None,
968
- ports: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['HostPortGroupPortArgs']]]]] = None,
971
+ ports: Optional[pulumi.Input[Sequence[pulumi.Input[Union['HostPortGroupPortArgs', 'HostPortGroupPortArgsDict']]]]] = None,
969
972
  shaping_average_bandwidth: Optional[pulumi.Input[int]] = None,
970
973
  shaping_burst_size: Optional[pulumi.Input[int]] = None,
971
974
  shaping_enabled: Optional[pulumi.Input[bool]] = None,
@@ -998,7 +1001,7 @@ class HostPortGroup(pulumi.CustomResource):
998
1001
  :param pulumi.Input[str] name: The name of the port group. Forces a new resource if
999
1002
  changed.
1000
1003
  :param pulumi.Input[bool] notify_switches: If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
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.
1004
+ :param pulumi.Input[Sequence[pulumi.Input[Union['HostPortGroupPortArgs', 'HostPortGroupPortArgsDict']]]] ports: A list of ports that currently exist and are used on this port group.
1002
1005
  :param pulumi.Input[int] shaping_average_bandwidth: The average bandwidth in bits per second if traffic shaping is enabled.
1003
1006
  :param pulumi.Input[int] shaping_burst_size: The maximum burst size allowed in bytes if traffic shaping is enabled.
1004
1007
  :param pulumi.Input[bool] shaping_enabled: Enable traffic shaping on this virtual switch or port group.