pulumi-vsphere 4.10.0a1709368772__py3-none-any.whl → 4.10.0a1710160860__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 +4 -0
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +8 -0
- pulumi_vsphere/datacenter.py +12 -0
- pulumi_vsphere/datastore_cluster.py +7 -7
- pulumi_vsphere/distributed_virtual_switch.py +28 -7
- pulumi_vsphere/file.py +12 -0
- pulumi_vsphere/get_compute_cluster.py +4 -0
- pulumi_vsphere/get_compute_cluster_host_group.py +4 -0
- pulumi_vsphere/get_content_library.py +4 -0
- pulumi_vsphere/get_custom_attribute.py +4 -0
- pulumi_vsphere/get_datacenter.py +4 -0
- pulumi_vsphere/get_datastore.py +4 -0
- pulumi_vsphere/get_datastore_cluster.py +4 -0
- pulumi_vsphere/get_distributed_virtual_switch.py +4 -0
- pulumi_vsphere/get_dynamic.py +4 -0
- pulumi_vsphere/get_folder.py +4 -0
- pulumi_vsphere/get_guest_os_customization.py +4 -0
- pulumi_vsphere/get_host.py +4 -0
- pulumi_vsphere/get_host_pci_device.py +34 -0
- pulumi_vsphere/get_host_thumbprint.py +4 -0
- pulumi_vsphere/get_license.py +4 -0
- pulumi_vsphere/get_network.py +4 -0
- pulumi_vsphere/get_ovf_vm_template.py +0 -168
- pulumi_vsphere/get_policy.py +4 -0
- pulumi_vsphere/get_resource_pool.py +10 -0
- pulumi_vsphere/get_role.py +4 -0
- 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 +8 -0
- pulumi_vsphere/get_vmfs_disks.py +4 -0
- pulumi_vsphere/host.py +18 -0
- pulumi_vsphere/host_port_group.py +14 -0
- pulumi_vsphere/license.py +4 -0
- pulumi_vsphere/outputs.py +4 -0
- pulumi_vsphere/resource_pool.py +12 -12
- pulumi_vsphere/virtual_machine.py +7 -7
- pulumi_vsphere/virtual_machine_snapshot.py +4 -0
- pulumi_vsphere/vm_storage_policy.py +12 -0
- pulumi_vsphere/vnic.py +18 -0
- {pulumi_vsphere-4.10.0a1709368772.dist-info → pulumi_vsphere-4.10.0a1710160860.dist-info}/METADATA +1 -1
- pulumi_vsphere-4.10.0a1710160860.dist-info/RECORD +80 -0
- pulumi_vsphere-4.10.0a1709368772.dist-info/RECORD +0 -80
- {pulumi_vsphere-4.10.0a1709368772.dist-info → pulumi_vsphere-4.10.0a1710160860.dist-info}/WHEEL +0 -0
- {pulumi_vsphere-4.10.0a1709368772.dist-info → pulumi_vsphere-4.10.0a1710160860.dist-info}/top_level.txt +0 -0
|
@@ -73,6 +73,7 @@ def get_vapp_container(datacenter_id: Optional[str] = None,
|
|
|
73
73
|
|
|
74
74
|
## Example Usage
|
|
75
75
|
|
|
76
|
+
<!--Start PulumiCodeChooser -->
|
|
76
77
|
```python
|
|
77
78
|
import pulumi
|
|
78
79
|
import pulumi_vsphere as vsphere
|
|
@@ -81,6 +82,7 @@ def get_vapp_container(datacenter_id: Optional[str] = None,
|
|
|
81
82
|
pool = vsphere.get_vapp_container(name="vapp-container-01",
|
|
82
83
|
datacenter_id=datacenter.id)
|
|
83
84
|
```
|
|
85
|
+
<!--End PulumiCodeChooser -->
|
|
84
86
|
|
|
85
87
|
|
|
86
88
|
:param str datacenter_id: The managed object reference ID
|
|
@@ -112,6 +114,7 @@ def get_vapp_container_output(datacenter_id: Optional[pulumi.Input[str]] = None,
|
|
|
112
114
|
|
|
113
115
|
## Example Usage
|
|
114
116
|
|
|
117
|
+
<!--Start PulumiCodeChooser -->
|
|
115
118
|
```python
|
|
116
119
|
import pulumi
|
|
117
120
|
import pulumi_vsphere as vsphere
|
|
@@ -120,6 +123,7 @@ def get_vapp_container_output(datacenter_id: Optional[pulumi.Input[str]] = None,
|
|
|
120
123
|
pool = vsphere.get_vapp_container(name="vapp-container-01",
|
|
121
124
|
datacenter_id=datacenter.id)
|
|
122
125
|
```
|
|
126
|
+
<!--End PulumiCodeChooser -->
|
|
123
127
|
|
|
124
128
|
|
|
125
129
|
:param str datacenter_id: The managed object reference ID
|
|
@@ -742,6 +742,7 @@ def get_virtual_machine(alternate_guest_name: Optional[str] = None,
|
|
|
742
742
|
In the following example, a virtual machine template is returned by its
|
|
743
743
|
unique name within the `Datacenter`.
|
|
744
744
|
|
|
745
|
+
<!--Start PulumiCodeChooser -->
|
|
745
746
|
```python
|
|
746
747
|
import pulumi
|
|
747
748
|
import pulumi_vsphere as vsphere
|
|
@@ -750,9 +751,11 @@ def get_virtual_machine(alternate_guest_name: Optional[str] = None,
|
|
|
750
751
|
template = vsphere.get_virtual_machine(name="ubuntu-server-template",
|
|
751
752
|
datacenter_id=datacenter.id)
|
|
752
753
|
```
|
|
754
|
+
<!--End PulumiCodeChooser -->
|
|
753
755
|
In the following example, each virtual machine template is returned by its
|
|
754
756
|
unique full path within the `Datacenter`.
|
|
755
757
|
|
|
758
|
+
<!--Start PulumiCodeChooser -->
|
|
756
759
|
```python
|
|
757
760
|
import pulumi
|
|
758
761
|
import pulumi_vsphere as vsphere
|
|
@@ -763,6 +766,7 @@ def get_virtual_machine(alternate_guest_name: Optional[str] = None,
|
|
|
763
766
|
development_template = vsphere.get_virtual_machine(name="development/templates/ubuntu-server-template",
|
|
764
767
|
datacenter_id=datacenter.id)
|
|
765
768
|
```
|
|
769
|
+
<!--End PulumiCodeChooser -->
|
|
766
770
|
|
|
767
771
|
|
|
768
772
|
:param str alternate_guest_name: The alternate guest name of the virtual machine when
|
|
@@ -984,6 +988,7 @@ def get_virtual_machine_output(alternate_guest_name: Optional[pulumi.Input[Optio
|
|
|
984
988
|
In the following example, a virtual machine template is returned by its
|
|
985
989
|
unique name within the `Datacenter`.
|
|
986
990
|
|
|
991
|
+
<!--Start PulumiCodeChooser -->
|
|
987
992
|
```python
|
|
988
993
|
import pulumi
|
|
989
994
|
import pulumi_vsphere as vsphere
|
|
@@ -992,9 +997,11 @@ def get_virtual_machine_output(alternate_guest_name: Optional[pulumi.Input[Optio
|
|
|
992
997
|
template = vsphere.get_virtual_machine(name="ubuntu-server-template",
|
|
993
998
|
datacenter_id=datacenter.id)
|
|
994
999
|
```
|
|
1000
|
+
<!--End PulumiCodeChooser -->
|
|
995
1001
|
In the following example, each virtual machine template is returned by its
|
|
996
1002
|
unique full path within the `Datacenter`.
|
|
997
1003
|
|
|
1004
|
+
<!--Start PulumiCodeChooser -->
|
|
998
1005
|
```python
|
|
999
1006
|
import pulumi
|
|
1000
1007
|
import pulumi_vsphere as vsphere
|
|
@@ -1005,6 +1012,7 @@ def get_virtual_machine_output(alternate_guest_name: Optional[pulumi.Input[Optio
|
|
|
1005
1012
|
development_template = vsphere.get_virtual_machine(name="development/templates/ubuntu-server-template",
|
|
1006
1013
|
datacenter_id=datacenter.id)
|
|
1007
1014
|
```
|
|
1015
|
+
<!--End PulumiCodeChooser -->
|
|
1008
1016
|
|
|
1009
1017
|
|
|
1010
1018
|
:param str alternate_guest_name: The alternate guest name of the virtual machine when
|
pulumi_vsphere/get_vmfs_disks.py
CHANGED
|
@@ -96,6 +96,7 @@ def get_vmfs_disks(filter: Optional[str] = None,
|
|
|
96
96
|
|
|
97
97
|
## Example Usage
|
|
98
98
|
|
|
99
|
+
<!--Start PulumiCodeChooser -->
|
|
99
100
|
```python
|
|
100
101
|
import pulumi
|
|
101
102
|
import pulumi_vsphere as vsphere
|
|
@@ -107,6 +108,7 @@ def get_vmfs_disks(filter: Optional[str] = None,
|
|
|
107
108
|
rescan=True,
|
|
108
109
|
filter="mpx.vmhba1:C0:T[12]:L0")
|
|
109
110
|
```
|
|
111
|
+
<!--End PulumiCodeChooser -->
|
|
110
112
|
|
|
111
113
|
|
|
112
114
|
:param str filter: A regular expression to filter the disks against. Only
|
|
@@ -149,6 +151,7 @@ def get_vmfs_disks_output(filter: Optional[pulumi.Input[Optional[str]]] = None,
|
|
|
149
151
|
|
|
150
152
|
## Example Usage
|
|
151
153
|
|
|
154
|
+
<!--Start PulumiCodeChooser -->
|
|
152
155
|
```python
|
|
153
156
|
import pulumi
|
|
154
157
|
import pulumi_vsphere as vsphere
|
|
@@ -160,6 +163,7 @@ def get_vmfs_disks_output(filter: Optional[pulumi.Input[Optional[str]]] = None,
|
|
|
160
163
|
rescan=True,
|
|
161
164
|
filter="mpx.vmhba1:C0:T[12]:L0")
|
|
162
165
|
```
|
|
166
|
+
<!--End PulumiCodeChooser -->
|
|
163
167
|
|
|
164
168
|
|
|
165
169
|
:param str filter: A regular expression to filter the disks against. Only
|
pulumi_vsphere/host.py
CHANGED
|
@@ -613,8 +613,10 @@ class Host(pulumi.CustomResource):
|
|
|
613
613
|
can be used either as a member of a cluster or as a standalone host.
|
|
614
614
|
|
|
615
615
|
## Example Usage
|
|
616
|
+
|
|
616
617
|
### Create a standalone host
|
|
617
618
|
|
|
619
|
+
<!--Start PulumiCodeChooser -->
|
|
618
620
|
```python
|
|
619
621
|
import pulumi
|
|
620
622
|
import pulumi_vsphere as vsphere
|
|
@@ -630,8 +632,11 @@ class Host(pulumi.CustomResource):
|
|
|
630
632
|
thumbprint=thumbprint.id,
|
|
631
633
|
datacenter=datacenter.id)
|
|
632
634
|
```
|
|
635
|
+
<!--End PulumiCodeChooser -->
|
|
636
|
+
|
|
633
637
|
### Create host in a compute cluster
|
|
634
638
|
|
|
639
|
+
<!--Start PulumiCodeChooser -->
|
|
635
640
|
```python
|
|
636
641
|
import pulumi
|
|
637
642
|
import pulumi_vsphere as vsphere
|
|
@@ -649,6 +654,8 @@ class Host(pulumi.CustomResource):
|
|
|
649
654
|
thumbprint=thumbprint.id,
|
|
650
655
|
cluster=cluster.id)
|
|
651
656
|
```
|
|
657
|
+
<!--End PulumiCodeChooser -->
|
|
658
|
+
|
|
652
659
|
## Importing
|
|
653
660
|
|
|
654
661
|
An existing host can be [imported][docs-import] into this resource by supplying
|
|
@@ -656,9 +663,11 @@ class Host(pulumi.CustomResource):
|
|
|
656
663
|
|
|
657
664
|
[docs-import]: /docs/import/index.html
|
|
658
665
|
|
|
666
|
+
<!--Start PulumiCodeChooser -->
|
|
659
667
|
```python
|
|
660
668
|
import pulumi
|
|
661
669
|
```
|
|
670
|
+
<!--End PulumiCodeChooser -->
|
|
662
671
|
|
|
663
672
|
The above would import the host with ID `host-123`.
|
|
664
673
|
|
|
@@ -719,8 +728,10 @@ class Host(pulumi.CustomResource):
|
|
|
719
728
|
can be used either as a member of a cluster or as a standalone host.
|
|
720
729
|
|
|
721
730
|
## Example Usage
|
|
731
|
+
|
|
722
732
|
### Create a standalone host
|
|
723
733
|
|
|
734
|
+
<!--Start PulumiCodeChooser -->
|
|
724
735
|
```python
|
|
725
736
|
import pulumi
|
|
726
737
|
import pulumi_vsphere as vsphere
|
|
@@ -736,8 +747,11 @@ class Host(pulumi.CustomResource):
|
|
|
736
747
|
thumbprint=thumbprint.id,
|
|
737
748
|
datacenter=datacenter.id)
|
|
738
749
|
```
|
|
750
|
+
<!--End PulumiCodeChooser -->
|
|
751
|
+
|
|
739
752
|
### Create host in a compute cluster
|
|
740
753
|
|
|
754
|
+
<!--Start PulumiCodeChooser -->
|
|
741
755
|
```python
|
|
742
756
|
import pulumi
|
|
743
757
|
import pulumi_vsphere as vsphere
|
|
@@ -755,6 +769,8 @@ class Host(pulumi.CustomResource):
|
|
|
755
769
|
thumbprint=thumbprint.id,
|
|
756
770
|
cluster=cluster.id)
|
|
757
771
|
```
|
|
772
|
+
<!--End PulumiCodeChooser -->
|
|
773
|
+
|
|
758
774
|
## Importing
|
|
759
775
|
|
|
760
776
|
An existing host can be [imported][docs-import] into this resource by supplying
|
|
@@ -762,9 +778,11 @@ class Host(pulumi.CustomResource):
|
|
|
762
778
|
|
|
763
779
|
[docs-import]: /docs/import/index.html
|
|
764
780
|
|
|
781
|
+
<!--Start PulumiCodeChooser -->
|
|
765
782
|
```python
|
|
766
783
|
import pulumi
|
|
767
784
|
```
|
|
785
|
+
<!--End PulumiCodeChooser -->
|
|
768
786
|
|
|
769
787
|
The above would import the host with ID `host-123`.
|
|
770
788
|
|
|
@@ -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
|
|
@@ -715,6 +716,7 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
715
716
|
host_system_id=host.id,
|
|
716
717
|
virtual_switch_name=host_virtual_switch.name)
|
|
717
718
|
```
|
|
719
|
+
<!--End PulumiCodeChooser -->
|
|
718
720
|
|
|
719
721
|
**Create a Port Group with a VLAN and ab Override:**
|
|
720
722
|
|
|
@@ -724,6 +726,7 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
724
726
|
to ensure that all traffic is seen on the port. The setting overrides
|
|
725
727
|
the implicit default of `false` set on the standard switch.
|
|
726
728
|
|
|
729
|
+
<!--Start PulumiCodeChooser -->
|
|
727
730
|
```python
|
|
728
731
|
import pulumi
|
|
729
732
|
import pulumi_vsphere as vsphere
|
|
@@ -745,14 +748,18 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
745
748
|
vlan_id=4095,
|
|
746
749
|
allow_promiscuous=True)
|
|
747
750
|
```
|
|
751
|
+
<!--End PulumiCodeChooser -->
|
|
752
|
+
|
|
748
753
|
## Importing
|
|
749
754
|
|
|
750
755
|
An existing host port group can be imported into this resource
|
|
751
756
|
using the host port group's ID. An example is below:
|
|
752
757
|
|
|
758
|
+
<!--Start PulumiCodeChooser -->
|
|
753
759
|
```python
|
|
754
760
|
import pulumi
|
|
755
761
|
```
|
|
762
|
+
<!--End PulumiCodeChooser -->
|
|
756
763
|
|
|
757
764
|
The above would import the `management` host port group from host with ID `host-123`.
|
|
758
765
|
|
|
@@ -805,6 +812,7 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
805
812
|
|
|
806
813
|
**Create a Virtual Switch and Bind a Port Group:**
|
|
807
814
|
|
|
815
|
+
<!--Start PulumiCodeChooser -->
|
|
808
816
|
```python
|
|
809
817
|
import pulumi
|
|
810
818
|
import pulumi_vsphere as vsphere
|
|
@@ -824,6 +832,7 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
824
832
|
host_system_id=host.id,
|
|
825
833
|
virtual_switch_name=host_virtual_switch.name)
|
|
826
834
|
```
|
|
835
|
+
<!--End PulumiCodeChooser -->
|
|
827
836
|
|
|
828
837
|
**Create a Port Group with a VLAN and ab Override:**
|
|
829
838
|
|
|
@@ -833,6 +842,7 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
833
842
|
to ensure that all traffic is seen on the port. The setting overrides
|
|
834
843
|
the implicit default of `false` set on the standard switch.
|
|
835
844
|
|
|
845
|
+
<!--Start PulumiCodeChooser -->
|
|
836
846
|
```python
|
|
837
847
|
import pulumi
|
|
838
848
|
import pulumi_vsphere as vsphere
|
|
@@ -854,14 +864,18 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
854
864
|
vlan_id=4095,
|
|
855
865
|
allow_promiscuous=True)
|
|
856
866
|
```
|
|
867
|
+
<!--End PulumiCodeChooser -->
|
|
868
|
+
|
|
857
869
|
## Importing
|
|
858
870
|
|
|
859
871
|
An existing host port group can be imported into this resource
|
|
860
872
|
using the host port group's ID. An example is below:
|
|
861
873
|
|
|
874
|
+
<!--Start PulumiCodeChooser -->
|
|
862
875
|
```python
|
|
863
876
|
import pulumi
|
|
864
877
|
```
|
|
878
|
+
<!--End PulumiCodeChooser -->
|
|
865
879
|
|
|
866
880
|
The above would import the `management` host port group from host with ID `host-123`.
|
|
867
881
|
|
pulumi_vsphere/license.py
CHANGED
|
@@ -167,6 +167,7 @@ class License(pulumi.CustomResource):
|
|
|
167
167
|
|
|
168
168
|
## Example Usage
|
|
169
169
|
|
|
170
|
+
<!--Start PulumiCodeChooser -->
|
|
170
171
|
```python
|
|
171
172
|
import pulumi
|
|
172
173
|
import pulumi_vsphere as vsphere
|
|
@@ -178,6 +179,7 @@ class License(pulumi.CustomResource):
|
|
|
178
179
|
},
|
|
179
180
|
license_key="452CQ-2EK54-K8742-00000-00000")
|
|
180
181
|
```
|
|
182
|
+
<!--End PulumiCodeChooser -->
|
|
181
183
|
|
|
182
184
|
:param str resource_name: The name of the resource.
|
|
183
185
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -195,6 +197,7 @@ class License(pulumi.CustomResource):
|
|
|
195
197
|
|
|
196
198
|
## Example Usage
|
|
197
199
|
|
|
200
|
+
<!--Start PulumiCodeChooser -->
|
|
198
201
|
```python
|
|
199
202
|
import pulumi
|
|
200
203
|
import pulumi_vsphere as vsphere
|
|
@@ -206,6 +209,7 @@ class License(pulumi.CustomResource):
|
|
|
206
209
|
},
|
|
207
210
|
license_key="452CQ-2EK54-K8742-00000-00000")
|
|
208
211
|
```
|
|
212
|
+
<!--End PulumiCodeChooser -->
|
|
209
213
|
|
|
210
214
|
:param str resource_name: The name of the resource.
|
|
211
215
|
:param LicenseArgs args: The arguments to use to populate this resource's properties.
|
pulumi_vsphere/outputs.py
CHANGED
|
@@ -206,6 +206,7 @@ class ComputeClusterVsanStretchedCluster(dict):
|
|
|
206
206
|
> **NOTE:** You must disable vSphere HA before you enable vSAN on the cluster.
|
|
207
207
|
You can enable or re-enable vSphere HA after vSAN is configured.
|
|
208
208
|
|
|
209
|
+
<!--Start PulumiCodeChooser -->
|
|
209
210
|
```python
|
|
210
211
|
import pulumi
|
|
211
212
|
import pulumi_vsphere as vsphere
|
|
@@ -248,6 +249,7 @@ class ComputeClusterVsanStretchedCluster(dict):
|
|
|
248
249
|
witness_node=data["vsphere_host"]["witness_host"]["id"],
|
|
249
250
|
))
|
|
250
251
|
```
|
|
252
|
+
<!--End PulumiCodeChooser -->
|
|
251
253
|
"""
|
|
252
254
|
pulumi.set(__self__, "preferred_fault_domain_host_ids", preferred_fault_domain_host_ids)
|
|
253
255
|
pulumi.set(__self__, "secondary_fault_domain_host_ids", secondary_fault_domain_host_ids)
|
|
@@ -298,6 +300,7 @@ class ComputeClusterVsanStretchedCluster(dict):
|
|
|
298
300
|
> **NOTE:** You must disable vSphere HA before you enable vSAN on the cluster.
|
|
299
301
|
You can enable or re-enable vSphere HA after vSAN is configured.
|
|
300
302
|
|
|
303
|
+
<!--Start PulumiCodeChooser -->
|
|
301
304
|
```python
|
|
302
305
|
import pulumi
|
|
303
306
|
import pulumi_vsphere as vsphere
|
|
@@ -340,6 +343,7 @@ class ComputeClusterVsanStretchedCluster(dict):
|
|
|
340
343
|
witness_node=data["vsphere_host"]["witness_host"]["id"],
|
|
341
344
|
))
|
|
342
345
|
```
|
|
346
|
+
<!--End PulumiCodeChooser -->
|
|
343
347
|
"""
|
|
344
348
|
return pulumi.get(self, "secondary_fault_domain_name")
|
|
345
349
|
|
pulumi_vsphere/resource_pool.py
CHANGED
|
@@ -657,6 +657,7 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
657
657
|
The following example sets up a resource pool in an existing compute cluster
|
|
658
658
|
with the default settings for CPU and memory reservations, shares, and limits.
|
|
659
659
|
|
|
660
|
+
<!--Start PulumiCodeChooser -->
|
|
660
661
|
```python
|
|
661
662
|
import pulumi
|
|
662
663
|
import pulumi_vsphere as vsphere
|
|
@@ -666,10 +667,12 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
666
667
|
datacenter_id=datacenter.id)
|
|
667
668
|
resource_pool = vsphere.ResourcePool("resourcePool", parent_resource_pool_id=compute_cluster.resource_pool_id)
|
|
668
669
|
```
|
|
670
|
+
<!--End PulumiCodeChooser -->
|
|
669
671
|
|
|
670
672
|
A virtual machine resource could be targeted to use the default resource pool
|
|
671
673
|
of the cluster using the following:
|
|
672
674
|
|
|
675
|
+
<!--Start PulumiCodeChooser -->
|
|
673
676
|
```python
|
|
674
677
|
import pulumi
|
|
675
678
|
import pulumi_vsphere as vsphere
|
|
@@ -677,11 +680,13 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
677
680
|
vm = vsphere.VirtualMachine("vm", resource_pool_id=data["vsphere_compute_cluster"]["cluster"]["resource_pool_id"])
|
|
678
681
|
# ... other configuration ...
|
|
679
682
|
```
|
|
683
|
+
<!--End PulumiCodeChooser -->
|
|
680
684
|
|
|
681
685
|
The following example sets up a parent resource pool in an existing compute cluster
|
|
682
686
|
with a child resource pool nested below. Each resource pool is configured with
|
|
683
687
|
the default settings for CPU and memory reservations, shares, and limits.
|
|
684
688
|
|
|
689
|
+
<!--Start PulumiCodeChooser -->
|
|
685
690
|
```python
|
|
686
691
|
import pulumi
|
|
687
692
|
import pulumi_vsphere as vsphere
|
|
@@ -692,12 +697,7 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
692
697
|
resource_pool_parent = vsphere.ResourcePool("resourcePoolParent", parent_resource_pool_id=compute_cluster.resource_pool_id)
|
|
693
698
|
resource_pool_child = vsphere.ResourcePool("resourcePoolChild", parent_resource_pool_id=resource_pool_parent.id)
|
|
694
699
|
```
|
|
695
|
-
|
|
696
|
-
### Settings that Require vSphere 7.0 or higher
|
|
697
|
-
|
|
698
|
-
These settings require vSphere 7.0 or higher:
|
|
699
|
-
|
|
700
|
-
* `scale_descendants_shares`
|
|
700
|
+
<!--End PulumiCodeChooser -->
|
|
701
701
|
|
|
702
702
|
:param str resource_name: The name of the resource.
|
|
703
703
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -766,6 +766,7 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
766
766
|
The following example sets up a resource pool in an existing compute cluster
|
|
767
767
|
with the default settings for CPU and memory reservations, shares, and limits.
|
|
768
768
|
|
|
769
|
+
<!--Start PulumiCodeChooser -->
|
|
769
770
|
```python
|
|
770
771
|
import pulumi
|
|
771
772
|
import pulumi_vsphere as vsphere
|
|
@@ -775,10 +776,12 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
775
776
|
datacenter_id=datacenter.id)
|
|
776
777
|
resource_pool = vsphere.ResourcePool("resourcePool", parent_resource_pool_id=compute_cluster.resource_pool_id)
|
|
777
778
|
```
|
|
779
|
+
<!--End PulumiCodeChooser -->
|
|
778
780
|
|
|
779
781
|
A virtual machine resource could be targeted to use the default resource pool
|
|
780
782
|
of the cluster using the following:
|
|
781
783
|
|
|
784
|
+
<!--Start PulumiCodeChooser -->
|
|
782
785
|
```python
|
|
783
786
|
import pulumi
|
|
784
787
|
import pulumi_vsphere as vsphere
|
|
@@ -786,11 +789,13 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
786
789
|
vm = vsphere.VirtualMachine("vm", resource_pool_id=data["vsphere_compute_cluster"]["cluster"]["resource_pool_id"])
|
|
787
790
|
# ... other configuration ...
|
|
788
791
|
```
|
|
792
|
+
<!--End PulumiCodeChooser -->
|
|
789
793
|
|
|
790
794
|
The following example sets up a parent resource pool in an existing compute cluster
|
|
791
795
|
with a child resource pool nested below. Each resource pool is configured with
|
|
792
796
|
the default settings for CPU and memory reservations, shares, and limits.
|
|
793
797
|
|
|
798
|
+
<!--Start PulumiCodeChooser -->
|
|
794
799
|
```python
|
|
795
800
|
import pulumi
|
|
796
801
|
import pulumi_vsphere as vsphere
|
|
@@ -801,12 +806,7 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
801
806
|
resource_pool_parent = vsphere.ResourcePool("resourcePoolParent", parent_resource_pool_id=compute_cluster.resource_pool_id)
|
|
802
807
|
resource_pool_child = vsphere.ResourcePool("resourcePoolChild", parent_resource_pool_id=resource_pool_parent.id)
|
|
803
808
|
```
|
|
804
|
-
|
|
805
|
-
### Settings that Require vSphere 7.0 or higher
|
|
806
|
-
|
|
807
|
-
These settings require vSphere 7.0 or higher:
|
|
808
|
-
|
|
809
|
-
* `scale_descendants_shares`
|
|
809
|
+
<!--End PulumiCodeChooser -->
|
|
810
810
|
|
|
811
811
|
:param str resource_name: The name of the resource.
|
|
812
812
|
:param ResourcePoolArgs args: The arguments to use to populate this resource's properties.
|
|
@@ -176,7 +176,7 @@ class VirtualMachineArgs:
|
|
|
176
176
|
:param pulumi.Input[int] poweron_timeout: The amount of time, in seconds, that we will be trying to power on a VM
|
|
177
177
|
:param pulumi.Input[str] replace_trigger: Triggers replacement of resource whenever it changes.
|
|
178
178
|
|
|
179
|
-
For example, `replace_trigger = sha256(format("
|
|
179
|
+
For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)
|
|
180
180
|
:param pulumi.Input[bool] run_tools_scripts_after_power_on: Enable post-power-on scripts to run when VMware Tools is installed. Default: `true`.
|
|
181
181
|
:param pulumi.Input[bool] run_tools_scripts_after_resume: Enable ost-resume scripts to run when VMware Tools is installed. Default: `true`.
|
|
182
182
|
:param pulumi.Input[bool] run_tools_scripts_before_guest_reboot: Enable pre-reboot scripts to run when VMware Tools is installed. Default: `false`.
|
|
@@ -1003,7 +1003,7 @@ class VirtualMachineArgs:
|
|
|
1003
1003
|
"""
|
|
1004
1004
|
Triggers replacement of resource whenever it changes.
|
|
1005
1005
|
|
|
1006
|
-
For example, `replace_trigger = sha256(format("
|
|
1006
|
+
For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)
|
|
1007
1007
|
"""
|
|
1008
1008
|
return pulumi.get(self, "replace_trigger")
|
|
1009
1009
|
|
|
@@ -1460,7 +1460,7 @@ class _VirtualMachineState:
|
|
|
1460
1460
|
:param pulumi.Input[bool] reboot_required: Value internal to Terraform used to determine if a configuration set change requires a reboot.
|
|
1461
1461
|
:param pulumi.Input[str] replace_trigger: Triggers replacement of resource whenever it changes.
|
|
1462
1462
|
|
|
1463
|
-
For example, `replace_trigger = sha256(format("
|
|
1463
|
+
For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)
|
|
1464
1464
|
:param pulumi.Input[str] resource_pool_id: The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value.
|
|
1465
1465
|
|
|
1466
1466
|
> **NOTE:** All clusters and standalone hosts have a default root resource pool. This resource argument does not directly accept the cluster or standalone host resource. For more information, see the section on specifying the Root Resource Pool in the `ResourcePool` data source documentation on using the root resource pool.
|
|
@@ -2387,7 +2387,7 @@ class _VirtualMachineState:
|
|
|
2387
2387
|
"""
|
|
2388
2388
|
Triggers replacement of resource whenever it changes.
|
|
2389
2389
|
|
|
2390
|
-
For example, `replace_trigger = sha256(format("
|
|
2390
|
+
For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)
|
|
2391
2391
|
"""
|
|
2392
2392
|
return pulumi.get(self, "replace_trigger")
|
|
2393
2393
|
|
|
@@ -2893,7 +2893,7 @@ class VirtualMachine(pulumi.CustomResource):
|
|
|
2893
2893
|
:param pulumi.Input[int] poweron_timeout: The amount of time, in seconds, that we will be trying to power on a VM
|
|
2894
2894
|
:param pulumi.Input[str] replace_trigger: Triggers replacement of resource whenever it changes.
|
|
2895
2895
|
|
|
2896
|
-
For example, `replace_trigger = sha256(format("
|
|
2896
|
+
For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)
|
|
2897
2897
|
:param pulumi.Input[str] resource_pool_id: The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value.
|
|
2898
2898
|
|
|
2899
2899
|
> **NOTE:** All clusters and standalone hosts have a default root resource pool. This resource argument does not directly accept the cluster or standalone host resource. For more information, see the section on specifying the Root Resource Pool in the `ResourcePool` data source documentation on using the root resource pool.
|
|
@@ -3309,7 +3309,7 @@ class VirtualMachine(pulumi.CustomResource):
|
|
|
3309
3309
|
:param pulumi.Input[bool] reboot_required: Value internal to Terraform used to determine if a configuration set change requires a reboot.
|
|
3310
3310
|
:param pulumi.Input[str] replace_trigger: Triggers replacement of resource whenever it changes.
|
|
3311
3311
|
|
|
3312
|
-
For example, `replace_trigger = sha256(format("
|
|
3312
|
+
For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)
|
|
3313
3313
|
:param pulumi.Input[str] resource_pool_id: The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value.
|
|
3314
3314
|
|
|
3315
3315
|
> **NOTE:** All clusters and standalone hosts have a default root resource pool. This resource argument does not directly accept the cluster or standalone host resource. For more information, see the section on specifying the Root Resource Pool in the `ResourcePool` data source documentation on using the root resource pool.
|
|
@@ -3928,7 +3928,7 @@ class VirtualMachine(pulumi.CustomResource):
|
|
|
3928
3928
|
"""
|
|
3929
3929
|
Triggers replacement of resource whenever it changes.
|
|
3930
3930
|
|
|
3931
|
-
For example, `replace_trigger = sha256(format("
|
|
3931
|
+
For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)
|
|
3932
3932
|
"""
|
|
3933
3933
|
return pulumi.get(self, "replace_trigger")
|
|
3934
3934
|
|
|
@@ -308,6 +308,7 @@ class VirtualMachineSnapshot(pulumi.CustomResource):
|
|
|
308
308
|
|
|
309
309
|
## Example Usage
|
|
310
310
|
|
|
311
|
+
<!--Start PulumiCodeChooser -->
|
|
311
312
|
```python
|
|
312
313
|
import pulumi
|
|
313
314
|
import pulumi_vsphere as vsphere
|
|
@@ -321,6 +322,7 @@ class VirtualMachineSnapshot(pulumi.CustomResource):
|
|
|
321
322
|
snapshot_name="Snapshot Name",
|
|
322
323
|
virtual_machine_uuid="9aac5551-a351-4158-8c5c-15a71e8ec5c9")
|
|
323
324
|
```
|
|
325
|
+
<!--End PulumiCodeChooser -->
|
|
324
326
|
|
|
325
327
|
:param str resource_name: The name of the resource.
|
|
326
328
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -369,6 +371,7 @@ class VirtualMachineSnapshot(pulumi.CustomResource):
|
|
|
369
371
|
|
|
370
372
|
## Example Usage
|
|
371
373
|
|
|
374
|
+
<!--Start PulumiCodeChooser -->
|
|
372
375
|
```python
|
|
373
376
|
import pulumi
|
|
374
377
|
import pulumi_vsphere as vsphere
|
|
@@ -382,6 +385,7 @@ class VirtualMachineSnapshot(pulumi.CustomResource):
|
|
|
382
385
|
snapshot_name="Snapshot Name",
|
|
383
386
|
virtual_machine_uuid="9aac5551-a351-4158-8c5c-15a71e8ec5c9")
|
|
384
387
|
```
|
|
388
|
+
<!--End PulumiCodeChooser -->
|
|
385
389
|
|
|
386
390
|
:param str resource_name: The name of the resource.
|
|
387
391
|
:param VirtualMachineSnapshotArgs args: The arguments to use to populate this resource's properties.
|
|
@@ -144,6 +144,7 @@ class VmStoragePolicy(pulumi.CustomResource):
|
|
|
144
144
|
|
|
145
145
|
In this example, tags are first applied to datastores.
|
|
146
146
|
|
|
147
|
+
<!--Start PulumiCodeChooser -->
|
|
147
148
|
```python
|
|
148
149
|
import pulumi
|
|
149
150
|
import pulumi_vsphere as vsphere
|
|
@@ -178,9 +179,11 @@ class VmStoragePolicy(pulumi.CustomResource):
|
|
|
178
179
|
"data.vsphere_tag.non_replicated.id",
|
|
179
180
|
])
|
|
180
181
|
```
|
|
182
|
+
<!--End PulumiCodeChooser -->
|
|
181
183
|
|
|
182
184
|
Next, storage policies are created and `tag_rules` are applied.
|
|
183
185
|
|
|
186
|
+
<!--Start PulumiCodeChooser -->
|
|
184
187
|
```python
|
|
185
188
|
import pulumi
|
|
186
189
|
import pulumi_vsphere as vsphere
|
|
@@ -224,9 +227,11 @@ class VmStoragePolicy(pulumi.CustomResource):
|
|
|
224
227
|
),
|
|
225
228
|
])
|
|
226
229
|
```
|
|
230
|
+
<!--End PulumiCodeChooser -->
|
|
227
231
|
|
|
228
232
|
Lasttly, when creating a virtual machine resource, a storage policy can be specificed to direct virtual machine placement to a datastore which matches the policy's `tags_rules`.
|
|
229
233
|
|
|
234
|
+
<!--Start PulumiCodeChooser -->
|
|
230
235
|
```python
|
|
231
236
|
import pulumi
|
|
232
237
|
import pulumi_vsphere as vsphere
|
|
@@ -238,6 +243,7 @@ class VmStoragePolicy(pulumi.CustomResource):
|
|
|
238
243
|
dev_vm = vsphere.VirtualMachine("devVm", storage_policy_id=data["vsphere_storage_policy"]["storage_policy"]["dev_silver_nonreplicated"]["id"])
|
|
239
244
|
# ... other configuration ...
|
|
240
245
|
```
|
|
246
|
+
<!--End PulumiCodeChooser -->
|
|
241
247
|
|
|
242
248
|
:param str resource_name: The name of the resource.
|
|
243
249
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -262,6 +268,7 @@ class VmStoragePolicy(pulumi.CustomResource):
|
|
|
262
268
|
|
|
263
269
|
In this example, tags are first applied to datastores.
|
|
264
270
|
|
|
271
|
+
<!--Start PulumiCodeChooser -->
|
|
265
272
|
```python
|
|
266
273
|
import pulumi
|
|
267
274
|
import pulumi_vsphere as vsphere
|
|
@@ -296,9 +303,11 @@ class VmStoragePolicy(pulumi.CustomResource):
|
|
|
296
303
|
"data.vsphere_tag.non_replicated.id",
|
|
297
304
|
])
|
|
298
305
|
```
|
|
306
|
+
<!--End PulumiCodeChooser -->
|
|
299
307
|
|
|
300
308
|
Next, storage policies are created and `tag_rules` are applied.
|
|
301
309
|
|
|
310
|
+
<!--Start PulumiCodeChooser -->
|
|
302
311
|
```python
|
|
303
312
|
import pulumi
|
|
304
313
|
import pulumi_vsphere as vsphere
|
|
@@ -342,9 +351,11 @@ class VmStoragePolicy(pulumi.CustomResource):
|
|
|
342
351
|
),
|
|
343
352
|
])
|
|
344
353
|
```
|
|
354
|
+
<!--End PulumiCodeChooser -->
|
|
345
355
|
|
|
346
356
|
Lasttly, when creating a virtual machine resource, a storage policy can be specificed to direct virtual machine placement to a datastore which matches the policy's `tags_rules`.
|
|
347
357
|
|
|
358
|
+
<!--Start PulumiCodeChooser -->
|
|
348
359
|
```python
|
|
349
360
|
import pulumi
|
|
350
361
|
import pulumi_vsphere as vsphere
|
|
@@ -356,6 +367,7 @@ class VmStoragePolicy(pulumi.CustomResource):
|
|
|
356
367
|
dev_vm = vsphere.VirtualMachine("devVm", storage_policy_id=data["vsphere_storage_policy"]["storage_policy"]["dev_silver_nonreplicated"]["id"])
|
|
357
368
|
# ... other configuration ...
|
|
358
369
|
```
|
|
370
|
+
<!--End PulumiCodeChooser -->
|
|
359
371
|
|
|
360
372
|
:param str resource_name: The name of the resource.
|
|
361
373
|
:param VmStoragePolicyArgs args: The arguments to use to populate this resource's properties.
|