pulumi-vsphere 4.10.0a1710245029__py3-none-any.whl → 4.10.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pulumi-vsphere might be problematic. Click here for more details.

Files changed (52) hide show
  1. pulumi_vsphere/_inputs.py +96 -230
  2. pulumi_vsphere/compute_cluster.py +700 -1477
  3. pulumi_vsphere/compute_cluster_vm_affinity_rule.py +28 -16
  4. pulumi_vsphere/datacenter.py +26 -12
  5. pulumi_vsphere/datastore_cluster.py +154 -350
  6. pulumi_vsphere/distributed_port_group.py +70 -175
  7. pulumi_vsphere/distributed_virtual_switch.py +308 -805
  8. pulumi_vsphere/file.py +16 -24
  9. pulumi_vsphere/get_compute_cluster.py +0 -4
  10. pulumi_vsphere/get_compute_cluster_host_group.py +8 -10
  11. pulumi_vsphere/get_content_library.py +0 -4
  12. pulumi_vsphere/get_custom_attribute.py +0 -4
  13. pulumi_vsphere/get_datacenter.py +0 -4
  14. pulumi_vsphere/get_datastore.py +0 -4
  15. pulumi_vsphere/get_datastore_cluster.py +0 -4
  16. pulumi_vsphere/get_datastore_stats.py +4 -12
  17. pulumi_vsphere/get_distributed_virtual_switch.py +2 -4
  18. pulumi_vsphere/get_dynamic.py +4 -8
  19. pulumi_vsphere/get_folder.py +0 -4
  20. pulumi_vsphere/get_guest_os_customization.py +0 -4
  21. pulumi_vsphere/get_host.py +0 -4
  22. pulumi_vsphere/get_host_pci_device.py +4 -12
  23. pulumi_vsphere/get_host_thumbprint.py +0 -4
  24. pulumi_vsphere/get_host_vgpu_profile.py +0 -8
  25. pulumi_vsphere/get_license.py +0 -4
  26. pulumi_vsphere/get_network.py +0 -4
  27. pulumi_vsphere/get_policy.py +0 -4
  28. pulumi_vsphere/get_resource_pool.py +2 -10
  29. pulumi_vsphere/get_role.py +0 -4
  30. pulumi_vsphere/get_tag.py +0 -4
  31. pulumi_vsphere/get_tag_category.py +0 -4
  32. pulumi_vsphere/get_vapp_container.py +0 -4
  33. pulumi_vsphere/get_virtual_machine.py +0 -8
  34. pulumi_vsphere/get_vmfs_disks.py +0 -4
  35. pulumi_vsphere/guest_os_customization.py +50 -0
  36. pulumi_vsphere/ha_vm_override.py +189 -378
  37. pulumi_vsphere/host.py +0 -20
  38. pulumi_vsphere/host_port_group.py +12 -24
  39. pulumi_vsphere/host_virtual_switch.py +140 -287
  40. pulumi_vsphere/license.py +0 -32
  41. pulumi_vsphere/outputs.py +96 -230
  42. pulumi_vsphere/resource_pool.py +48 -22
  43. pulumi_vsphere/virtual_disk.py +10 -10
  44. pulumi_vsphere/virtual_machine.py +578 -807
  45. pulumi_vsphere/virtual_machine_snapshot.py +6 -10
  46. pulumi_vsphere/vm_storage_policy.py +72 -84
  47. pulumi_vsphere/vnic.py +8 -20
  48. {pulumi_vsphere-4.10.0a1710245029.dist-info → pulumi_vsphere-4.10.1.dist-info}/METADATA +1 -1
  49. pulumi_vsphere-4.10.1.dist-info/RECORD +82 -0
  50. pulumi_vsphere-4.10.0a1710245029.dist-info/RECORD +0 -82
  51. {pulumi_vsphere-4.10.0a1710245029.dist-info → pulumi_vsphere-4.10.1.dist-info}/WHEEL +0 -0
  52. {pulumi_vsphere-4.10.0a1710245029.dist-info → pulumi_vsphere-4.10.1.dist-info}/top_level.txt +0 -0
@@ -260,7 +260,6 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
260
260
  then creates an affinity rule for these two virtual machines, ensuring they
261
261
  will run on the same host whenever possible.
262
262
 
263
- <!--Start PulumiCodeChooser -->
264
263
  ```python
265
264
  import pulumi
266
265
  import pulumi_vsphere as vsphere
@@ -275,6 +274,7 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
275
274
  vm = []
276
275
  for range in [{"value": i} for i in range(0, 2)]:
277
276
  vm.append(vsphere.VirtualMachine(f"vm-{range['value']}",
277
+ name=f"foo-{range['value']}",
278
278
  resource_pool_id=cluster.resource_pool_id,
279
279
  datastore_id=datastore.id,
280
280
  num_cpus=1,
@@ -287,17 +287,16 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
287
287
  label="disk0",
288
288
  size=20,
289
289
  )]))
290
- vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vmAffinityRule",
290
+ vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vm_affinity_rule",
291
+ name="vm-affinity-rule",
291
292
  compute_cluster_id=cluster.id,
292
293
  virtual_machine_ids=[v.id for k, v in vm])
293
294
  ```
294
- <!--End PulumiCodeChooser -->
295
295
 
296
296
  The following example creates an affinity rule for a set of virtual machines
297
297
  in the cluster by looking up the virtual machine UUIDs from the
298
298
  `VirtualMachine` data source.
299
299
 
300
- <!--Start PulumiCodeChooser -->
301
300
  ```python
302
301
  import pulumi
303
302
  import pulumi_vsphere as vsphere
@@ -309,14 +308,21 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
309
308
  datacenter = vsphere.get_datacenter(name="dc-01")
310
309
  cluster = vsphere.get_compute_cluster(name="cluster-01",
311
310
  datacenter_id=datacenter.id)
312
- vms_virtual_machine = [vsphere.get_virtual_machine(name=vms[__index],
311
+ vms_get_virtual_machine = [vsphere.get_virtual_machine(name=vms[__index],
313
312
  datacenter_id=datacenter.id) for __index in range(len(vms))]
314
- vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vmAffinityRule",
313
+ vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vm_affinity_rule",
314
+ name="vm-affinity-rule",
315
315
  enabled=True,
316
316
  compute_cluster_id=cluster.id,
317
- virtual_machine_ids=[__item.id for __item in vms_virtual_machine])
317
+ virtual_machine_ids=[__item.id for __item in vms_get_virtual_machine])
318
318
  ```
319
- <!--End PulumiCodeChooser -->
319
+
320
+ ## Importing
321
+
322
+ An existing rule can be imported into this resource by supplying
323
+ both the path to the cluster, and the name the rule. If the name or cluster is
324
+ not found, or if the rule is of a different type, an error will be returned. An
325
+ example is below:
320
326
 
321
327
  :param str resource_name: The name of the resource.
322
328
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -372,7 +378,6 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
372
378
  then creates an affinity rule for these two virtual machines, ensuring they
373
379
  will run on the same host whenever possible.
374
380
 
375
- <!--Start PulumiCodeChooser -->
376
381
  ```python
377
382
  import pulumi
378
383
  import pulumi_vsphere as vsphere
@@ -387,6 +392,7 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
387
392
  vm = []
388
393
  for range in [{"value": i} for i in range(0, 2)]:
389
394
  vm.append(vsphere.VirtualMachine(f"vm-{range['value']}",
395
+ name=f"foo-{range['value']}",
390
396
  resource_pool_id=cluster.resource_pool_id,
391
397
  datastore_id=datastore.id,
392
398
  num_cpus=1,
@@ -399,17 +405,16 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
399
405
  label="disk0",
400
406
  size=20,
401
407
  )]))
402
- vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vmAffinityRule",
408
+ vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vm_affinity_rule",
409
+ name="vm-affinity-rule",
403
410
  compute_cluster_id=cluster.id,
404
411
  virtual_machine_ids=[v.id for k, v in vm])
405
412
  ```
406
- <!--End PulumiCodeChooser -->
407
413
 
408
414
  The following example creates an affinity rule for a set of virtual machines
409
415
  in the cluster by looking up the virtual machine UUIDs from the
410
416
  `VirtualMachine` data source.
411
417
 
412
- <!--Start PulumiCodeChooser -->
413
418
  ```python
414
419
  import pulumi
415
420
  import pulumi_vsphere as vsphere
@@ -421,14 +426,21 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
421
426
  datacenter = vsphere.get_datacenter(name="dc-01")
422
427
  cluster = vsphere.get_compute_cluster(name="cluster-01",
423
428
  datacenter_id=datacenter.id)
424
- vms_virtual_machine = [vsphere.get_virtual_machine(name=vms[__index],
429
+ vms_get_virtual_machine = [vsphere.get_virtual_machine(name=vms[__index],
425
430
  datacenter_id=datacenter.id) for __index in range(len(vms))]
426
- vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vmAffinityRule",
431
+ vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vm_affinity_rule",
432
+ name="vm-affinity-rule",
427
433
  enabled=True,
428
434
  compute_cluster_id=cluster.id,
429
- virtual_machine_ids=[__item.id for __item in vms_virtual_machine])
435
+ virtual_machine_ids=[__item.id for __item in vms_get_virtual_machine])
430
436
  ```
431
- <!--End PulumiCodeChooser -->
437
+
438
+ ## Importing
439
+
440
+ An existing rule can be imported into this resource by supplying
441
+ both the path to the cluster, and the name the rule. If the name or cluster is
442
+ not found, or if the rule is of a different type, an error will be returned. An
443
+ example is below:
432
444
 
433
445
  :param str resource_name: The name of the resource.
434
446
  :param ComputeClusterVmAffinityRuleArgs args: The arguments to use to populate this resource's properties.
@@ -241,25 +241,32 @@ class Datacenter(pulumi.CustomResource):
241
241
 
242
242
  ### Create datacenter on the root folder
243
243
 
244
- <!--Start PulumiCodeChooser -->
245
244
  ```python
246
245
  import pulumi
247
246
  import pulumi_vsphere as vsphere
248
247
 
249
- prod_datacenter = vsphere.Datacenter("prodDatacenter")
248
+ prod_datacenter = vsphere.Datacenter("prod_datacenter", name="my_prod_datacenter")
250
249
  ```
251
- <!--End PulumiCodeChooser -->
252
250
 
253
251
  ### Create datacenter on a subfolder
254
252
 
255
- <!--Start PulumiCodeChooser -->
256
253
  ```python
257
254
  import pulumi
258
255
  import pulumi_vsphere as vsphere
259
256
 
260
- research_datacenter = vsphere.Datacenter("researchDatacenter", folder="/research/")
257
+ research_datacenter = vsphere.Datacenter("research_datacenter",
258
+ name="my_research_datacenter",
259
+ folder="/research/")
261
260
  ```
262
- <!--End PulumiCodeChooser -->
261
+
262
+ ## Importing
263
+
264
+ An existing datacenter can be [imported][docs-import] into this resource
265
+ via supplying the full path to the datacenter. An example is below:
266
+
267
+ [docs-import]: /docs/import/index.html
268
+
269
+ The above would import the datacenter named `dc1`.
263
270
 
264
271
  :param str resource_name: The name of the resource.
265
272
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -295,25 +302,32 @@ class Datacenter(pulumi.CustomResource):
295
302
 
296
303
  ### Create datacenter on the root folder
297
304
 
298
- <!--Start PulumiCodeChooser -->
299
305
  ```python
300
306
  import pulumi
301
307
  import pulumi_vsphere as vsphere
302
308
 
303
- prod_datacenter = vsphere.Datacenter("prodDatacenter")
309
+ prod_datacenter = vsphere.Datacenter("prod_datacenter", name="my_prod_datacenter")
304
310
  ```
305
- <!--End PulumiCodeChooser -->
306
311
 
307
312
  ### Create datacenter on a subfolder
308
313
 
309
- <!--Start PulumiCodeChooser -->
310
314
  ```python
311
315
  import pulumi
312
316
  import pulumi_vsphere as vsphere
313
317
 
314
- research_datacenter = vsphere.Datacenter("researchDatacenter", folder="/research/")
318
+ research_datacenter = vsphere.Datacenter("research_datacenter",
319
+ name="my_research_datacenter",
320
+ folder="/research/")
315
321
  ```
316
- <!--End PulumiCodeChooser -->
322
+
323
+ ## Importing
324
+
325
+ An existing datacenter can be [imported][docs-import] into this resource
326
+ via supplying the full path to the datacenter. An example is below:
327
+
328
+ [docs-import]: /docs/import/index.html
329
+
330
+ The above would import the datacenter named `dc1`.
317
331
 
318
332
  :param str resource_name: The name of the resource.
319
333
  :param DatacenterArgs args: The arguments to use to populate this resource's properties.