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
pulumi_vsphere/_utilities.py
CHANGED
|
@@ -264,7 +264,7 @@ def call_plain(
|
|
|
264
264
|
output = pulumi.runtime.call(tok, props, res, typ)
|
|
265
265
|
|
|
266
266
|
# Ingoring deps silently. They are typically non-empty, r.f() calls include r as a dependency.
|
|
267
|
-
result, known, secret, _ = _sync_await(asyncio.
|
|
267
|
+
result, known, secret, _ = _sync_await(asyncio.ensure_future(_await_output(output)))
|
|
268
268
|
|
|
269
269
|
problem = None
|
|
270
270
|
if not known:
|
|
@@ -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 *
|
|
@@ -2529,94 +2524,7 @@ class ComputeCluster(pulumi.CustomResource):
|
|
|
2529
2524
|
vsan_verbose_mode_enabled: Optional[pulumi.Input[bool]] = None,
|
|
2530
2525
|
__props__=None):
|
|
2531
2526
|
"""
|
|
2532
|
-
|
|
2533
|
-
hosts in the UI and documentation as _clusters_, _HA clusters_, or _DRS
|
|
2534
|
-
clusters_. All of these refer to the same kind of resource (with the latter two
|
|
2535
|
-
referring to specific features of clustering). We use
|
|
2536
|
-
`ComputeCluster` to differentiate host clusters from _datastore
|
|
2537
|
-
clusters_, which are clusters of datastores that can be used to distribute load
|
|
2538
|
-
and ensure fault tolerance via distribution of virtual machines. Datastore
|
|
2539
|
-
clusters can also be managed through the provider, via the
|
|
2540
|
-
`DatastoreCluster` resource.
|
|
2541
|
-
|
|
2542
|
-
The `ComputeCluster` resource can be used to create and manage
|
|
2543
|
-
clusters of hosts allowing for resource control of compute resources, load
|
|
2544
|
-
balancing through DRS, and high availability through vSphere HA.
|
|
2545
|
-
|
|
2546
|
-
For more information on vSphere clusters and DRS, see [this
|
|
2547
|
-
page][ref-vsphere-drs-clusters]. For more information on vSphere HA, see [this
|
|
2548
|
-
page][ref-vsphere-ha-clusters].
|
|
2549
|
-
|
|
2550
|
-
[ref-vsphere-drs-clusters]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-8ACF3502-5314-469F-8CC9-4A9BD5925BC2.html
|
|
2551
|
-
[ref-vsphere-ha-clusters]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-availability/GUID-5432CA24-14F1-44E3-87FB-61D937831CF6.html
|
|
2552
|
-
|
|
2553
|
-
> **NOTE:** This resource requires vCenter and is not available on
|
|
2554
|
-
direct ESXi connections.
|
|
2555
|
-
|
|
2556
|
-
## Import
|
|
2557
|
-
|
|
2558
|
-
An existing cluster can be imported into this resource via the
|
|
2559
|
-
|
|
2560
|
-
path to the cluster, via the following command:
|
|
2561
|
-
|
|
2562
|
-
hcl
|
|
2563
|
-
|
|
2564
|
-
variable "datacenter" {
|
|
2565
|
-
|
|
2566
|
-
default = "dc-01"
|
|
2567
|
-
|
|
2568
|
-
}
|
|
2569
|
-
|
|
2570
|
-
data "vsphere_datacenter" "datacenter" {
|
|
2571
|
-
|
|
2572
|
-
name = var.datacenter
|
|
2573
|
-
|
|
2574
|
-
}
|
|
2575
|
-
|
|
2576
|
-
resource "vsphere_compute_cluster" "compute_cluster" {
|
|
2577
|
-
|
|
2578
|
-
name = "cluster-01"
|
|
2579
|
-
|
|
2580
|
-
datacenter_id = data.vsphere_datacenter.datacenter.id
|
|
2581
|
-
|
|
2582
|
-
}
|
|
2583
|
-
|
|
2584
|
-
hcl
|
|
2585
|
-
|
|
2586
|
-
resource "vsphere_compute_cluster" "compute_cluster" {
|
|
2587
|
-
|
|
2588
|
-
name = "cluster-01"
|
|
2589
|
-
|
|
2590
|
-
datacenter_id = data.vsphere_datacenter.datacenter.id
|
|
2591
|
-
|
|
2592
|
-
vsan_enabled = true
|
|
2593
|
-
|
|
2594
|
-
vsan_performance_enabled = true
|
|
2595
|
-
|
|
2596
|
-
host_system_ids = [for host in data.vsphere_host.host : host.id]
|
|
2597
|
-
|
|
2598
|
-
dpm_automation_level = "automated"
|
|
2599
|
-
|
|
2600
|
-
drs_automation_level = "fullyAutomated"
|
|
2601
|
-
|
|
2602
|
-
drs_enabled = true
|
|
2603
|
-
|
|
2604
|
-
ha_datastore_apd_response = "restartConservative"
|
|
2605
|
-
|
|
2606
|
-
ha_datastore_pdl_response = "restartAggressive"
|
|
2607
|
-
|
|
2608
|
-
... etc.
|
|
2609
|
-
|
|
2610
|
-
console
|
|
2611
|
-
|
|
2612
|
-
```sh
|
|
2613
|
-
$ pulumi import vsphere:index/computeCluster:ComputeCluster compute_cluster /dc-01/host/cluster-01
|
|
2614
|
-
```
|
|
2615
|
-
|
|
2616
|
-
The above would import the cluster named `cluster-01` that is located in
|
|
2617
|
-
|
|
2618
|
-
the `dc-01` datacenter.
|
|
2619
|
-
|
|
2527
|
+
Create a ComputeCluster resource with the given unique name, props, and options.
|
|
2620
2528
|
:param str resource_name: The name of the resource.
|
|
2621
2529
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
2622
2530
|
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: A map of custom attribute ids to attribute
|
|
@@ -2743,94 +2651,7 @@ class ComputeCluster(pulumi.CustomResource):
|
|
|
2743
2651
|
args: ComputeClusterArgs,
|
|
2744
2652
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
2745
2653
|
"""
|
|
2746
|
-
|
|
2747
|
-
hosts in the UI and documentation as _clusters_, _HA clusters_, or _DRS
|
|
2748
|
-
clusters_. All of these refer to the same kind of resource (with the latter two
|
|
2749
|
-
referring to specific features of clustering). We use
|
|
2750
|
-
`ComputeCluster` to differentiate host clusters from _datastore
|
|
2751
|
-
clusters_, which are clusters of datastores that can be used to distribute load
|
|
2752
|
-
and ensure fault tolerance via distribution of virtual machines. Datastore
|
|
2753
|
-
clusters can also be managed through the provider, via the
|
|
2754
|
-
`DatastoreCluster` resource.
|
|
2755
|
-
|
|
2756
|
-
The `ComputeCluster` resource can be used to create and manage
|
|
2757
|
-
clusters of hosts allowing for resource control of compute resources, load
|
|
2758
|
-
balancing through DRS, and high availability through vSphere HA.
|
|
2759
|
-
|
|
2760
|
-
For more information on vSphere clusters and DRS, see [this
|
|
2761
|
-
page][ref-vsphere-drs-clusters]. For more information on vSphere HA, see [this
|
|
2762
|
-
page][ref-vsphere-ha-clusters].
|
|
2763
|
-
|
|
2764
|
-
[ref-vsphere-drs-clusters]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-8ACF3502-5314-469F-8CC9-4A9BD5925BC2.html
|
|
2765
|
-
[ref-vsphere-ha-clusters]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-availability/GUID-5432CA24-14F1-44E3-87FB-61D937831CF6.html
|
|
2766
|
-
|
|
2767
|
-
> **NOTE:** This resource requires vCenter and is not available on
|
|
2768
|
-
direct ESXi connections.
|
|
2769
|
-
|
|
2770
|
-
## Import
|
|
2771
|
-
|
|
2772
|
-
An existing cluster can be imported into this resource via the
|
|
2773
|
-
|
|
2774
|
-
path to the cluster, via the following command:
|
|
2775
|
-
|
|
2776
|
-
hcl
|
|
2777
|
-
|
|
2778
|
-
variable "datacenter" {
|
|
2779
|
-
|
|
2780
|
-
default = "dc-01"
|
|
2781
|
-
|
|
2782
|
-
}
|
|
2783
|
-
|
|
2784
|
-
data "vsphere_datacenter" "datacenter" {
|
|
2785
|
-
|
|
2786
|
-
name = var.datacenter
|
|
2787
|
-
|
|
2788
|
-
}
|
|
2789
|
-
|
|
2790
|
-
resource "vsphere_compute_cluster" "compute_cluster" {
|
|
2791
|
-
|
|
2792
|
-
name = "cluster-01"
|
|
2793
|
-
|
|
2794
|
-
datacenter_id = data.vsphere_datacenter.datacenter.id
|
|
2795
|
-
|
|
2796
|
-
}
|
|
2797
|
-
|
|
2798
|
-
hcl
|
|
2799
|
-
|
|
2800
|
-
resource "vsphere_compute_cluster" "compute_cluster" {
|
|
2801
|
-
|
|
2802
|
-
name = "cluster-01"
|
|
2803
|
-
|
|
2804
|
-
datacenter_id = data.vsphere_datacenter.datacenter.id
|
|
2805
|
-
|
|
2806
|
-
vsan_enabled = true
|
|
2807
|
-
|
|
2808
|
-
vsan_performance_enabled = true
|
|
2809
|
-
|
|
2810
|
-
host_system_ids = [for host in data.vsphere_host.host : host.id]
|
|
2811
|
-
|
|
2812
|
-
dpm_automation_level = "automated"
|
|
2813
|
-
|
|
2814
|
-
drs_automation_level = "fullyAutomated"
|
|
2815
|
-
|
|
2816
|
-
drs_enabled = true
|
|
2817
|
-
|
|
2818
|
-
ha_datastore_apd_response = "restartConservative"
|
|
2819
|
-
|
|
2820
|
-
ha_datastore_pdl_response = "restartAggressive"
|
|
2821
|
-
|
|
2822
|
-
... etc.
|
|
2823
|
-
|
|
2824
|
-
console
|
|
2825
|
-
|
|
2826
|
-
```sh
|
|
2827
|
-
$ pulumi import vsphere:index/computeCluster:ComputeCluster compute_cluster /dc-01/host/cluster-01
|
|
2828
|
-
```
|
|
2829
|
-
|
|
2830
|
-
The above would import the cluster named `cluster-01` that is located in
|
|
2831
|
-
|
|
2832
|
-
the `dc-01` datacenter.
|
|
2833
|
-
|
|
2654
|
+
Create a ComputeCluster resource with the given unique name, props, and options.
|
|
2834
2655
|
:param str resource_name: The name of the resource.
|
|
2835
2656
|
:param ComputeClusterArgs args: The arguments to use to populate this resource's properties.
|
|
2836
2657
|
: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__ = ['ComputeClusterHostGroupArgs', 'ComputeClusterHostGroup']
|
|
@@ -173,37 +168,7 @@ class ComputeClusterHostGroup(pulumi.CustomResource):
|
|
|
173
168
|
name: Optional[pulumi.Input[str]] = None,
|
|
174
169
|
__props__=None):
|
|
175
170
|
"""
|
|
176
|
-
|
|
177
|
-
of hosts in a cluster, either created by the
|
|
178
|
-
`ComputeCluster` resource or looked up
|
|
179
|
-
by the `ComputeCluster` data source.
|
|
180
|
-
|
|
181
|
-
This resource mainly serves as an input to the
|
|
182
|
-
`ComputeClusterVmHostRule`
|
|
183
|
-
resource - see the documentation for that resource for further details on how
|
|
184
|
-
to use host groups.
|
|
185
|
-
|
|
186
|
-
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
187
|
-
connections.
|
|
188
|
-
|
|
189
|
-
## Import
|
|
190
|
-
|
|
191
|
-
An existing group can be imported into this resource by
|
|
192
|
-
|
|
193
|
-
supplying both the path to the cluster, and the name of the host group. If the
|
|
194
|
-
|
|
195
|
-
name or cluster is not found, or if the group is of a different type, an error
|
|
196
|
-
|
|
197
|
-
will be returned. An example is below:
|
|
198
|
-
|
|
199
|
-
```sh
|
|
200
|
-
$ pulumi import vsphere:index/computeClusterHostGroup:ComputeClusterHostGroup cluster_host_group \\
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
'{"compute_cluster_path": "/dc1/host/cluster1", \\
|
|
204
|
-
|
|
205
|
-
"name": "pulumi-test-cluster-host-group"}'
|
|
206
|
-
|
|
171
|
+
Create a ComputeClusterHostGroup resource with the given unique name, props, and options.
|
|
207
172
|
:param str resource_name: The name of the resource.
|
|
208
173
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
209
174
|
:param pulumi.Input[str] compute_cluster_id: The managed object reference
|
|
@@ -226,37 +191,7 @@ class ComputeClusterHostGroup(pulumi.CustomResource):
|
|
|
226
191
|
args: ComputeClusterHostGroupArgs,
|
|
227
192
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
228
193
|
"""
|
|
229
|
-
|
|
230
|
-
of hosts in a cluster, either created by the
|
|
231
|
-
`ComputeCluster` resource or looked up
|
|
232
|
-
by the `ComputeCluster` data source.
|
|
233
|
-
|
|
234
|
-
This resource mainly serves as an input to the
|
|
235
|
-
`ComputeClusterVmHostRule`
|
|
236
|
-
resource - see the documentation for that resource for further details on how
|
|
237
|
-
to use host groups.
|
|
238
|
-
|
|
239
|
-
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
240
|
-
connections.
|
|
241
|
-
|
|
242
|
-
## Import
|
|
243
|
-
|
|
244
|
-
An existing group can be imported into this resource by
|
|
245
|
-
|
|
246
|
-
supplying both the path to the cluster, and the name of the host group. If the
|
|
247
|
-
|
|
248
|
-
name or cluster is not found, or if the group is of a different type, an error
|
|
249
|
-
|
|
250
|
-
will be returned. An example is below:
|
|
251
|
-
|
|
252
|
-
```sh
|
|
253
|
-
$ pulumi import vsphere:index/computeClusterHostGroup:ComputeClusterHostGroup cluster_host_group \\
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
'{"compute_cluster_path": "/dc1/host/cluster1", \\
|
|
257
|
-
|
|
258
|
-
"name": "pulumi-test-cluster-host-group"}'
|
|
259
|
-
|
|
194
|
+
Create a ComputeClusterHostGroup resource with the given unique name, props, and options.
|
|
260
195
|
:param str resource_name: The name of the resource.
|
|
261
196
|
:param ComputeClusterHostGroupArgs args: The arguments to use to populate this resource's properties.
|
|
262
197
|
: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__ = ['ComputeClusterVmAffinityRuleArgs', 'ComputeClusterVmAffinityRule']
|
|
@@ -320,24 +315,13 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
|
|
|
320
315
|
virtual_machine_ids=[__item.id for __item in vms_get_virtual_machine])
|
|
321
316
|
```
|
|
322
317
|
|
|
323
|
-
##
|
|
318
|
+
## Importing
|
|
324
319
|
|
|
325
320
|
An existing rule can be imported into this resource by supplying
|
|
326
|
-
|
|
327
321
|
both the path to the cluster, and the name the rule. If the name or cluster is
|
|
328
|
-
|
|
329
322
|
not found, or if the rule is of a different type, an error will be returned. An
|
|
330
|
-
|
|
331
323
|
example is below:
|
|
332
324
|
|
|
333
|
-
```sh
|
|
334
|
-
$ pulumi import vsphere:index/computeClusterVmAffinityRule:ComputeClusterVmAffinityRule vm_affinity_rule \\
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
'{"compute_cluster_path": "/dc-01/host/cluster-01", \\
|
|
338
|
-
|
|
339
|
-
"name": "vm-affinity-rule"}'
|
|
340
|
-
|
|
341
325
|
:param str resource_name: The name of the resource.
|
|
342
326
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
343
327
|
:param pulumi.Input[str] compute_cluster_id: The managed object reference
|
|
@@ -447,24 +431,13 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
|
|
|
447
431
|
virtual_machine_ids=[__item.id for __item in vms_get_virtual_machine])
|
|
448
432
|
```
|
|
449
433
|
|
|
450
|
-
##
|
|
434
|
+
## Importing
|
|
451
435
|
|
|
452
436
|
An existing rule can be imported into this resource by supplying
|
|
453
|
-
|
|
454
437
|
both the path to the cluster, and the name the rule. If the name or cluster is
|
|
455
|
-
|
|
456
438
|
not found, or if the rule is of a different type, an error will be returned. An
|
|
457
|
-
|
|
458
439
|
example is below:
|
|
459
440
|
|
|
460
|
-
```sh
|
|
461
|
-
$ pulumi import vsphere:index/computeClusterVmAffinityRule:ComputeClusterVmAffinityRule vm_affinity_rule \\
|
|
462
|
-
```
|
|
463
|
-
|
|
464
|
-
'{"compute_cluster_path": "/dc-01/host/cluster-01", \\
|
|
465
|
-
|
|
466
|
-
"name": "vm-affinity-rule"}'
|
|
467
|
-
|
|
468
441
|
:param str resource_name: The name of the resource.
|
|
469
442
|
:param ComputeClusterVmAffinityRuleArgs args: The arguments to use to populate this resource's properties.
|
|
470
443
|
: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__ = ['ComputeClusterVmAntiAffinityRuleArgs', 'ComputeClusterVmAntiAffinityRule']
|
|
@@ -234,24 +229,7 @@ class ComputeClusterVmAntiAffinityRule(pulumi.CustomResource):
|
|
|
234
229
|
virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
235
230
|
__props__=None):
|
|
236
231
|
"""
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
An existing rule can be imported into this resource by supplying
|
|
240
|
-
|
|
241
|
-
both the path to the cluster, and the name the rule. If the name or cluster is
|
|
242
|
-
|
|
243
|
-
not found, or if the rule is of a different type, an error will be returned. An
|
|
244
|
-
|
|
245
|
-
example is below:
|
|
246
|
-
|
|
247
|
-
```sh
|
|
248
|
-
$ pulumi import vsphere:index/computeClusterVmAntiAffinityRule:ComputeClusterVmAntiAffinityRule vm_anti_affinity_rule \\
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
'{"compute_cluster_path": "/dc-01/host/cluster-01", \\
|
|
252
|
-
|
|
253
|
-
"name": "vm-anti-affinity-rule"}'
|
|
254
|
-
|
|
232
|
+
Create a ComputeClusterVmAntiAffinityRule resource with the given unique name, props, and options.
|
|
255
233
|
:param str resource_name: The name of the resource.
|
|
256
234
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
257
235
|
:param pulumi.Input[str] compute_cluster_id: The managed object reference
|
|
@@ -275,24 +253,7 @@ class ComputeClusterVmAntiAffinityRule(pulumi.CustomResource):
|
|
|
275
253
|
args: ComputeClusterVmAntiAffinityRuleArgs,
|
|
276
254
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
277
255
|
"""
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
An existing rule can be imported into this resource by supplying
|
|
281
|
-
|
|
282
|
-
both the path to the cluster, and the name the rule. If the name or cluster is
|
|
283
|
-
|
|
284
|
-
not found, or if the rule is of a different type, an error will be returned. An
|
|
285
|
-
|
|
286
|
-
example is below:
|
|
287
|
-
|
|
288
|
-
```sh
|
|
289
|
-
$ pulumi import vsphere:index/computeClusterVmAntiAffinityRule:ComputeClusterVmAntiAffinityRule vm_anti_affinity_rule \\
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
'{"compute_cluster_path": "/dc-01/host/cluster-01", \\
|
|
293
|
-
|
|
294
|
-
"name": "vm-anti-affinity-rule"}'
|
|
295
|
-
|
|
256
|
+
Create a ComputeClusterVmAntiAffinityRule resource with the given unique name, props, and options.
|
|
296
257
|
:param str resource_name: The name of the resource.
|
|
297
258
|
:param ComputeClusterVmAntiAffinityRuleArgs args: The arguments to use to populate this resource's properties.
|
|
298
259
|
: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__ = ['ComputeClusterVmDependencyRuleArgs', 'ComputeClusterVmDependencyRule']
|
|
@@ -290,106 +285,7 @@ class ComputeClusterVmDependencyRule(pulumi.CustomResource):
|
|
|
290
285
|
vm_group_name: Optional[pulumi.Input[str]] = None,
|
|
291
286
|
__props__=None):
|
|
292
287
|
"""
|
|
293
|
-
|
|
294
|
-
VM dependency rules in a cluster, either created by the
|
|
295
|
-
`ComputeCluster` resource or looked up
|
|
296
|
-
by the `ComputeCluster` data source.
|
|
297
|
-
|
|
298
|
-
A virtual machine dependency rule applies to vSphere HA, and allows
|
|
299
|
-
user-defined startup orders for virtual machines in the case of host failure.
|
|
300
|
-
Virtual machines are supplied via groups, which can be managed via the
|
|
301
|
-
`ComputeClusterVmGroup`
|
|
302
|
-
resource.
|
|
303
|
-
|
|
304
|
-
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
305
|
-
connections.
|
|
306
|
-
|
|
307
|
-
## Example Usage
|
|
308
|
-
|
|
309
|
-
The example below creates two virtual machine in a cluster using the
|
|
310
|
-
`VirtualMachine` resource in a cluster
|
|
311
|
-
looked up by the `ComputeCluster`
|
|
312
|
-
data source. It then creates a group with this virtual machine. Two groups are created, each with one of the created VMs. Finally, a rule is created to ensure that `vm1` starts before `vm2`.
|
|
313
|
-
|
|
314
|
-
> Note how `dependency_vm_group_name` and
|
|
315
|
-
`vm_group_name` are sourced off of the `name` attributes from
|
|
316
|
-
the `ComputeClusterVmGroup`
|
|
317
|
-
resource. This is to ensure that the rule is not created before the groups
|
|
318
|
-
exist, which may not possibly happen in the event that the names came from a
|
|
319
|
-
"static" source such as a variable.
|
|
320
|
-
|
|
321
|
-
```python
|
|
322
|
-
import pulumi
|
|
323
|
-
import pulumi_vsphere as vsphere
|
|
324
|
-
|
|
325
|
-
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
326
|
-
datastore = vsphere.get_datastore(name="datastore1",
|
|
327
|
-
datacenter_id=datacenter.id)
|
|
328
|
-
cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
329
|
-
datacenter_id=datacenter.id)
|
|
330
|
-
network = vsphere.get_network(name="network1",
|
|
331
|
-
datacenter_id=datacenter.id)
|
|
332
|
-
vm1 = vsphere.VirtualMachine("vm1",
|
|
333
|
-
name="test1",
|
|
334
|
-
resource_pool_id=cluster.resource_pool_id,
|
|
335
|
-
datastore_id=datastore.id,
|
|
336
|
-
num_cpus=2,
|
|
337
|
-
memory=2048,
|
|
338
|
-
guest_id="otherLinux64Guest",
|
|
339
|
-
network_interfaces=[{
|
|
340
|
-
"network_id": network.id,
|
|
341
|
-
}],
|
|
342
|
-
disks=[{
|
|
343
|
-
"label": "disk0",
|
|
344
|
-
"size": 20,
|
|
345
|
-
}])
|
|
346
|
-
vm2 = vsphere.VirtualMachine("vm2",
|
|
347
|
-
name="test2",
|
|
348
|
-
resource_pool_id=cluster.resource_pool_id,
|
|
349
|
-
datastore_id=datastore.id,
|
|
350
|
-
num_cpus=2,
|
|
351
|
-
memory=2048,
|
|
352
|
-
guest_id="otherLinux64Guest",
|
|
353
|
-
network_interfaces=[{
|
|
354
|
-
"network_id": network.id,
|
|
355
|
-
}],
|
|
356
|
-
disks=[{
|
|
357
|
-
"label": "disk0",
|
|
358
|
-
"size": 20,
|
|
359
|
-
}])
|
|
360
|
-
cluster_vm_group1 = vsphere.ComputeClusterVmGroup("cluster_vm_group1",
|
|
361
|
-
name="test-cluster-vm-group1",
|
|
362
|
-
compute_cluster_id=cluster.id,
|
|
363
|
-
virtual_machine_ids=[vm1.id])
|
|
364
|
-
cluster_vm_group2 = vsphere.ComputeClusterVmGroup("cluster_vm_group2",
|
|
365
|
-
name="test-cluster-vm-group2",
|
|
366
|
-
compute_cluster_id=cluster.id,
|
|
367
|
-
virtual_machine_ids=[vm2.id])
|
|
368
|
-
cluster_vm_dependency_rule = vsphere.ComputeClusterVmDependencyRule("cluster_vm_dependency_rule",
|
|
369
|
-
compute_cluster_id=cluster.id,
|
|
370
|
-
name="test-cluster-vm-dependency-rule",
|
|
371
|
-
dependency_vm_group_name=cluster_vm_group1.name,
|
|
372
|
-
vm_group_name=cluster_vm_group2.name)
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
## Import
|
|
376
|
-
|
|
377
|
-
An existing rule can be imported into this resource by supplying
|
|
378
|
-
|
|
379
|
-
both the path to the cluster, and the name the rule. If the name or cluster is
|
|
380
|
-
|
|
381
|
-
not found, or if the rule is of a different type, an error will be returned. An
|
|
382
|
-
|
|
383
|
-
example is below:
|
|
384
|
-
|
|
385
|
-
```sh
|
|
386
|
-
$ pulumi import vsphere:index/computeClusterVmDependencyRule:ComputeClusterVmDependencyRule cluster_vm_dependency_rule \\
|
|
387
|
-
```
|
|
388
|
-
|
|
389
|
-
'{"compute_cluster_path": "/dc1/host/cluster1", \\
|
|
390
|
-
|
|
391
|
-
"name": "pulumi-test-cluster-vm-dependency-rule"}'
|
|
392
|
-
|
|
288
|
+
Create a ComputeClusterVmDependencyRule resource with the given unique name, props, and options.
|
|
393
289
|
:param str resource_name: The name of the resource.
|
|
394
290
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
395
291
|
:param pulumi.Input[str] compute_cluster_id: The managed object reference
|
|
@@ -420,106 +316,7 @@ class ComputeClusterVmDependencyRule(pulumi.CustomResource):
|
|
|
420
316
|
args: ComputeClusterVmDependencyRuleArgs,
|
|
421
317
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
422
318
|
"""
|
|
423
|
-
|
|
424
|
-
VM dependency rules in a cluster, either created by the
|
|
425
|
-
`ComputeCluster` resource or looked up
|
|
426
|
-
by the `ComputeCluster` data source.
|
|
427
|
-
|
|
428
|
-
A virtual machine dependency rule applies to vSphere HA, and allows
|
|
429
|
-
user-defined startup orders for virtual machines in the case of host failure.
|
|
430
|
-
Virtual machines are supplied via groups, which can be managed via the
|
|
431
|
-
`ComputeClusterVmGroup`
|
|
432
|
-
resource.
|
|
433
|
-
|
|
434
|
-
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
435
|
-
connections.
|
|
436
|
-
|
|
437
|
-
## Example Usage
|
|
438
|
-
|
|
439
|
-
The example below creates two virtual machine in a cluster using the
|
|
440
|
-
`VirtualMachine` resource in a cluster
|
|
441
|
-
looked up by the `ComputeCluster`
|
|
442
|
-
data source. It then creates a group with this virtual machine. Two groups are created, each with one of the created VMs. Finally, a rule is created to ensure that `vm1` starts before `vm2`.
|
|
443
|
-
|
|
444
|
-
> Note how `dependency_vm_group_name` and
|
|
445
|
-
`vm_group_name` are sourced off of the `name` attributes from
|
|
446
|
-
the `ComputeClusterVmGroup`
|
|
447
|
-
resource. This is to ensure that the rule is not created before the groups
|
|
448
|
-
exist, which may not possibly happen in the event that the names came from a
|
|
449
|
-
"static" source such as a variable.
|
|
450
|
-
|
|
451
|
-
```python
|
|
452
|
-
import pulumi
|
|
453
|
-
import pulumi_vsphere as vsphere
|
|
454
|
-
|
|
455
|
-
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
456
|
-
datastore = vsphere.get_datastore(name="datastore1",
|
|
457
|
-
datacenter_id=datacenter.id)
|
|
458
|
-
cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
459
|
-
datacenter_id=datacenter.id)
|
|
460
|
-
network = vsphere.get_network(name="network1",
|
|
461
|
-
datacenter_id=datacenter.id)
|
|
462
|
-
vm1 = vsphere.VirtualMachine("vm1",
|
|
463
|
-
name="test1",
|
|
464
|
-
resource_pool_id=cluster.resource_pool_id,
|
|
465
|
-
datastore_id=datastore.id,
|
|
466
|
-
num_cpus=2,
|
|
467
|
-
memory=2048,
|
|
468
|
-
guest_id="otherLinux64Guest",
|
|
469
|
-
network_interfaces=[{
|
|
470
|
-
"network_id": network.id,
|
|
471
|
-
}],
|
|
472
|
-
disks=[{
|
|
473
|
-
"label": "disk0",
|
|
474
|
-
"size": 20,
|
|
475
|
-
}])
|
|
476
|
-
vm2 = vsphere.VirtualMachine("vm2",
|
|
477
|
-
name="test2",
|
|
478
|
-
resource_pool_id=cluster.resource_pool_id,
|
|
479
|
-
datastore_id=datastore.id,
|
|
480
|
-
num_cpus=2,
|
|
481
|
-
memory=2048,
|
|
482
|
-
guest_id="otherLinux64Guest",
|
|
483
|
-
network_interfaces=[{
|
|
484
|
-
"network_id": network.id,
|
|
485
|
-
}],
|
|
486
|
-
disks=[{
|
|
487
|
-
"label": "disk0",
|
|
488
|
-
"size": 20,
|
|
489
|
-
}])
|
|
490
|
-
cluster_vm_group1 = vsphere.ComputeClusterVmGroup("cluster_vm_group1",
|
|
491
|
-
name="test-cluster-vm-group1",
|
|
492
|
-
compute_cluster_id=cluster.id,
|
|
493
|
-
virtual_machine_ids=[vm1.id])
|
|
494
|
-
cluster_vm_group2 = vsphere.ComputeClusterVmGroup("cluster_vm_group2",
|
|
495
|
-
name="test-cluster-vm-group2",
|
|
496
|
-
compute_cluster_id=cluster.id,
|
|
497
|
-
virtual_machine_ids=[vm2.id])
|
|
498
|
-
cluster_vm_dependency_rule = vsphere.ComputeClusterVmDependencyRule("cluster_vm_dependency_rule",
|
|
499
|
-
compute_cluster_id=cluster.id,
|
|
500
|
-
name="test-cluster-vm-dependency-rule",
|
|
501
|
-
dependency_vm_group_name=cluster_vm_group1.name,
|
|
502
|
-
vm_group_name=cluster_vm_group2.name)
|
|
503
|
-
```
|
|
504
|
-
|
|
505
|
-
## Import
|
|
506
|
-
|
|
507
|
-
An existing rule can be imported into this resource by supplying
|
|
508
|
-
|
|
509
|
-
both the path to the cluster, and the name the rule. If the name or cluster is
|
|
510
|
-
|
|
511
|
-
not found, or if the rule is of a different type, an error will be returned. An
|
|
512
|
-
|
|
513
|
-
example is below:
|
|
514
|
-
|
|
515
|
-
```sh
|
|
516
|
-
$ pulumi import vsphere:index/computeClusterVmDependencyRule:ComputeClusterVmDependencyRule cluster_vm_dependency_rule \\
|
|
517
|
-
```
|
|
518
|
-
|
|
519
|
-
'{"compute_cluster_path": "/dc1/host/cluster1", \\
|
|
520
|
-
|
|
521
|
-
"name": "pulumi-test-cluster-vm-dependency-rule"}'
|
|
522
|
-
|
|
319
|
+
Create a ComputeClusterVmDependencyRule resource with the given unique name, props, and options.
|
|
523
320
|
:param str resource_name: The name of the resource.
|
|
524
321
|
:param ComputeClusterVmDependencyRuleArgs args: The arguments to use to populate this resource's properties.
|
|
525
322
|
:param pulumi.ResourceOptions opts: Options for the resource.
|