pulumi-vsphere 4.11.0a1713340048__tar.gz → 4.11.0a1713561492__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.

Files changed (87) hide show
  1. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/PKG-INFO +1 -1
  2. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/_inputs.py +22 -20
  3. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/compute_cluster_vm_affinity_rule.py +14 -8
  4. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/datacenter.py +8 -4
  5. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/file.py +16 -16
  6. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_compute_cluster_host_group.py +8 -6
  7. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_datastore_stats.py +4 -4
  8. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_distributed_virtual_switch.py +2 -0
  9. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_dynamic.py +4 -4
  10. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_resource_pool.py +2 -2
  11. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/guest_os_customization.py +54 -0
  12. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/host_port_group.py +12 -4
  13. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/license.py +0 -32
  14. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/outputs.py +22 -20
  15. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/resource_pool.py +20 -10
  16. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/virtual_machine_snapshot.py +6 -6
  17. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/vm_storage_policy.py +72 -72
  18. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/vnic.py +8 -0
  19. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere.egg-info/PKG-INFO +1 -1
  20. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pyproject.toml +1 -1
  21. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/README.md +0 -0
  22. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/__init__.py +0 -0
  23. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/_utilities.py +0 -0
  24. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/compute_cluster.py +0 -0
  25. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/compute_cluster_host_group.py +0 -0
  26. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +0 -0
  27. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/compute_cluster_vm_dependency_rule.py +0 -0
  28. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/compute_cluster_vm_group.py +0 -0
  29. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/compute_cluster_vm_host_rule.py +0 -0
  30. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/config/__init__.py +0 -0
  31. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/config/__init__.pyi +0 -0
  32. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/config/vars.py +0 -0
  33. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/content_library.py +0 -0
  34. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/content_library_item.py +0 -0
  35. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/custom_attribute.py +0 -0
  36. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/datastore_cluster.py +0 -0
  37. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +0 -0
  38. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/distributed_port_group.py +0 -0
  39. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/distributed_virtual_switch.py +14 -14
  40. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/dpm_host_override.py +0 -0
  41. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/drs_vm_override.py +0 -0
  42. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/entity_permissions.py +0 -0
  43. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/folder.py +0 -0
  44. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_compute_cluster.py +0 -0
  45. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_content_library.py +0 -0
  46. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_content_library_item.py +0 -0
  47. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_custom_attribute.py +0 -0
  48. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_datacenter.py +0 -0
  49. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_datastore.py +0 -0
  50. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_datastore_cluster.py +0 -0
  51. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_folder.py +0 -0
  52. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_guest_os_customization.py +0 -0
  53. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_host.py +0 -0
  54. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_host_pci_device.py +0 -0
  55. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_host_thumbprint.py +0 -0
  56. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_host_vgpu_profile.py +0 -0
  57. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_license.py +0 -0
  58. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_network.py +0 -0
  59. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_ovf_vm_template.py +0 -0
  60. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_policy.py +0 -0
  61. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_role.py +0 -0
  62. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_tag.py +0 -0
  63. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_tag_category.py +0 -0
  64. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_vapp_container.py +0 -0
  65. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_virtual_machine.py +0 -0
  66. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/get_vmfs_disks.py +0 -0
  67. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/ha_vm_override.py +0 -0
  68. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/host.py +0 -0
  69. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/host_virtual_switch.py +0 -0
  70. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/nas_datastore.py +0 -0
  71. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/provider.py +0 -0
  72. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/pulumi-plugin.json +0 -0
  73. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/py.typed +0 -0
  74. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/role.py +0 -0
  75. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/storage_drs_vm_override.py +0 -0
  76. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/tag.py +0 -0
  77. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/tag_category.py +0 -0
  78. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/vapp_container.py +0 -0
  79. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/vapp_entity.py +0 -0
  80. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/virtual_disk.py +0 -0
  81. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/virtual_machine.py +0 -0
  82. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere/vmfs_datastore.py +0 -0
  83. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere.egg-info/SOURCES.txt +0 -0
  84. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere.egg-info/dependency_links.txt +0 -0
  85. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere.egg-info/requires.txt +0 -0
  86. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/pulumi_vsphere.egg-info/top_level.txt +0 -0
  87. {pulumi_vsphere-4.11.0a1713340048 → pulumi_vsphere-4.11.0a1713561492}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pulumi_vsphere
3
- Version: 4.11.0a1713340048
3
+ Version: 4.11.0a1713561492
4
4
  Summary: A Pulumi package for creating vsphere resources
5
5
  License: Apache-2.0
6
6
  Project-URL: Homepage, https://pulumi.io
@@ -165,9 +165,10 @@ class ComputeClusterVsanStretchedClusterArgs:
165
165
  import pulumi
166
166
  import pulumi_vsphere as vsphere
167
167
 
168
- compute_cluster = vsphere.ComputeCluster("computeCluster",
169
- datacenter_id=data["vsphere_datacenter"]["datacenter"]["id"],
170
- host_system_ids=[[__item["id"] for __item in data["vsphere_host"]["host"]]],
168
+ compute_cluster = vsphere.ComputeCluster("compute_cluster",
169
+ name="terraform-compute-cluster-test",
170
+ datacenter_id=datacenter["id"],
171
+ host_system_ids=[[__item["id"] for __item in host]],
171
172
  drs_enabled=True,
172
173
  drs_automation_level="fullyAutomated",
173
174
  ha_enabled=False,
@@ -182,25 +183,25 @@ class ComputeClusterVsanStretchedClusterArgs:
182
183
  vsan_dit_encryption_enabled=True,
183
184
  vsan_dit_rekey_interval=1800,
184
185
  vsan_disk_groups=[vsphere.ComputeClusterVsanDiskGroupArgs(
185
- cache=data["vsphere_vmfs_disks"]["cache_disks"],
186
- storages=data["vsphere_vmfs_disks"]["storage_disks"],
186
+ cache=cache_disks[0],
187
+ storages=storage_disks,
187
188
  )],
188
189
  vsan_fault_domains=[vsphere.ComputeClusterVsanFaultDomainArgs(
189
190
  fault_domains=[
190
191
  vsphere.ComputeClusterVsanFaultDomainFaultDomainArgs(
191
192
  name="fd1",
192
- host_ids=[[__item["id"] for __item in data["vsphere_host"]["faultdomain1_hosts"]]],
193
+ host_ids=[[__item["id"] for __item in faultdomain1_hosts]],
193
194
  ),
194
195
  vsphere.ComputeClusterVsanFaultDomainFaultDomainArgs(
195
196
  name="fd2",
196
- host_ids=[[__item["id"] for __item in data["vsphere_host"]["faultdomain2_hosts"]]],
197
+ host_ids=[[__item["id"] for __item in faultdomain2_hosts]],
197
198
  ),
198
199
  ],
199
200
  )],
200
201
  vsan_stretched_cluster=vsphere.ComputeClusterVsanStretchedClusterArgs(
201
- preferred_fault_domain_host_ids=[[__item["id"] for __item in data["vsphere_host"]["preferred_fault_domain_host"]]],
202
- secondary_fault_domain_host_ids=[[__item["id"] for __item in data["vsphere_host"]["secondary_fault_domain_host"]]],
203
- witness_node=data["vsphere_host"]["witness_host"]["id"],
202
+ preferred_fault_domain_host_ids=[[__item["id"] for __item in preferred_fault_domain_host]],
203
+ secondary_fault_domain_host_ids=[[__item["id"] for __item in secondary_fault_domain_host]],
204
+ witness_node=witness_host["id"],
204
205
  ))
205
206
  ```
206
207
  <!--End PulumiCodeChooser -->
@@ -275,9 +276,10 @@ class ComputeClusterVsanStretchedClusterArgs:
275
276
  import pulumi
276
277
  import pulumi_vsphere as vsphere
277
278
 
278
- compute_cluster = vsphere.ComputeCluster("computeCluster",
279
- datacenter_id=data["vsphere_datacenter"]["datacenter"]["id"],
280
- host_system_ids=[[__item["id"] for __item in data["vsphere_host"]["host"]]],
279
+ compute_cluster = vsphere.ComputeCluster("compute_cluster",
280
+ name="terraform-compute-cluster-test",
281
+ datacenter_id=datacenter["id"],
282
+ host_system_ids=[[__item["id"] for __item in host]],
281
283
  drs_enabled=True,
282
284
  drs_automation_level="fullyAutomated",
283
285
  ha_enabled=False,
@@ -292,25 +294,25 @@ class ComputeClusterVsanStretchedClusterArgs:
292
294
  vsan_dit_encryption_enabled=True,
293
295
  vsan_dit_rekey_interval=1800,
294
296
  vsan_disk_groups=[vsphere.ComputeClusterVsanDiskGroupArgs(
295
- cache=data["vsphere_vmfs_disks"]["cache_disks"],
296
- storages=data["vsphere_vmfs_disks"]["storage_disks"],
297
+ cache=cache_disks[0],
298
+ storages=storage_disks,
297
299
  )],
298
300
  vsan_fault_domains=[vsphere.ComputeClusterVsanFaultDomainArgs(
299
301
  fault_domains=[
300
302
  vsphere.ComputeClusterVsanFaultDomainFaultDomainArgs(
301
303
  name="fd1",
302
- host_ids=[[__item["id"] for __item in data["vsphere_host"]["faultdomain1_hosts"]]],
304
+ host_ids=[[__item["id"] for __item in faultdomain1_hosts]],
303
305
  ),
304
306
  vsphere.ComputeClusterVsanFaultDomainFaultDomainArgs(
305
307
  name="fd2",
306
- host_ids=[[__item["id"] for __item in data["vsphere_host"]["faultdomain2_hosts"]]],
308
+ host_ids=[[__item["id"] for __item in faultdomain2_hosts]],
307
309
  ),
308
310
  ],
309
311
  )],
310
312
  vsan_stretched_cluster=vsphere.ComputeClusterVsanStretchedClusterArgs(
311
- preferred_fault_domain_host_ids=[[__item["id"] for __item in data["vsphere_host"]["preferred_fault_domain_host"]]],
312
- secondary_fault_domain_host_ids=[[__item["id"] for __item in data["vsphere_host"]["secondary_fault_domain_host"]]],
313
- witness_node=data["vsphere_host"]["witness_host"]["id"],
313
+ preferred_fault_domain_host_ids=[[__item["id"] for __item in preferred_fault_domain_host]],
314
+ secondary_fault_domain_host_ids=[[__item["id"] for __item in secondary_fault_domain_host]],
315
+ witness_node=witness_host["id"],
314
316
  ))
315
317
  ```
316
318
  <!--End PulumiCodeChooser -->
@@ -275,6 +275,7 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
275
275
  vm = []
276
276
  for range in [{"value": i} for i in range(0, 2)]:
277
277
  vm.append(vsphere.VirtualMachine(f"vm-{range['value']}",
278
+ name=f"foo-{range['value']}",
278
279
  resource_pool_id=cluster.resource_pool_id,
279
280
  datastore_id=datastore.id,
280
281
  num_cpus=1,
@@ -287,7 +288,8 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
287
288
  label="disk0",
288
289
  size=20,
289
290
  )]))
290
- vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vmAffinityRule",
291
+ vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vm_affinity_rule",
292
+ name="vm-affinity-rule",
291
293
  compute_cluster_id=cluster.id,
292
294
  virtual_machine_ids=[v.id for k, v in vm])
293
295
  ```
@@ -309,12 +311,13 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
309
311
  datacenter = vsphere.get_datacenter(name="dc-01")
310
312
  cluster = vsphere.get_compute_cluster(name="cluster-01",
311
313
  datacenter_id=datacenter.id)
312
- vms_virtual_machine = [vsphere.get_virtual_machine(name=vms[__index],
314
+ vms_get_virtual_machine = [vsphere.get_virtual_machine(name=vms[__index],
313
315
  datacenter_id=datacenter.id) for __index in range(len(vms))]
314
- vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vmAffinityRule",
316
+ vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vm_affinity_rule",
317
+ name="vm-affinity-rule",
315
318
  enabled=True,
316
319
  compute_cluster_id=cluster.id,
317
- virtual_machine_ids=[__item.id for __item in vms_virtual_machine])
320
+ virtual_machine_ids=[__item.id for __item in vms_get_virtual_machine])
318
321
  ```
319
322
  <!--End PulumiCodeChooser -->
320
323
 
@@ -394,6 +397,7 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
394
397
  vm = []
395
398
  for range in [{"value": i} for i in range(0, 2)]:
396
399
  vm.append(vsphere.VirtualMachine(f"vm-{range['value']}",
400
+ name=f"foo-{range['value']}",
397
401
  resource_pool_id=cluster.resource_pool_id,
398
402
  datastore_id=datastore.id,
399
403
  num_cpus=1,
@@ -406,7 +410,8 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
406
410
  label="disk0",
407
411
  size=20,
408
412
  )]))
409
- vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vmAffinityRule",
413
+ vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vm_affinity_rule",
414
+ name="vm-affinity-rule",
410
415
  compute_cluster_id=cluster.id,
411
416
  virtual_machine_ids=[v.id for k, v in vm])
412
417
  ```
@@ -428,12 +433,13 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
428
433
  datacenter = vsphere.get_datacenter(name="dc-01")
429
434
  cluster = vsphere.get_compute_cluster(name="cluster-01",
430
435
  datacenter_id=datacenter.id)
431
- vms_virtual_machine = [vsphere.get_virtual_machine(name=vms[__index],
436
+ vms_get_virtual_machine = [vsphere.get_virtual_machine(name=vms[__index],
432
437
  datacenter_id=datacenter.id) for __index in range(len(vms))]
433
- vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vmAffinityRule",
438
+ vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vm_affinity_rule",
439
+ name="vm-affinity-rule",
434
440
  enabled=True,
435
441
  compute_cluster_id=cluster.id,
436
- virtual_machine_ids=[__item.id for __item in vms_virtual_machine])
442
+ virtual_machine_ids=[__item.id for __item in vms_get_virtual_machine])
437
443
  ```
438
444
  <!--End PulumiCodeChooser -->
439
445
 
@@ -246,7 +246,7 @@ class Datacenter(pulumi.CustomResource):
246
246
  import pulumi
247
247
  import pulumi_vsphere as vsphere
248
248
 
249
- prod_datacenter = vsphere.Datacenter("prodDatacenter")
249
+ prod_datacenter = vsphere.Datacenter("prod_datacenter", name="my_prod_datacenter")
250
250
  ```
251
251
  <!--End PulumiCodeChooser -->
252
252
 
@@ -257,7 +257,9 @@ class Datacenter(pulumi.CustomResource):
257
257
  import pulumi
258
258
  import pulumi_vsphere as vsphere
259
259
 
260
- research_datacenter = vsphere.Datacenter("researchDatacenter", folder="/research/")
260
+ research_datacenter = vsphere.Datacenter("research_datacenter",
261
+ name="my_research_datacenter",
262
+ folder="/research/")
261
263
  ```
262
264
  <!--End PulumiCodeChooser -->
263
265
 
@@ -309,7 +311,7 @@ class Datacenter(pulumi.CustomResource):
309
311
  import pulumi
310
312
  import pulumi_vsphere as vsphere
311
313
 
312
- prod_datacenter = vsphere.Datacenter("prodDatacenter")
314
+ prod_datacenter = vsphere.Datacenter("prod_datacenter", name="my_prod_datacenter")
313
315
  ```
314
316
  <!--End PulumiCodeChooser -->
315
317
 
@@ -320,7 +322,9 @@ class Datacenter(pulumi.CustomResource):
320
322
  import pulumi
321
323
  import pulumi_vsphere as vsphere
322
324
 
323
- research_datacenter = vsphere.Datacenter("researchDatacenter", folder="/research/")
325
+ research_datacenter = vsphere.Datacenter("research_datacenter",
326
+ name="my_research_datacenter",
327
+ folder="/research/")
324
328
  ```
325
329
  <!--End PulumiCodeChooser -->
326
330
 
@@ -303,12 +303,12 @@ class File(pulumi.CustomResource):
303
303
  import pulumi
304
304
  import pulumi_vsphere as vsphere
305
305
 
306
- ubuntu_vmdk_upload = vsphere.File("ubuntuVmdkUpload",
307
- create_directories=True,
306
+ ubuntu_vmdk_upload = vsphere.File("ubuntu_vmdk_upload",
308
307
  datacenter="dc-01",
309
308
  datastore="datastore-01",
309
+ source_file="/my/src/path/custom_ubuntu.vmdk",
310
310
  destination_file="/my/dst/path/custom_ubuntu.vmdk",
311
- source_file="/my/src/path/custom_ubuntu.vmdk")
311
+ create_directories=True)
312
312
  ```
313
313
  <!--End PulumiCodeChooser -->
314
314
 
@@ -319,14 +319,14 @@ class File(pulumi.CustomResource):
319
319
  import pulumi
320
320
  import pulumi_vsphere as vsphere
321
321
 
322
- ubuntu_copy = vsphere.File("ubuntuCopy",
323
- create_directories=True,
322
+ ubuntu_copy = vsphere.File("ubuntu_copy",
323
+ source_datacenter="dc-01",
324
324
  datacenter="dc-01",
325
+ source_datastore="datastore-01",
325
326
  datastore="datastore-01",
327
+ source_file="/my/src/path/custom_ubuntu.vmdk",
326
328
  destination_file="/my/dst/path/custom_ubuntu.vmdk",
327
- source_datacenter="dc-01",
328
- source_datastore="datastore-01",
329
- source_file="/my/src/path/custom_ubuntu.vmdk")
329
+ create_directories=True)
330
330
  ```
331
331
  <!--End PulumiCodeChooser -->
332
332
 
@@ -365,12 +365,12 @@ class File(pulumi.CustomResource):
365
365
  import pulumi
366
366
  import pulumi_vsphere as vsphere
367
367
 
368
- ubuntu_vmdk_upload = vsphere.File("ubuntuVmdkUpload",
369
- create_directories=True,
368
+ ubuntu_vmdk_upload = vsphere.File("ubuntu_vmdk_upload",
370
369
  datacenter="dc-01",
371
370
  datastore="datastore-01",
371
+ source_file="/my/src/path/custom_ubuntu.vmdk",
372
372
  destination_file="/my/dst/path/custom_ubuntu.vmdk",
373
- source_file="/my/src/path/custom_ubuntu.vmdk")
373
+ create_directories=True)
374
374
  ```
375
375
  <!--End PulumiCodeChooser -->
376
376
 
@@ -381,14 +381,14 @@ class File(pulumi.CustomResource):
381
381
  import pulumi
382
382
  import pulumi_vsphere as vsphere
383
383
 
384
- ubuntu_copy = vsphere.File("ubuntuCopy",
385
- create_directories=True,
384
+ ubuntu_copy = vsphere.File("ubuntu_copy",
385
+ source_datacenter="dc-01",
386
386
  datacenter="dc-01",
387
+ source_datastore="datastore-01",
387
388
  datastore="datastore-01",
389
+ source_file="/my/src/path/custom_ubuntu.vmdk",
388
390
  destination_file="/my/dst/path/custom_ubuntu.vmdk",
389
- source_datacenter="dc-01",
390
- source_datastore="datastore-01",
391
- source_file="/my/src/path/custom_ubuntu.vmdk")
391
+ create_directories=True)
392
392
  ```
393
393
  <!--End PulumiCodeChooser -->
394
394
 
@@ -90,13 +90,14 @@ def get_compute_cluster_host_group(compute_cluster_id: Optional[str] = None,
90
90
  import pulumi
91
91
  import pulumi_vsphere as vsphere
92
92
 
93
- datacenter = vsphere.get_datacenter(name=var["vsphere_datacenter"])
94
- cluster = vsphere.get_compute_cluster(name=var["vsphere_cluster"],
93
+ datacenter = vsphere.get_datacenter(name=vsphere_datacenter)
94
+ cluster = vsphere.get_compute_cluster(name=vsphere_cluster,
95
95
  datacenter_id=datacenter.id)
96
96
  host_group1 = vsphere.get_compute_cluster_host_group(name="host_group1",
97
97
  compute_cluster_id=cluster.id)
98
- host_rule1 = vsphere.ComputeClusterVmHostRule("hostRule1",
98
+ host_rule1 = vsphere.ComputeClusterVmHostRule("host_rule1",
99
99
  compute_cluster_id=cluster.id,
100
+ name="terraform-host-rule1",
100
101
  vm_group_name="vm_group1",
101
102
  affinity_host_group_name=host_group1.name)
102
103
  ```
@@ -138,13 +139,14 @@ def get_compute_cluster_host_group_output(compute_cluster_id: Optional[pulumi.In
138
139
  import pulumi
139
140
  import pulumi_vsphere as vsphere
140
141
 
141
- datacenter = vsphere.get_datacenter(name=var["vsphere_datacenter"])
142
- cluster = vsphere.get_compute_cluster(name=var["vsphere_cluster"],
142
+ datacenter = vsphere.get_datacenter(name=vsphere_datacenter)
143
+ cluster = vsphere.get_compute_cluster(name=vsphere_cluster,
143
144
  datacenter_id=datacenter.id)
144
145
  host_group1 = vsphere.get_compute_cluster_host_group(name="host_group1",
145
146
  compute_cluster_id=cluster.id)
146
- host_rule1 = vsphere.ComputeClusterVmHostRule("hostRule1",
147
+ host_rule1 = vsphere.ComputeClusterVmHostRule("host_rule1",
147
148
  compute_cluster_id=cluster.id,
149
+ name="terraform-host-rule1",
148
150
  vm_group_name="vm_group1",
149
151
  affinity_host_group_name=host_group1.name)
150
152
  ```
@@ -115,8 +115,8 @@ def get_datastore_stats(capacity: Optional[Mapping[str, Any]] = None,
115
115
  ```python
116
116
  import pulumi
117
117
 
118
- pulumi.export("maxFreeSpaceName", local["max_free_space_name"])
119
- pulumi.export("maxFreeSpace", local["max_free_space"])
118
+ pulumi.export("maxFreeSpaceName", their_max_free_space_name)
119
+ pulumi.export("maxFreeSpace", their_max_free_space)
120
120
  ```
121
121
  <!--End PulumiCodeChooser -->
122
122
 
@@ -180,8 +180,8 @@ def get_datastore_stats_output(capacity: Optional[pulumi.Input[Optional[Mapping[
180
180
  ```python
181
181
  import pulumi
182
182
 
183
- pulumi.export("maxFreeSpaceName", local["max_free_space_name"])
184
- pulumi.export("maxFreeSpace", local["max_free_space"])
183
+ pulumi.export("maxFreeSpaceName", their_max_free_space_name)
184
+ pulumi.export("maxFreeSpace", their_max_free_space)
185
185
  ```
186
186
  <!--End PulumiCodeChooser -->
187
187
 
@@ -106,6 +106,7 @@ def get_distributed_virtual_switch(datacenter_id: Optional[str] = None,
106
106
  vds = vsphere.get_distributed_virtual_switch(name="vds-01",
107
107
  datacenter_id=datacenter.id)
108
108
  dvpg = vsphere.DistributedPortGroup("dvpg",
109
+ name="dvpg-01",
109
110
  distributed_virtual_switch_uuid=vds.id,
110
111
  active_uplinks=[vds.uplinks[0]],
111
112
  standby_uplinks=[vds.uplinks[1]])
@@ -162,6 +163,7 @@ def get_distributed_virtual_switch_output(datacenter_id: Optional[pulumi.Input[O
162
163
  vds = vsphere.get_distributed_virtual_switch(name="vds-01",
163
164
  datacenter_id=datacenter.id)
164
165
  dvpg = vsphere.DistributedPortGroup("dvpg",
166
+ name="dvpg-01",
165
167
  distributed_virtual_switch_uuid=vds.id,
166
168
  active_uplinks=[vds.uplinks[0]],
167
169
  standby_uplinks=[vds.uplinks[1]])
@@ -91,9 +91,9 @@ def get_dynamic(filters: Optional[Sequence[str]] = None,
91
91
 
92
92
  category = vsphere.get_tag_category(name="SomeCategory")
93
93
  tag1 = vsphere.get_tag(name="FirstTag",
94
- category_id=data["vsphere_tag_category"]["cat"]["id"])
94
+ category_id=cat["id"])
95
95
  tag2 = vsphere.get_tag(name="SecondTag",
96
- category_id=data["vsphere_tag_category"]["cat"]["id"])
96
+ category_id=cat["id"])
97
97
  dyn = vsphere.get_dynamic(filters=[
98
98
  tag1.id,
99
99
  tag1.id,
@@ -147,9 +147,9 @@ def get_dynamic_output(filters: Optional[pulumi.Input[Sequence[str]]] = None,
147
147
 
148
148
  category = vsphere.get_tag_category(name="SomeCategory")
149
149
  tag1 = vsphere.get_tag(name="FirstTag",
150
- category_id=data["vsphere_tag_category"]["cat"]["id"])
150
+ category_id=cat["id"])
151
151
  tag2 = vsphere.get_tag(name="SecondTag",
152
- category_id=data["vsphere_tag_category"]["cat"]["id"])
152
+ category_id=cat["id"])
153
153
  dyn = vsphere.get_dynamic(filters=[
154
154
  tag1.id,
155
155
  tag1.id,
@@ -100,7 +100,7 @@ def get_resource_pool(datacenter_id: Optional[str] = None,
100
100
  import pulumi_vsphere as vsphere
101
101
 
102
102
  pool = vsphere.get_resource_pool(name="esxi-01.example.com/Resources",
103
- datacenter_id=data["vsphere_datacenter"]["datacenter"]["id"])
103
+ datacenter_id=datacenter["id"])
104
104
  ```
105
105
  <!--End PulumiCodeChooser -->
106
106
 
@@ -172,7 +172,7 @@ def get_resource_pool_output(datacenter_id: Optional[pulumi.Input[Optional[str]]
172
172
  import pulumi_vsphere as vsphere
173
173
 
174
174
  pool = vsphere.get_resource_pool(name="esxi-01.example.com/Resources",
175
- datacenter_id=data["vsphere_datacenter"]["datacenter"]["id"])
175
+ datacenter_id=datacenter["id"])
176
176
  ```
177
177
  <!--End PulumiCodeChooser -->
178
178
 
@@ -202,6 +202,33 @@ class GuestOsCustomization(pulumi.CustomResource):
202
202
 
203
203
  > **NOTE:** The name attribute is unique identifier for the guest OS spec per VC.
204
204
 
205
+ ## Example Usage
206
+
207
+ <!--Start PulumiCodeChooser -->
208
+ ```python
209
+ import pulumi
210
+ import pulumi_vsphere as vsphere
211
+
212
+ windows_customization = vsphere.GuestOsCustomization("windows_customization",
213
+ name="windows-spec",
214
+ type="Windows",
215
+ spec=vsphere.GuestOsCustomizationSpecArgs(
216
+ windows_options=vsphere.GuestOsCustomizationSpecWindowsOptionsArgs(
217
+ run_once_command_lists=[
218
+ "command-1",
219
+ "command-2",
220
+ ],
221
+ computer_name="windows",
222
+ auto_logon=False,
223
+ auto_logon_count=0,
224
+ admin_password="VMware1!",
225
+ time_zone=4,
226
+ workgroup="workgroup",
227
+ ),
228
+ ))
229
+ ```
230
+ <!--End PulumiCodeChooser -->
231
+
205
232
  :param str resource_name: The name of the resource.
206
233
  :param pulumi.ResourceOptions opts: Options for the resource.
207
234
  :param pulumi.Input[str] description: The description for the customization specification.
@@ -220,6 +247,33 @@ class GuestOsCustomization(pulumi.CustomResource):
220
247
 
221
248
  > **NOTE:** The name attribute is unique identifier for the guest OS spec per VC.
222
249
 
250
+ ## Example Usage
251
+
252
+ <!--Start PulumiCodeChooser -->
253
+ ```python
254
+ import pulumi
255
+ import pulumi_vsphere as vsphere
256
+
257
+ windows_customization = vsphere.GuestOsCustomization("windows_customization",
258
+ name="windows-spec",
259
+ type="Windows",
260
+ spec=vsphere.GuestOsCustomizationSpecArgs(
261
+ windows_options=vsphere.GuestOsCustomizationSpecWindowsOptionsArgs(
262
+ run_once_command_lists=[
263
+ "command-1",
264
+ "command-2",
265
+ ],
266
+ computer_name="windows",
267
+ auto_logon=False,
268
+ auto_logon_count=0,
269
+ admin_password="VMware1!",
270
+ time_zone=4,
271
+ workgroup="workgroup",
272
+ ),
273
+ ))
274
+ ```
275
+ <!--End PulumiCodeChooser -->
276
+
223
277
  :param str resource_name: The name of the resource.
224
278
  :param GuestOsCustomizationArgs args: The arguments to use to populate this resource's properties.
225
279
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -704,7 +704,8 @@ class HostPortGroup(pulumi.CustomResource):
704
704
  datacenter = vsphere.get_datacenter(name="dc-01")
705
705
  host = vsphere.get_host(name="esxi-01.example.com",
706
706
  datacenter_id=datacenter.id)
707
- host_virtual_switch = vsphere.HostVirtualSwitch("hostVirtualSwitch",
707
+ host_virtual_switch = vsphere.HostVirtualSwitch("host_virtual_switch",
708
+ name="switch-01",
708
709
  host_system_id=host.id,
709
710
  network_adapters=[
710
711
  "vmnic0",
@@ -713,6 +714,7 @@ class HostPortGroup(pulumi.CustomResource):
713
714
  active_nics=["vmnic0"],
714
715
  standby_nics=["vmnic1"])
715
716
  pg = vsphere.HostPortGroup("pg",
717
+ name="portgroup-01",
716
718
  host_system_id=host.id,
717
719
  virtual_switch_name=host_virtual_switch.name)
718
720
  ```
@@ -734,7 +736,8 @@ class HostPortGroup(pulumi.CustomResource):
734
736
  datacenter = vsphere.get_datacenter(name="dc-01")
735
737
  host = vsphere.get_host(name="esxi-01.example.com",
736
738
  datacenter_id=datacenter.id)
737
- host_virtual_switch = vsphere.HostVirtualSwitch("hostVirtualSwitch",
739
+ host_virtual_switch = vsphere.HostVirtualSwitch("host_virtual_switch",
740
+ name="switch-01",
738
741
  host_system_id=host.id,
739
742
  network_adapters=[
740
743
  "vmnic0",
@@ -743,6 +746,7 @@ class HostPortGroup(pulumi.CustomResource):
743
746
  active_nics=["vmnic0"],
744
747
  standby_nics=["vmnic1"])
745
748
  pg = vsphere.HostPortGroup("pg",
749
+ name="portgroup-01",
746
750
  host_system_id=host.id,
747
751
  virtual_switch_name=host_virtual_switch.name,
748
752
  vlan_id=4095,
@@ -814,7 +818,8 @@ class HostPortGroup(pulumi.CustomResource):
814
818
  datacenter = vsphere.get_datacenter(name="dc-01")
815
819
  host = vsphere.get_host(name="esxi-01.example.com",
816
820
  datacenter_id=datacenter.id)
817
- host_virtual_switch = vsphere.HostVirtualSwitch("hostVirtualSwitch",
821
+ host_virtual_switch = vsphere.HostVirtualSwitch("host_virtual_switch",
822
+ name="switch-01",
818
823
  host_system_id=host.id,
819
824
  network_adapters=[
820
825
  "vmnic0",
@@ -823,6 +828,7 @@ class HostPortGroup(pulumi.CustomResource):
823
828
  active_nics=["vmnic0"],
824
829
  standby_nics=["vmnic1"])
825
830
  pg = vsphere.HostPortGroup("pg",
831
+ name="portgroup-01",
826
832
  host_system_id=host.id,
827
833
  virtual_switch_name=host_virtual_switch.name)
828
834
  ```
@@ -844,7 +850,8 @@ class HostPortGroup(pulumi.CustomResource):
844
850
  datacenter = vsphere.get_datacenter(name="dc-01")
845
851
  host = vsphere.get_host(name="esxi-01.example.com",
846
852
  datacenter_id=datacenter.id)
847
- host_virtual_switch = vsphere.HostVirtualSwitch("hostVirtualSwitch",
853
+ host_virtual_switch = vsphere.HostVirtualSwitch("host_virtual_switch",
854
+ name="switch-01",
848
855
  host_system_id=host.id,
849
856
  network_adapters=[
850
857
  "vmnic0",
@@ -853,6 +860,7 @@ class HostPortGroup(pulumi.CustomResource):
853
860
  active_nics=["vmnic0"],
854
861
  standby_nics=["vmnic1"])
855
862
  pg = vsphere.HostPortGroup("pg",
863
+ name="portgroup-01",
856
864
  host_system_id=host.id,
857
865
  virtual_switch_name=host_virtual_switch.name,
858
866
  vlan_id=4095,
@@ -165,22 +165,6 @@ class License(pulumi.CustomResource):
165
165
  """
166
166
  Provides a VMware vSphere license resource. This can be used to add and remove license keys.
167
167
 
168
- ## Example Usage
169
-
170
- <!--Start PulumiCodeChooser -->
171
- ```python
172
- import pulumi
173
- import pulumi_vsphere as vsphere
174
-
175
- license_key = vsphere.License("licenseKey",
176
- labels={
177
- "VpxClientLicenseLabel": "Hello World",
178
- "Workflow": "Hello World",
179
- },
180
- license_key="452CQ-2EK54-K8742-00000-00000")
181
- ```
182
- <!--End PulumiCodeChooser -->
183
-
184
168
  :param str resource_name: The name of the resource.
185
169
  :param pulumi.ResourceOptions opts: Options for the resource.
186
170
  :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A map of key/value pairs to be attached as labels (tags) to the license key.
@@ -195,22 +179,6 @@ class License(pulumi.CustomResource):
195
179
  """
196
180
  Provides a VMware vSphere license resource. This can be used to add and remove license keys.
197
181
 
198
- ## Example Usage
199
-
200
- <!--Start PulumiCodeChooser -->
201
- ```python
202
- import pulumi
203
- import pulumi_vsphere as vsphere
204
-
205
- license_key = vsphere.License("licenseKey",
206
- labels={
207
- "VpxClientLicenseLabel": "Hello World",
208
- "Workflow": "Hello World",
209
- },
210
- license_key="452CQ-2EK54-K8742-00000-00000")
211
- ```
212
- <!--End PulumiCodeChooser -->
213
-
214
182
  :param str resource_name: The name of the resource.
215
183
  :param LicenseArgs args: The arguments to use to populate this resource's properties.
216
184
  :param pulumi.ResourceOptions opts: Options for the resource.