pulumi-vsphere 4.10.0a1710245029__py3-none-any.whl → 4.13.0a1736849827__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.
Files changed (85) hide show
  1. pulumi_vsphere/__init__.py +28 -0
  2. pulumi_vsphere/_inputs.py +1816 -277
  3. pulumi_vsphere/_utilities.py +41 -5
  4. pulumi_vsphere/compute_cluster.py +937 -1488
  5. pulumi_vsphere/compute_cluster_host_group.py +67 -2
  6. pulumi_vsphere/compute_cluster_vm_affinity_rule.py +69 -34
  7. pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +41 -2
  8. pulumi_vsphere/compute_cluster_vm_dependency_rule.py +205 -2
  9. pulumi_vsphere/compute_cluster_vm_group.py +198 -2
  10. pulumi_vsphere/compute_cluster_vm_host_rule.py +73 -2
  11. pulumi_vsphere/config/__init__.pyi +5 -0
  12. pulumi_vsphere/config/vars.py +5 -0
  13. pulumi_vsphere/content_library.py +113 -12
  14. pulumi_vsphere/content_library_item.py +143 -2
  15. pulumi_vsphere/custom_attribute.py +77 -2
  16. pulumi_vsphere/datacenter.py +48 -40
  17. pulumi_vsphere/datastore_cluster.py +217 -366
  18. pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +159 -2
  19. pulumi_vsphere/distributed_port_group.py +416 -189
  20. pulumi_vsphere/distributed_virtual_switch.py +571 -830
  21. pulumi_vsphere/dpm_host_override.py +63 -2
  22. pulumi_vsphere/drs_vm_override.py +67 -2
  23. pulumi_vsphere/entity_permissions.py +64 -38
  24. pulumi_vsphere/file.py +21 -24
  25. pulumi_vsphere/folder.py +148 -30
  26. pulumi_vsphere/get_compute_cluster.py +16 -9
  27. pulumi_vsphere/get_compute_cluster_host_group.py +36 -25
  28. pulumi_vsphere/get_content_library.py +23 -15
  29. pulumi_vsphere/get_content_library_item.py +29 -13
  30. pulumi_vsphere/get_custom_attribute.py +14 -9
  31. pulumi_vsphere/get_datacenter.py +30 -12
  32. pulumi_vsphere/get_datastore.py +29 -21
  33. pulumi_vsphere/get_datastore_cluster.py +31 -10
  34. pulumi_vsphere/get_datastore_stats.py +63 -57
  35. pulumi_vsphere/get_distributed_virtual_switch.py +18 -9
  36. pulumi_vsphere/get_dynamic.py +35 -25
  37. pulumi_vsphere/get_folder.py +23 -11
  38. pulumi_vsphere/get_guest_os_customization.py +26 -52
  39. pulumi_vsphere/get_host.py +16 -9
  40. pulumi_vsphere/get_host_base_images.py +104 -0
  41. pulumi_vsphere/get_host_pci_device.py +28 -19
  42. pulumi_vsphere/get_host_thumbprint.py +41 -25
  43. pulumi_vsphere/get_host_vgpu_profile.py +20 -15
  44. pulumi_vsphere/get_license.py +20 -10
  45. pulumi_vsphere/get_network.py +80 -24
  46. pulumi_vsphere/get_ovf_vm_template.py +56 -5
  47. pulumi_vsphere/get_policy.py +13 -9
  48. pulumi_vsphere/get_resource_pool.py +29 -23
  49. pulumi_vsphere/get_role.py +23 -13
  50. pulumi_vsphere/get_tag.py +16 -9
  51. pulumi_vsphere/get_tag_category.py +16 -9
  52. pulumi_vsphere/get_vapp_container.py +15 -9
  53. pulumi_vsphere/get_virtual_machine.py +205 -48
  54. pulumi_vsphere/get_vmfs_disks.py +18 -9
  55. pulumi_vsphere/guest_os_customization.py +60 -5
  56. pulumi_vsphere/ha_vm_override.py +352 -380
  57. pulumi_vsphere/host.py +244 -64
  58. pulumi_vsphere/host_port_group.py +27 -24
  59. pulumi_vsphere/host_virtual_switch.py +209 -289
  60. pulumi_vsphere/license.py +5 -32
  61. pulumi_vsphere/nas_datastore.py +74 -9
  62. pulumi_vsphere/offline_software_depot.py +185 -0
  63. pulumi_vsphere/outputs.py +717 -270
  64. pulumi_vsphere/provider.py +7 -6
  65. pulumi_vsphere/pulumi-plugin.json +2 -1
  66. pulumi_vsphere/resource_pool.py +168 -411
  67. pulumi_vsphere/role.py +33 -2
  68. pulumi_vsphere/storage_drs_vm_override.py +133 -2
  69. pulumi_vsphere/supervisor.py +967 -0
  70. pulumi_vsphere/tag.py +159 -2
  71. pulumi_vsphere/tag_category.py +83 -2
  72. pulumi_vsphere/vapp_container.py +163 -2
  73. pulumi_vsphere/vapp_entity.py +147 -2
  74. pulumi_vsphere/virtual_disk.py +123 -36
  75. pulumi_vsphere/virtual_machine.py +698 -829
  76. pulumi_vsphere/virtual_machine_class.py +447 -0
  77. pulumi_vsphere/virtual_machine_snapshot.py +13 -12
  78. pulumi_vsphere/vm_storage_policy.py +120 -127
  79. pulumi_vsphere/vmfs_datastore.py +271 -2
  80. pulumi_vsphere/vnic.py +104 -105
  81. {pulumi_vsphere-4.10.0a1710245029.dist-info → pulumi_vsphere-4.13.0a1736849827.dist-info}/METADATA +7 -6
  82. pulumi_vsphere-4.13.0a1736849827.dist-info/RECORD +86 -0
  83. {pulumi_vsphere-4.10.0a1710245029.dist-info → pulumi_vsphere-4.13.0a1736849827.dist-info}/WHEEL +1 -1
  84. pulumi_vsphere-4.10.0a1710245029.dist-info/RECORD +0 -82
  85. {pulumi_vsphere-4.10.0a1710245029.dist-info → pulumi_vsphere-4.13.0a1736849827.dist-info}/top_level.txt +0 -0
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
 
12
17
  __all__ = ['DatastoreClusterVmAntiAffinityRuleArgs', 'DatastoreClusterVmAntiAffinityRule']
@@ -221,7 +226,83 @@ class DatastoreClusterVmAntiAffinityRule(pulumi.CustomResource):
221
226
  virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
222
227
  __props__=None):
223
228
  """
224
- Create a DatastoreClusterVmAntiAffinityRule resource with the given unique name, props, and options.
229
+ The `DatastoreClusterVmAntiAffinityRule` resource can be used to
230
+ manage VM anti-affinity rules in a datastore cluster, either created by the
231
+ `DatastoreCluster` resource or looked up
232
+ by the `DatastoreCluster` data source.
233
+
234
+ This rule can be used to tell a set to virtual machines to run on different
235
+ datastores within a cluster, useful for preventing single points of failure in
236
+ application cluster scenarios. When configured, Storage DRS will make a best effort to
237
+ ensure that the virtual machines run on different datastores, or prevent any
238
+ operation that would keep that from happening, depending on the value of the
239
+ `mandatory` flag.
240
+
241
+ > **NOTE:** This resource requires vCenter and is not available on direct ESXi
242
+ connections.
243
+
244
+ > **NOTE:** Storage DRS requires a vSphere Enterprise Plus license.
245
+
246
+ ## Example Usage
247
+
248
+ The example below creates two virtual machines in a cluster using the
249
+ `VirtualMachine` resource, creating the
250
+ virtual machines in the datastore cluster looked up by the
251
+ `DatastoreCluster` data
252
+ source. It then creates an anti-affinity rule for these two virtual machines,
253
+ ensuring they will run on different datastores whenever possible.
254
+
255
+ ```python
256
+ import pulumi
257
+ import pulumi_vsphere as vsphere
258
+
259
+ datacenter = vsphere.get_datacenter(name="dc-01")
260
+ datastore_cluster = vsphere.get_datastore_cluster(name="datastore-cluster1",
261
+ datacenter_id=datacenter.id)
262
+ cluster = vsphere.get_compute_cluster(name="cluster-01",
263
+ datacenter_id=datacenter.id)
264
+ network = vsphere.get_network(name="network1",
265
+ datacenter_id=datacenter.id)
266
+ vm = []
267
+ for range in [{"value": i} for i in range(0, 2)]:
268
+ vm.append(vsphere.VirtualMachine(f"vm-{range['value']}",
269
+ name=f"test-{range['value']}",
270
+ resource_pool_id=cluster.resource_pool_id,
271
+ datastore_cluster_id=datastore_cluster.id,
272
+ num_cpus=2,
273
+ memory=2048,
274
+ guest_id="otherLinux64Guest",
275
+ network_interfaces=[{
276
+ "network_id": network.id,
277
+ }],
278
+ disks=[{
279
+ "label": "disk0",
280
+ "size": 20,
281
+ }]))
282
+ cluster_vm_anti_affinity_rule = vsphere.DatastoreClusterVmAntiAffinityRule("cluster_vm_anti_affinity_rule",
283
+ name="test-datastore-cluster-vm-anti-affinity-rule",
284
+ datastore_cluster_id=datastore_cluster.id,
285
+ virtual_machine_ids=[[__item.id for __item in vm]])
286
+ ```
287
+
288
+ ## Import
289
+
290
+ An existing rule can be imported into this resource by supplying
291
+
292
+ both the path to the cluster, and the name the rule. If the name or cluster is
293
+
294
+ not found, or if the rule is of a different type, an error will be returned. An
295
+
296
+ example is below:
297
+
298
+ ```sh
299
+ $ pulumi import vsphere:index/datastoreClusterVmAntiAffinityRule:DatastoreClusterVmAntiAffinityRule cluster_vm_anti_affinity_rule \\
300
+ ```
301
+
302
+ '{"compute_cluster_path": "/dc1/datastore/cluster1", \\
303
+
304
+ "name": "pulumi-test-datastore-cluster-vm-anti-affinity-rule"}'
305
+
225
306
  :param str resource_name: The name of the resource.
226
307
  :param pulumi.ResourceOptions opts: Options for the resource.
227
308
  :param pulumi.Input[str] datastore_cluster_id: The managed object reference
@@ -243,7 +324,83 @@ class DatastoreClusterVmAntiAffinityRule(pulumi.CustomResource):
243
324
  args: DatastoreClusterVmAntiAffinityRuleArgs,
244
325
  opts: Optional[pulumi.ResourceOptions] = None):
245
326
  """
246
- Create a DatastoreClusterVmAntiAffinityRule resource with the given unique name, props, and options.
327
+ The `DatastoreClusterVmAntiAffinityRule` resource can be used to
328
+ manage VM anti-affinity rules in a datastore cluster, either created by the
329
+ `DatastoreCluster` resource or looked up
330
+ by the `DatastoreCluster` data source.
331
+
332
+ This rule can be used to tell a set to virtual machines to run on different
333
+ datastores within a cluster, useful for preventing single points of failure in
334
+ application cluster scenarios. When configured, Storage DRS will make a best effort to
335
+ ensure that the virtual machines run on different datastores, or prevent any
336
+ operation that would keep that from happening, depending on the value of the
337
+ `mandatory` flag.
338
+
339
+ > **NOTE:** This resource requires vCenter and is not available on direct ESXi
340
+ connections.
341
+
342
+ > **NOTE:** Storage DRS requires a vSphere Enterprise Plus license.
343
+
344
+ ## Example Usage
345
+
346
+ The example below creates two virtual machines in a cluster using the
347
+ `VirtualMachine` resource, creating the
348
+ virtual machines in the datastore cluster looked up by the
349
+ `DatastoreCluster` data
350
+ source. It then creates an anti-affinity rule for these two virtual machines,
351
+ ensuring they will run on different datastores whenever possible.
352
+
353
+ ```python
354
+ import pulumi
355
+ import pulumi_vsphere as vsphere
356
+
357
+ datacenter = vsphere.get_datacenter(name="dc-01")
358
+ datastore_cluster = vsphere.get_datastore_cluster(name="datastore-cluster1",
359
+ datacenter_id=datacenter.id)
360
+ cluster = vsphere.get_compute_cluster(name="cluster-01",
361
+ datacenter_id=datacenter.id)
362
+ network = vsphere.get_network(name="network1",
363
+ datacenter_id=datacenter.id)
364
+ vm = []
365
+ for range in [{"value": i} for i in range(0, 2)]:
366
+ vm.append(vsphere.VirtualMachine(f"vm-{range['value']}",
367
+ name=f"test-{range['value']}",
368
+ resource_pool_id=cluster.resource_pool_id,
369
+ datastore_cluster_id=datastore_cluster.id,
370
+ num_cpus=2,
371
+ memory=2048,
372
+ guest_id="otherLinux64Guest",
373
+ network_interfaces=[{
374
+ "network_id": network.id,
375
+ }],
376
+ disks=[{
377
+ "label": "disk0",
378
+ "size": 20,
379
+ }]))
380
+ cluster_vm_anti_affinity_rule = vsphere.DatastoreClusterVmAntiAffinityRule("cluster_vm_anti_affinity_rule",
381
+ name="test-datastore-cluster-vm-anti-affinity-rule",
382
+ datastore_cluster_id=datastore_cluster.id,
383
+ virtual_machine_ids=[[__item.id for __item in vm]])
384
+ ```
385
+
386
+ ## Import
387
+
388
+ An existing rule can be imported into this resource by supplying
389
+
390
+ both the path to the cluster, and the name the rule. If the name or cluster is
391
+
392
+ not found, or if the rule is of a different type, an error will be returned. An
393
+
394
+ example is below:
395
+
396
+ ```sh
397
+ $ pulumi import vsphere:index/datastoreClusterVmAntiAffinityRule:DatastoreClusterVmAntiAffinityRule cluster_vm_anti_affinity_rule \\
398
+ ```
399
+
400
+ '{"compute_cluster_path": "/dc1/datastore/cluster1", \\
401
+
402
+ "name": "pulumi-test-datastore-cluster-vm-anti-affinity-rule"}'
403
+
247
404
  :param str resource_name: The name of the resource.
248
405
  :param DatastoreClusterVmAntiAffinityRuleArgs args: The arguments to use to populate this resource's properties.
249
406
  :param pulumi.ResourceOptions opts: Options for the resource.