pulumi-vsphere 4.11.2__tar.gz → 4.11.3__tar.gz
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-4.11.2 → pulumi_vsphere-4.11.3}/PKG-INFO +1 -1
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/compute_cluster.py +176 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/compute_cluster_host_group.py +62 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/compute_cluster_vm_affinity_rule.py +24 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +36 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/compute_cluster_vm_dependency_rule.py +200 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/compute_cluster_vm_group.py +158 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/compute_cluster_vm_host_rule.py +68 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/content_library.py +98 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/content_library_item.py +138 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/custom_attribute.py +72 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/datacenter.py +14 -4
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/datastore_cluster.py +58 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +154 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/distributed_port_group.py +280 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/distributed_virtual_switch.py +256 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/dpm_host_override.py +58 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/drs_vm_override.py +62 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/folder.py +136 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_compute_cluster_host_group.py +2 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/ha_vm_override.py +158 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/host.py +250 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/host_port_group.py +12 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/host_virtual_switch.py +64 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/nas_datastore.py +62 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/pulumi-plugin.json +1 -1
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/resource_pool.py +4 -16
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/role.py +28 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/storage_drs_vm_override.py +128 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/tag.py +154 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/tag_category.py +78 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/vapp_container.py +158 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/vapp_entity.py +142 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/virtual_disk.py +76 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/virtual_machine.py +48 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/vmfs_datastore.py +266 -2
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/vnic.py +14 -4
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere.egg-info/PKG-INFO +1 -1
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pyproject.toml +1 -1
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/README.md +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/__init__.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/_inputs.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/_utilities.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/config/__init__.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/config/__init__.pyi +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/config/vars.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/entity_permissions.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/file.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_compute_cluster.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_content_library.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_content_library_item.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_custom_attribute.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_datacenter.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_datastore.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_datastore_cluster.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_datastore_stats.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_distributed_virtual_switch.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_dynamic.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_folder.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_guest_os_customization.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_host.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_host_base_images.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_host_pci_device.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_host_thumbprint.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_host_vgpu_profile.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_license.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_network.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_ovf_vm_template.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_policy.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_resource_pool.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_role.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_tag.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_tag_category.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_vapp_container.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_virtual_machine.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/get_vmfs_disks.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/guest_os_customization.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/license.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/offline_software_depot.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/outputs.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/provider.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/py.typed +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/supervisor.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/virtual_machine_class.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/virtual_machine_snapshot.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/vm_storage_policy.py +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere.egg-info/SOURCES.txt +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere.egg-info/dependency_links.txt +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere.egg-info/requires.txt +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere.egg-info/top_level.txt +0 -0
- {pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/setup.cfg +0 -0
|
@@ -2524,7 +2524,94 @@ class ComputeCluster(pulumi.CustomResource):
|
|
|
2524
2524
|
vsan_verbose_mode_enabled: Optional[pulumi.Input[bool]] = None,
|
|
2525
2525
|
__props__=None):
|
|
2526
2526
|
"""
|
|
2527
|
-
|
|
2527
|
+
> **A note on the naming of this resource:** VMware refers to clusters of
|
|
2528
|
+
hosts in the UI and documentation as _clusters_, _HA clusters_, or _DRS
|
|
2529
|
+
clusters_. All of these refer to the same kind of resource (with the latter two
|
|
2530
|
+
referring to specific features of clustering). We use
|
|
2531
|
+
`ComputeCluster` to differentiate host clusters from _datastore
|
|
2532
|
+
clusters_, which are clusters of datastores that can be used to distribute load
|
|
2533
|
+
and ensure fault tolerance via distribution of virtual machines. Datastore
|
|
2534
|
+
clusters can also be managed through the provider, via the
|
|
2535
|
+
`DatastoreCluster` resource.
|
|
2536
|
+
|
|
2537
|
+
The `ComputeCluster` resource can be used to create and manage
|
|
2538
|
+
clusters of hosts allowing for resource control of compute resources, load
|
|
2539
|
+
balancing through DRS, and high availability through vSphere HA.
|
|
2540
|
+
|
|
2541
|
+
For more information on vSphere clusters and DRS, see [this
|
|
2542
|
+
page][ref-vsphere-drs-clusters]. For more information on vSphere HA, see [this
|
|
2543
|
+
page][ref-vsphere-ha-clusters].
|
|
2544
|
+
|
|
2545
|
+
[ref-vsphere-drs-clusters]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-8ACF3502-5314-469F-8CC9-4A9BD5925BC2.html
|
|
2546
|
+
[ref-vsphere-ha-clusters]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-availability/GUID-5432CA24-14F1-44E3-87FB-61D937831CF6.html
|
|
2547
|
+
|
|
2548
|
+
> **NOTE:** This resource requires vCenter and is not available on
|
|
2549
|
+
direct ESXi connections.
|
|
2550
|
+
|
|
2551
|
+
## Import
|
|
2552
|
+
|
|
2553
|
+
An existing cluster can be imported into this resource via the
|
|
2554
|
+
|
|
2555
|
+
path to the cluster, via the following command:
|
|
2556
|
+
|
|
2557
|
+
hcl
|
|
2558
|
+
|
|
2559
|
+
variable "datacenter" {
|
|
2560
|
+
|
|
2561
|
+
default = "dc-01"
|
|
2562
|
+
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
data "vsphere_datacenter" "datacenter" {
|
|
2566
|
+
|
|
2567
|
+
name = var.datacenter
|
|
2568
|
+
|
|
2569
|
+
}
|
|
2570
|
+
|
|
2571
|
+
resource "vsphere_compute_cluster" "compute_cluster" {
|
|
2572
|
+
|
|
2573
|
+
name = "cluster-01"
|
|
2574
|
+
|
|
2575
|
+
datacenter_id = data.vsphere_datacenter.datacenter.id
|
|
2576
|
+
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2579
|
+
hcl
|
|
2580
|
+
|
|
2581
|
+
resource "vsphere_compute_cluster" "compute_cluster" {
|
|
2582
|
+
|
|
2583
|
+
name = "cluster-01"
|
|
2584
|
+
|
|
2585
|
+
datacenter_id = data.vsphere_datacenter.datacenter.id
|
|
2586
|
+
|
|
2587
|
+
vsan_enabled = true
|
|
2588
|
+
|
|
2589
|
+
vsan_performance_enabled = true
|
|
2590
|
+
|
|
2591
|
+
host_system_ids = [for host in data.vsphere_host.host : host.id]
|
|
2592
|
+
|
|
2593
|
+
dpm_automation_level = "automated"
|
|
2594
|
+
|
|
2595
|
+
drs_automation_level = "fullyAutomated"
|
|
2596
|
+
|
|
2597
|
+
drs_enabled = true
|
|
2598
|
+
|
|
2599
|
+
ha_datastore_apd_response = "restartConservative"
|
|
2600
|
+
|
|
2601
|
+
ha_datastore_pdl_response = "restartAggressive"
|
|
2602
|
+
|
|
2603
|
+
... etc.
|
|
2604
|
+
|
|
2605
|
+
console
|
|
2606
|
+
|
|
2607
|
+
```sh
|
|
2608
|
+
$ pulumi import vsphere:index/computeCluster:ComputeCluster compute_cluster /dc-01/host/cluster-01
|
|
2609
|
+
```
|
|
2610
|
+
|
|
2611
|
+
The above would import the cluster named `cluster-01` that is located in
|
|
2612
|
+
|
|
2613
|
+
the `dc-01` datacenter.
|
|
2614
|
+
|
|
2528
2615
|
:param str resource_name: The name of the resource.
|
|
2529
2616
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
2530
2617
|
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: A map of custom attribute ids to attribute
|
|
@@ -2651,7 +2738,94 @@ class ComputeCluster(pulumi.CustomResource):
|
|
|
2651
2738
|
args: ComputeClusterArgs,
|
|
2652
2739
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
2653
2740
|
"""
|
|
2654
|
-
|
|
2741
|
+
> **A note on the naming of this resource:** VMware refers to clusters of
|
|
2742
|
+
hosts in the UI and documentation as _clusters_, _HA clusters_, or _DRS
|
|
2743
|
+
clusters_. All of these refer to the same kind of resource (with the latter two
|
|
2744
|
+
referring to specific features of clustering). We use
|
|
2745
|
+
`ComputeCluster` to differentiate host clusters from _datastore
|
|
2746
|
+
clusters_, which are clusters of datastores that can be used to distribute load
|
|
2747
|
+
and ensure fault tolerance via distribution of virtual machines. Datastore
|
|
2748
|
+
clusters can also be managed through the provider, via the
|
|
2749
|
+
`DatastoreCluster` resource.
|
|
2750
|
+
|
|
2751
|
+
The `ComputeCluster` resource can be used to create and manage
|
|
2752
|
+
clusters of hosts allowing for resource control of compute resources, load
|
|
2753
|
+
balancing through DRS, and high availability through vSphere HA.
|
|
2754
|
+
|
|
2755
|
+
For more information on vSphere clusters and DRS, see [this
|
|
2756
|
+
page][ref-vsphere-drs-clusters]. For more information on vSphere HA, see [this
|
|
2757
|
+
page][ref-vsphere-ha-clusters].
|
|
2758
|
+
|
|
2759
|
+
[ref-vsphere-drs-clusters]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-8ACF3502-5314-469F-8CC9-4A9BD5925BC2.html
|
|
2760
|
+
[ref-vsphere-ha-clusters]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-availability/GUID-5432CA24-14F1-44E3-87FB-61D937831CF6.html
|
|
2761
|
+
|
|
2762
|
+
> **NOTE:** This resource requires vCenter and is not available on
|
|
2763
|
+
direct ESXi connections.
|
|
2764
|
+
|
|
2765
|
+
## Import
|
|
2766
|
+
|
|
2767
|
+
An existing cluster can be imported into this resource via the
|
|
2768
|
+
|
|
2769
|
+
path to the cluster, via the following command:
|
|
2770
|
+
|
|
2771
|
+
hcl
|
|
2772
|
+
|
|
2773
|
+
variable "datacenter" {
|
|
2774
|
+
|
|
2775
|
+
default = "dc-01"
|
|
2776
|
+
|
|
2777
|
+
}
|
|
2778
|
+
|
|
2779
|
+
data "vsphere_datacenter" "datacenter" {
|
|
2780
|
+
|
|
2781
|
+
name = var.datacenter
|
|
2782
|
+
|
|
2783
|
+
}
|
|
2784
|
+
|
|
2785
|
+
resource "vsphere_compute_cluster" "compute_cluster" {
|
|
2786
|
+
|
|
2787
|
+
name = "cluster-01"
|
|
2788
|
+
|
|
2789
|
+
datacenter_id = data.vsphere_datacenter.datacenter.id
|
|
2790
|
+
|
|
2791
|
+
}
|
|
2792
|
+
|
|
2793
|
+
hcl
|
|
2794
|
+
|
|
2795
|
+
resource "vsphere_compute_cluster" "compute_cluster" {
|
|
2796
|
+
|
|
2797
|
+
name = "cluster-01"
|
|
2798
|
+
|
|
2799
|
+
datacenter_id = data.vsphere_datacenter.datacenter.id
|
|
2800
|
+
|
|
2801
|
+
vsan_enabled = true
|
|
2802
|
+
|
|
2803
|
+
vsan_performance_enabled = true
|
|
2804
|
+
|
|
2805
|
+
host_system_ids = [for host in data.vsphere_host.host : host.id]
|
|
2806
|
+
|
|
2807
|
+
dpm_automation_level = "automated"
|
|
2808
|
+
|
|
2809
|
+
drs_automation_level = "fullyAutomated"
|
|
2810
|
+
|
|
2811
|
+
drs_enabled = true
|
|
2812
|
+
|
|
2813
|
+
ha_datastore_apd_response = "restartConservative"
|
|
2814
|
+
|
|
2815
|
+
ha_datastore_pdl_response = "restartAggressive"
|
|
2816
|
+
|
|
2817
|
+
... etc.
|
|
2818
|
+
|
|
2819
|
+
console
|
|
2820
|
+
|
|
2821
|
+
```sh
|
|
2822
|
+
$ pulumi import vsphere:index/computeCluster:ComputeCluster compute_cluster /dc-01/host/cluster-01
|
|
2823
|
+
```
|
|
2824
|
+
|
|
2825
|
+
The above would import the cluster named `cluster-01` that is located in
|
|
2826
|
+
|
|
2827
|
+
the `dc-01` datacenter.
|
|
2828
|
+
|
|
2655
2829
|
:param str resource_name: The name of the resource.
|
|
2656
2830
|
:param ComputeClusterArgs args: The arguments to use to populate this resource's properties.
|
|
2657
2831
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
{pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/compute_cluster_host_group.py
RENAMED
|
@@ -168,7 +168,37 @@ class ComputeClusterHostGroup(pulumi.CustomResource):
|
|
|
168
168
|
name: Optional[pulumi.Input[str]] = None,
|
|
169
169
|
__props__=None):
|
|
170
170
|
"""
|
|
171
|
-
|
|
171
|
+
The `ComputeClusterHostGroup` resource can be used to manage groups
|
|
172
|
+
of hosts in a cluster, either created by the
|
|
173
|
+
`ComputeCluster` resource or looked up
|
|
174
|
+
by the `ComputeCluster` data source.
|
|
175
|
+
|
|
176
|
+
This resource mainly serves as an input to the
|
|
177
|
+
`ComputeClusterVmHostRule`
|
|
178
|
+
resource - see the documentation for that resource for further details on how
|
|
179
|
+
to use host groups.
|
|
180
|
+
|
|
181
|
+
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
182
|
+
connections.
|
|
183
|
+
|
|
184
|
+
## Import
|
|
185
|
+
|
|
186
|
+
An existing group can be imported into this resource by
|
|
187
|
+
|
|
188
|
+
supplying both the path to the cluster, and the name of the host group. If the
|
|
189
|
+
|
|
190
|
+
name or cluster is not found, or if the group is of a different type, an error
|
|
191
|
+
|
|
192
|
+
will be returned. An example is below:
|
|
193
|
+
|
|
194
|
+
```sh
|
|
195
|
+
$ pulumi import vsphere:index/computeClusterHostGroup:ComputeClusterHostGroup cluster_host_group \\
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
'{"compute_cluster_path": "/dc1/host/cluster1", \\
|
|
199
|
+
|
|
200
|
+
"name": "pulumi-test-cluster-host-group"}'
|
|
201
|
+
|
|
172
202
|
:param str resource_name: The name of the resource.
|
|
173
203
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
174
204
|
:param pulumi.Input[str] compute_cluster_id: The managed object reference
|
|
@@ -191,7 +221,37 @@ class ComputeClusterHostGroup(pulumi.CustomResource):
|
|
|
191
221
|
args: ComputeClusterHostGroupArgs,
|
|
192
222
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
193
223
|
"""
|
|
194
|
-
|
|
224
|
+
The `ComputeClusterHostGroup` resource can be used to manage groups
|
|
225
|
+
of hosts in a cluster, either created by the
|
|
226
|
+
`ComputeCluster` resource or looked up
|
|
227
|
+
by the `ComputeCluster` data source.
|
|
228
|
+
|
|
229
|
+
This resource mainly serves as an input to the
|
|
230
|
+
`ComputeClusterVmHostRule`
|
|
231
|
+
resource - see the documentation for that resource for further details on how
|
|
232
|
+
to use host groups.
|
|
233
|
+
|
|
234
|
+
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
235
|
+
connections.
|
|
236
|
+
|
|
237
|
+
## Import
|
|
238
|
+
|
|
239
|
+
An existing group can be imported into this resource by
|
|
240
|
+
|
|
241
|
+
supplying both the path to the cluster, and the name of the host group. If the
|
|
242
|
+
|
|
243
|
+
name or cluster is not found, or if the group is of a different type, an error
|
|
244
|
+
|
|
245
|
+
will be returned. An example is below:
|
|
246
|
+
|
|
247
|
+
```sh
|
|
248
|
+
$ pulumi import vsphere:index/computeClusterHostGroup:ComputeClusterHostGroup cluster_host_group \\
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
'{"compute_cluster_path": "/dc1/host/cluster1", \\
|
|
252
|
+
|
|
253
|
+
"name": "pulumi-test-cluster-host-group"}'
|
|
254
|
+
|
|
195
255
|
:param str resource_name: The name of the resource.
|
|
196
256
|
:param ComputeClusterHostGroupArgs args: The arguments to use to populate this resource's properties.
|
|
197
257
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
{pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/compute_cluster_vm_affinity_rule.py
RENAMED
|
@@ -315,13 +315,24 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
|
|
|
315
315
|
virtual_machine_ids=[__item.id for __item in vms_get_virtual_machine])
|
|
316
316
|
```
|
|
317
317
|
|
|
318
|
-
##
|
|
318
|
+
## Import
|
|
319
319
|
|
|
320
320
|
An existing rule can be imported into this resource by supplying
|
|
321
|
+
|
|
321
322
|
both the path to the cluster, and the name the rule. If the name or cluster is
|
|
323
|
+
|
|
322
324
|
not found, or if the rule is of a different type, an error will be returned. An
|
|
325
|
+
|
|
323
326
|
example is below:
|
|
324
327
|
|
|
328
|
+
```sh
|
|
329
|
+
$ pulumi import vsphere:index/computeClusterVmAffinityRule:ComputeClusterVmAffinityRule vm_affinity_rule \\
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
'{"compute_cluster_path": "/dc-01/host/cluster-01", \\
|
|
333
|
+
|
|
334
|
+
"name": "vm-affinity-rule"}'
|
|
335
|
+
|
|
325
336
|
:param str resource_name: The name of the resource.
|
|
326
337
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
327
338
|
:param pulumi.Input[str] compute_cluster_id: The managed object reference
|
|
@@ -431,13 +442,24 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
|
|
|
431
442
|
virtual_machine_ids=[__item.id for __item in vms_get_virtual_machine])
|
|
432
443
|
```
|
|
433
444
|
|
|
434
|
-
##
|
|
445
|
+
## Import
|
|
435
446
|
|
|
436
447
|
An existing rule can be imported into this resource by supplying
|
|
448
|
+
|
|
437
449
|
both the path to the cluster, and the name the rule. If the name or cluster is
|
|
450
|
+
|
|
438
451
|
not found, or if the rule is of a different type, an error will be returned. An
|
|
452
|
+
|
|
439
453
|
example is below:
|
|
440
454
|
|
|
455
|
+
```sh
|
|
456
|
+
$ pulumi import vsphere:index/computeClusterVmAffinityRule:ComputeClusterVmAffinityRule vm_affinity_rule \\
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
'{"compute_cluster_path": "/dc-01/host/cluster-01", \\
|
|
460
|
+
|
|
461
|
+
"name": "vm-affinity-rule"}'
|
|
462
|
+
|
|
441
463
|
:param str resource_name: The name of the resource.
|
|
442
464
|
:param ComputeClusterVmAffinityRuleArgs args: The arguments to use to populate this resource's properties.
|
|
443
465
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -229,7 +229,24 @@ class ComputeClusterVmAntiAffinityRule(pulumi.CustomResource):
|
|
|
229
229
|
virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
230
230
|
__props__=None):
|
|
231
231
|
"""
|
|
232
|
-
|
|
232
|
+
## Import
|
|
233
|
+
|
|
234
|
+
An existing rule can be imported into this resource by supplying
|
|
235
|
+
|
|
236
|
+
both the path to the cluster, and the name the rule. If the name or cluster is
|
|
237
|
+
|
|
238
|
+
not found, or if the rule is of a different type, an error will be returned. An
|
|
239
|
+
|
|
240
|
+
example is below:
|
|
241
|
+
|
|
242
|
+
```sh
|
|
243
|
+
$ pulumi import vsphere:index/computeClusterVmAntiAffinityRule:ComputeClusterVmAntiAffinityRule vm_anti_affinity_rule \\
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
'{"compute_cluster_path": "/dc-01/host/cluster-01", \\
|
|
247
|
+
|
|
248
|
+
"name": "vm-anti-affinity-rule"}'
|
|
249
|
+
|
|
233
250
|
:param str resource_name: The name of the resource.
|
|
234
251
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
235
252
|
:param pulumi.Input[str] compute_cluster_id: The managed object reference
|
|
@@ -253,7 +270,24 @@ class ComputeClusterVmAntiAffinityRule(pulumi.CustomResource):
|
|
|
253
270
|
args: ComputeClusterVmAntiAffinityRuleArgs,
|
|
254
271
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
255
272
|
"""
|
|
256
|
-
|
|
273
|
+
## Import
|
|
274
|
+
|
|
275
|
+
An existing rule can be imported into this resource by supplying
|
|
276
|
+
|
|
277
|
+
both the path to the cluster, and the name the rule. If the name or cluster is
|
|
278
|
+
|
|
279
|
+
not found, or if the rule is of a different type, an error will be returned. An
|
|
280
|
+
|
|
281
|
+
example is below:
|
|
282
|
+
|
|
283
|
+
```sh
|
|
284
|
+
$ pulumi import vsphere:index/computeClusterVmAntiAffinityRule:ComputeClusterVmAntiAffinityRule vm_anti_affinity_rule \\
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
'{"compute_cluster_path": "/dc-01/host/cluster-01", \\
|
|
288
|
+
|
|
289
|
+
"name": "vm-anti-affinity-rule"}'
|
|
290
|
+
|
|
257
291
|
:param str resource_name: The name of the resource.
|
|
258
292
|
:param ComputeClusterVmAntiAffinityRuleArgs args: The arguments to use to populate this resource's properties.
|
|
259
293
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
{pulumi_vsphere-4.11.2 → pulumi_vsphere-4.11.3}/pulumi_vsphere/compute_cluster_vm_dependency_rule.py
RENAMED
|
@@ -285,7 +285,106 @@ class ComputeClusterVmDependencyRule(pulumi.CustomResource):
|
|
|
285
285
|
vm_group_name: Optional[pulumi.Input[str]] = None,
|
|
286
286
|
__props__=None):
|
|
287
287
|
"""
|
|
288
|
-
|
|
288
|
+
The `ComputeClusterVmDependencyRule` resource can be used to manage
|
|
289
|
+
VM dependency rules in a cluster, either created by the
|
|
290
|
+
`ComputeCluster` resource or looked up
|
|
291
|
+
by the `ComputeCluster` data source.
|
|
292
|
+
|
|
293
|
+
A virtual machine dependency rule applies to vSphere HA, and allows
|
|
294
|
+
user-defined startup orders for virtual machines in the case of host failure.
|
|
295
|
+
Virtual machines are supplied via groups, which can be managed via the
|
|
296
|
+
`ComputeClusterVmGroup`
|
|
297
|
+
resource.
|
|
298
|
+
|
|
299
|
+
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
300
|
+
connections.
|
|
301
|
+
|
|
302
|
+
## Example Usage
|
|
303
|
+
|
|
304
|
+
The example below creates two virtual machine in a cluster using the
|
|
305
|
+
`VirtualMachine` resource in a cluster
|
|
306
|
+
looked up by the `ComputeCluster`
|
|
307
|
+
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`.
|
|
308
|
+
|
|
309
|
+
> Note how `dependency_vm_group_name` and
|
|
310
|
+
`vm_group_name` are sourced off of the `name` attributes from
|
|
311
|
+
the `ComputeClusterVmGroup`
|
|
312
|
+
resource. This is to ensure that the rule is not created before the groups
|
|
313
|
+
exist, which may not possibly happen in the event that the names came from a
|
|
314
|
+
"static" source such as a variable.
|
|
315
|
+
|
|
316
|
+
```python
|
|
317
|
+
import pulumi
|
|
318
|
+
import pulumi_vsphere as vsphere
|
|
319
|
+
|
|
320
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
321
|
+
datastore = vsphere.get_datastore(name="datastore1",
|
|
322
|
+
datacenter_id=datacenter.id)
|
|
323
|
+
cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
324
|
+
datacenter_id=datacenter.id)
|
|
325
|
+
network = vsphere.get_network(name="network1",
|
|
326
|
+
datacenter_id=datacenter.id)
|
|
327
|
+
vm1 = vsphere.VirtualMachine("vm1",
|
|
328
|
+
name="test1",
|
|
329
|
+
resource_pool_id=cluster.resource_pool_id,
|
|
330
|
+
datastore_id=datastore.id,
|
|
331
|
+
num_cpus=2,
|
|
332
|
+
memory=2048,
|
|
333
|
+
guest_id="otherLinux64Guest",
|
|
334
|
+
network_interfaces=[{
|
|
335
|
+
"network_id": network.id,
|
|
336
|
+
}],
|
|
337
|
+
disks=[{
|
|
338
|
+
"label": "disk0",
|
|
339
|
+
"size": 20,
|
|
340
|
+
}])
|
|
341
|
+
vm2 = vsphere.VirtualMachine("vm2",
|
|
342
|
+
name="test2",
|
|
343
|
+
resource_pool_id=cluster.resource_pool_id,
|
|
344
|
+
datastore_id=datastore.id,
|
|
345
|
+
num_cpus=2,
|
|
346
|
+
memory=2048,
|
|
347
|
+
guest_id="otherLinux64Guest",
|
|
348
|
+
network_interfaces=[{
|
|
349
|
+
"network_id": network.id,
|
|
350
|
+
}],
|
|
351
|
+
disks=[{
|
|
352
|
+
"label": "disk0",
|
|
353
|
+
"size": 20,
|
|
354
|
+
}])
|
|
355
|
+
cluster_vm_group1 = vsphere.ComputeClusterVmGroup("cluster_vm_group1",
|
|
356
|
+
name="test-cluster-vm-group1",
|
|
357
|
+
compute_cluster_id=cluster.id,
|
|
358
|
+
virtual_machine_ids=[vm1.id])
|
|
359
|
+
cluster_vm_group2 = vsphere.ComputeClusterVmGroup("cluster_vm_group2",
|
|
360
|
+
name="test-cluster-vm-group2",
|
|
361
|
+
compute_cluster_id=cluster.id,
|
|
362
|
+
virtual_machine_ids=[vm2.id])
|
|
363
|
+
cluster_vm_dependency_rule = vsphere.ComputeClusterVmDependencyRule("cluster_vm_dependency_rule",
|
|
364
|
+
compute_cluster_id=cluster.id,
|
|
365
|
+
name="test-cluster-vm-dependency-rule",
|
|
366
|
+
dependency_vm_group_name=cluster_vm_group1.name,
|
|
367
|
+
vm_group_name=cluster_vm_group2.name)
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
## Import
|
|
371
|
+
|
|
372
|
+
An existing rule can be imported into this resource by supplying
|
|
373
|
+
|
|
374
|
+
both the path to the cluster, and the name the rule. If the name or cluster is
|
|
375
|
+
|
|
376
|
+
not found, or if the rule is of a different type, an error will be returned. An
|
|
377
|
+
|
|
378
|
+
example is below:
|
|
379
|
+
|
|
380
|
+
```sh
|
|
381
|
+
$ pulumi import vsphere:index/computeClusterVmDependencyRule:ComputeClusterVmDependencyRule cluster_vm_dependency_rule \\
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
'{"compute_cluster_path": "/dc1/host/cluster1", \\
|
|
385
|
+
|
|
386
|
+
"name": "pulumi-test-cluster-vm-dependency-rule"}'
|
|
387
|
+
|
|
289
388
|
:param str resource_name: The name of the resource.
|
|
290
389
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
291
390
|
:param pulumi.Input[str] compute_cluster_id: The managed object reference
|
|
@@ -316,7 +415,106 @@ class ComputeClusterVmDependencyRule(pulumi.CustomResource):
|
|
|
316
415
|
args: ComputeClusterVmDependencyRuleArgs,
|
|
317
416
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
318
417
|
"""
|
|
319
|
-
|
|
418
|
+
The `ComputeClusterVmDependencyRule` resource can be used to manage
|
|
419
|
+
VM dependency rules in a cluster, either created by the
|
|
420
|
+
`ComputeCluster` resource or looked up
|
|
421
|
+
by the `ComputeCluster` data source.
|
|
422
|
+
|
|
423
|
+
A virtual machine dependency rule applies to vSphere HA, and allows
|
|
424
|
+
user-defined startup orders for virtual machines in the case of host failure.
|
|
425
|
+
Virtual machines are supplied via groups, which can be managed via the
|
|
426
|
+
`ComputeClusterVmGroup`
|
|
427
|
+
resource.
|
|
428
|
+
|
|
429
|
+
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
430
|
+
connections.
|
|
431
|
+
|
|
432
|
+
## Example Usage
|
|
433
|
+
|
|
434
|
+
The example below creates two virtual machine in a cluster using the
|
|
435
|
+
`VirtualMachine` resource in a cluster
|
|
436
|
+
looked up by the `ComputeCluster`
|
|
437
|
+
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`.
|
|
438
|
+
|
|
439
|
+
> Note how `dependency_vm_group_name` and
|
|
440
|
+
`vm_group_name` are sourced off of the `name` attributes from
|
|
441
|
+
the `ComputeClusterVmGroup`
|
|
442
|
+
resource. This is to ensure that the rule is not created before the groups
|
|
443
|
+
exist, which may not possibly happen in the event that the names came from a
|
|
444
|
+
"static" source such as a variable.
|
|
445
|
+
|
|
446
|
+
```python
|
|
447
|
+
import pulumi
|
|
448
|
+
import pulumi_vsphere as vsphere
|
|
449
|
+
|
|
450
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
451
|
+
datastore = vsphere.get_datastore(name="datastore1",
|
|
452
|
+
datacenter_id=datacenter.id)
|
|
453
|
+
cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
454
|
+
datacenter_id=datacenter.id)
|
|
455
|
+
network = vsphere.get_network(name="network1",
|
|
456
|
+
datacenter_id=datacenter.id)
|
|
457
|
+
vm1 = vsphere.VirtualMachine("vm1",
|
|
458
|
+
name="test1",
|
|
459
|
+
resource_pool_id=cluster.resource_pool_id,
|
|
460
|
+
datastore_id=datastore.id,
|
|
461
|
+
num_cpus=2,
|
|
462
|
+
memory=2048,
|
|
463
|
+
guest_id="otherLinux64Guest",
|
|
464
|
+
network_interfaces=[{
|
|
465
|
+
"network_id": network.id,
|
|
466
|
+
}],
|
|
467
|
+
disks=[{
|
|
468
|
+
"label": "disk0",
|
|
469
|
+
"size": 20,
|
|
470
|
+
}])
|
|
471
|
+
vm2 = vsphere.VirtualMachine("vm2",
|
|
472
|
+
name="test2",
|
|
473
|
+
resource_pool_id=cluster.resource_pool_id,
|
|
474
|
+
datastore_id=datastore.id,
|
|
475
|
+
num_cpus=2,
|
|
476
|
+
memory=2048,
|
|
477
|
+
guest_id="otherLinux64Guest",
|
|
478
|
+
network_interfaces=[{
|
|
479
|
+
"network_id": network.id,
|
|
480
|
+
}],
|
|
481
|
+
disks=[{
|
|
482
|
+
"label": "disk0",
|
|
483
|
+
"size": 20,
|
|
484
|
+
}])
|
|
485
|
+
cluster_vm_group1 = vsphere.ComputeClusterVmGroup("cluster_vm_group1",
|
|
486
|
+
name="test-cluster-vm-group1",
|
|
487
|
+
compute_cluster_id=cluster.id,
|
|
488
|
+
virtual_machine_ids=[vm1.id])
|
|
489
|
+
cluster_vm_group2 = vsphere.ComputeClusterVmGroup("cluster_vm_group2",
|
|
490
|
+
name="test-cluster-vm-group2",
|
|
491
|
+
compute_cluster_id=cluster.id,
|
|
492
|
+
virtual_machine_ids=[vm2.id])
|
|
493
|
+
cluster_vm_dependency_rule = vsphere.ComputeClusterVmDependencyRule("cluster_vm_dependency_rule",
|
|
494
|
+
compute_cluster_id=cluster.id,
|
|
495
|
+
name="test-cluster-vm-dependency-rule",
|
|
496
|
+
dependency_vm_group_name=cluster_vm_group1.name,
|
|
497
|
+
vm_group_name=cluster_vm_group2.name)
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
## Import
|
|
501
|
+
|
|
502
|
+
An existing rule can be imported into this resource by supplying
|
|
503
|
+
|
|
504
|
+
both the path to the cluster, and the name the rule. If the name or cluster is
|
|
505
|
+
|
|
506
|
+
not found, or if the rule is of a different type, an error will be returned. An
|
|
507
|
+
|
|
508
|
+
example is below:
|
|
509
|
+
|
|
510
|
+
```sh
|
|
511
|
+
$ pulumi import vsphere:index/computeClusterVmDependencyRule:ComputeClusterVmDependencyRule cluster_vm_dependency_rule \\
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
'{"compute_cluster_path": "/dc1/host/cluster1", \\
|
|
515
|
+
|
|
516
|
+
"name": "pulumi-test-cluster-vm-dependency-rule"}'
|
|
517
|
+
|
|
320
518
|
:param str resource_name: The name of the resource.
|
|
321
519
|
:param ComputeClusterVmDependencyRuleArgs args: The arguments to use to populate this resource's properties.
|
|
322
520
|
:param pulumi.ResourceOptions opts: Options for the resource.
|