pulumi-vsphere 4.11.5__py3-none-any.whl → 4.12.0a1725603256__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (84) hide show
  1. pulumi_vsphere/_inputs.py +5 -1066
  2. pulumi_vsphere/_utilities.py +1 -1
  3. pulumi_vsphere/compute_cluster.py +2 -181
  4. pulumi_vsphere/compute_cluster_host_group.py +2 -67
  5. pulumi_vsphere/compute_cluster_vm_affinity_rule.py +2 -29
  6. pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +2 -41
  7. pulumi_vsphere/compute_cluster_vm_dependency_rule.py +2 -205
  8. pulumi_vsphere/compute_cluster_vm_group.py +2 -198
  9. pulumi_vsphere/compute_cluster_vm_host_rule.py +2 -73
  10. pulumi_vsphere/config/__init__.pyi +0 -5
  11. pulumi_vsphere/config/vars.py +0 -5
  12. pulumi_vsphere/content_library.py +2 -103
  13. pulumi_vsphere/content_library_item.py +2 -143
  14. pulumi_vsphere/custom_attribute.py +2 -77
  15. pulumi_vsphere/datacenter.py +4 -19
  16. pulumi_vsphere/datastore_cluster.py +2 -63
  17. pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +2 -159
  18. pulumi_vsphere/distributed_port_group.py +2 -285
  19. pulumi_vsphere/distributed_virtual_switch.py +2 -261
  20. pulumi_vsphere/dpm_host_override.py +2 -63
  21. pulumi_vsphere/drs_vm_override.py +2 -67
  22. pulumi_vsphere/entity_permissions.py +0 -5
  23. pulumi_vsphere/file.py +0 -5
  24. pulumi_vsphere/folder.py +2 -141
  25. pulumi_vsphere/get_compute_cluster.py +4 -15
  26. pulumi_vsphere/get_compute_cluster_host_group.py +6 -17
  27. pulumi_vsphere/get_content_library.py +4 -12
  28. pulumi_vsphere/get_content_library_item.py +4 -16
  29. pulumi_vsphere/get_custom_attribute.py +4 -13
  30. pulumi_vsphere/get_datacenter.py +4 -12
  31. pulumi_vsphere/get_datastore.py +4 -16
  32. pulumi_vsphere/get_datastore_cluster.py +4 -14
  33. pulumi_vsphere/get_datastore_stats.py +4 -16
  34. pulumi_vsphere/get_distributed_virtual_switch.py +4 -15
  35. pulumi_vsphere/get_dynamic.py +4 -16
  36. pulumi_vsphere/get_folder.py +4 -12
  37. pulumi_vsphere/get_guest_os_customization.py +4 -17
  38. pulumi_vsphere/get_host.py +4 -15
  39. pulumi_vsphere/get_host_base_images.py +4 -11
  40. pulumi_vsphere/get_host_pci_device.py +4 -19
  41. pulumi_vsphere/get_host_thumbprint.py +14 -34
  42. pulumi_vsphere/get_host_vgpu_profile.py +4 -15
  43. pulumi_vsphere/get_license.py +4 -17
  44. pulumi_vsphere/get_network.py +4 -17
  45. pulumi_vsphere/get_ovf_vm_template.py +4 -55
  46. pulumi_vsphere/get_policy.py +4 -12
  47. pulumi_vsphere/get_resource_pool.py +4 -14
  48. pulumi_vsphere/get_role.py +4 -18
  49. pulumi_vsphere/get_tag.py +4 -15
  50. pulumi_vsphere/get_tag_category.py +4 -15
  51. pulumi_vsphere/get_vapp_container.py +4 -14
  52. pulumi_vsphere/get_virtual_machine.py +4 -130
  53. pulumi_vsphere/get_vmfs_disks.py +4 -17
  54. pulumi_vsphere/guest_os_customization.py +0 -5
  55. pulumi_vsphere/ha_vm_override.py +2 -163
  56. pulumi_vsphere/host.py +12 -203
  57. pulumi_vsphere/host_port_group.py +2 -17
  58. pulumi_vsphere/host_virtual_switch.py +2 -69
  59. pulumi_vsphere/license.py +0 -5
  60. pulumi_vsphere/nas_datastore.py +2 -67
  61. pulumi_vsphere/offline_software_depot.py +0 -5
  62. pulumi_vsphere/outputs.py +0 -5
  63. pulumi_vsphere/provider.py +0 -5
  64. pulumi_vsphere/pulumi-plugin.json +1 -1
  65. pulumi_vsphere/resource_pool.py +437 -168
  66. pulumi_vsphere/role.py +2 -33
  67. pulumi_vsphere/storage_drs_vm_override.py +2 -133
  68. pulumi_vsphere/supervisor.py +0 -5
  69. pulumi_vsphere/tag.py +2 -159
  70. pulumi_vsphere/tag_category.py +2 -83
  71. pulumi_vsphere/vapp_container.py +2 -163
  72. pulumi_vsphere/vapp_entity.py +2 -147
  73. pulumi_vsphere/virtual_disk.py +2 -81
  74. pulumi_vsphere/virtual_machine.py +2 -53
  75. pulumi_vsphere/virtual_machine_class.py +0 -5
  76. pulumi_vsphere/virtual_machine_snapshot.py +0 -5
  77. pulumi_vsphere/vm_storage_policy.py +0 -5
  78. pulumi_vsphere/vmfs_datastore.py +2 -271
  79. pulumi_vsphere/vnic.py +4 -19
  80. {pulumi_vsphere-4.11.5.dist-info → pulumi_vsphere-4.12.0a1725603256.dist-info}/METADATA +2 -3
  81. pulumi_vsphere-4.12.0a1725603256.dist-info/RECORD +86 -0
  82. {pulumi_vsphere-4.11.5.dist-info → pulumi_vsphere-4.12.0a1725603256.dist-info}/WHEEL +1 -1
  83. pulumi_vsphere-4.11.5.dist-info/RECORD +0 -86
  84. {pulumi_vsphere-4.11.5.dist-info → pulumi_vsphere-4.12.0a1725603256.dist-info}/top_level.txt +0 -0
@@ -4,14 +4,9 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
- import sys
8
7
  import pulumi
9
8
  import pulumi.runtime
10
9
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
- if sys.version_info >= (3, 11):
12
- from typing import NotRequired, TypedDict, TypeAlias
13
- else:
14
- from typing_extensions import NotRequired, TypedDict, TypeAlias
15
10
  from . import _utilities
16
11
 
17
12
  __all__ = ['VappContainerArgs', 'VappContainer']
@@ -645,85 +640,7 @@ class VappContainer(pulumi.CustomResource):
645
640
  tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
646
641
  __props__=None):
647
642
  """
648
- The `VappContainer` resource can be used to create and manage
649
- vApps.
650
-
651
- For more information on vSphere vApps, see the VMware vSphere [product documentation][ref-vsphere-vapp].
652
-
653
- [ref-vsphere-vapp]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-E6E9D2A9-D358-4996-9BC7-F8D9D9645290.html
654
-
655
- ## Basic Example
656
-
657
- The example below sets up a vSphere vApp container in a compute cluster which uses
658
- the default settings for CPU and memory reservations, shares, and limits. The compute cluster
659
- needs to already exist in vSphere.
660
-
661
- ```python
662
- import pulumi
663
- import pulumi_vsphere as vsphere
664
-
665
- datacenter = vsphere.get_datacenter(name="dc-01")
666
- compute_cluster = vsphere.get_compute_cluster(name="cluster-01",
667
- datacenter_id=datacenter.id)
668
- vapp_container = vsphere.VappContainer("vapp_container",
669
- name="vapp-01",
670
- parent_resource_pool_id=compute_cluster.resource_pool_id)
671
- ```
672
-
673
- ### Example with a Virtual Machine
674
-
675
- The example below builds off the basic example, but includes a virtual machine
676
- in the new vApp container. To accomplish this, the `resource_pool_id` of the
677
- virtual machine is set to the `id` of the vApp container.
678
-
679
- ```python
680
- import pulumi
681
- import pulumi_vsphere as vsphere
682
-
683
- datacenter = vsphere.get_datacenter(name="dc-01")
684
- compute_cluster = vsphere.get_compute_cluster(name="cluster-01",
685
- datacenter_id=datacenter.id)
686
- datastore = vsphere.get_datastore(name="datastore-01",
687
- datacenter_id=datacenter.id)
688
- network = vsphere.get_network(name="VM Network",
689
- datacenter_id=datacenter.id)
690
- vapp_container = vsphere.VappContainer("vapp_container",
691
- name="vapp-01",
692
- parent_resource_pool_id=compute_cluster.resource_pool_id)
693
- vm = vsphere.VirtualMachine("vm",
694
- name="foo",
695
- resource_pool_id=vapp_container_vsphere_vapp_container["id"],
696
- datastore_id=datastore.id,
697
- num_cpus=1,
698
- memory=1024,
699
- guest_id="ubuntu64Guest",
700
- network_interfaces=[{
701
- "network_id": network.id,
702
- }],
703
- disks=[{
704
- "label": "disk0",
705
- "size": 20,
706
- }])
707
- ```
708
-
709
- ## Import
710
-
711
- An existing vApp container can be imported into this resource via
712
-
713
- the path to the vApp container, using the following command:
714
-
715
- Example:
716
-
717
- ```sh
718
- $ pulumi import vsphere:index/vappContainer:VappContainer vapp_container /dc-01/host/cluster-01/Resources/resource-pool-01/vapp-01
719
- ```
720
-
721
- The example above would import the vApp container named `vapp-01` that is
722
-
723
- located in the resource pool `resource-pool-01` that is part of the host cluster
724
-
725
- `cluster-01` in the `dc-01` datacenter.
726
-
643
+ Create a VappContainer resource with the given unique name, props, and options.
727
644
  :param str resource_name: The name of the resource.
728
645
  :param pulumi.ResourceOptions opts: Options for the resource.
729
646
  :param pulumi.Input[bool] cpu_expandable: Determines if the reservation on a vApp
@@ -777,85 +694,7 @@ class VappContainer(pulumi.CustomResource):
777
694
  args: VappContainerArgs,
778
695
  opts: Optional[pulumi.ResourceOptions] = None):
779
696
  """
780
- The `VappContainer` resource can be used to create and manage
781
- vApps.
782
-
783
- For more information on vSphere vApps, see the VMware vSphere [product documentation][ref-vsphere-vapp].
784
-
785
- [ref-vsphere-vapp]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-E6E9D2A9-D358-4996-9BC7-F8D9D9645290.html
786
-
787
- ## Basic Example
788
-
789
- The example below sets up a vSphere vApp container in a compute cluster which uses
790
- the default settings for CPU and memory reservations, shares, and limits. The compute cluster
791
- needs to already exist in vSphere.
792
-
793
- ```python
794
- import pulumi
795
- import pulumi_vsphere as vsphere
796
-
797
- datacenter = vsphere.get_datacenter(name="dc-01")
798
- compute_cluster = vsphere.get_compute_cluster(name="cluster-01",
799
- datacenter_id=datacenter.id)
800
- vapp_container = vsphere.VappContainer("vapp_container",
801
- name="vapp-01",
802
- parent_resource_pool_id=compute_cluster.resource_pool_id)
803
- ```
804
-
805
- ### Example with a Virtual Machine
806
-
807
- The example below builds off the basic example, but includes a virtual machine
808
- in the new vApp container. To accomplish this, the `resource_pool_id` of the
809
- virtual machine is set to the `id` of the vApp container.
810
-
811
- ```python
812
- import pulumi
813
- import pulumi_vsphere as vsphere
814
-
815
- datacenter = vsphere.get_datacenter(name="dc-01")
816
- compute_cluster = vsphere.get_compute_cluster(name="cluster-01",
817
- datacenter_id=datacenter.id)
818
- datastore = vsphere.get_datastore(name="datastore-01",
819
- datacenter_id=datacenter.id)
820
- network = vsphere.get_network(name="VM Network",
821
- datacenter_id=datacenter.id)
822
- vapp_container = vsphere.VappContainer("vapp_container",
823
- name="vapp-01",
824
- parent_resource_pool_id=compute_cluster.resource_pool_id)
825
- vm = vsphere.VirtualMachine("vm",
826
- name="foo",
827
- resource_pool_id=vapp_container_vsphere_vapp_container["id"],
828
- datastore_id=datastore.id,
829
- num_cpus=1,
830
- memory=1024,
831
- guest_id="ubuntu64Guest",
832
- network_interfaces=[{
833
- "network_id": network.id,
834
- }],
835
- disks=[{
836
- "label": "disk0",
837
- "size": 20,
838
- }])
839
- ```
840
-
841
- ## Import
842
-
843
- An existing vApp container can be imported into this resource via
844
-
845
- the path to the vApp container, using the following command:
846
-
847
- Example:
848
-
849
- ```sh
850
- $ pulumi import vsphere:index/vappContainer:VappContainer vapp_container /dc-01/host/cluster-01/Resources/resource-pool-01/vapp-01
851
- ```
852
-
853
- The example above would import the vApp container named `vapp-01` that is
854
-
855
- located in the resource pool `resource-pool-01` that is part of the host cluster
856
-
857
- `cluster-01` in the `dc-01` datacenter.
858
-
697
+ Create a VappContainer resource with the given unique name, props, and options.
859
698
  :param str resource_name: The name of the resource.
860
699
  :param VappContainerArgs args: The arguments to use to populate this resource's properties.
861
700
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -4,14 +4,9 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
- import sys
8
7
  import pulumi
9
8
  import pulumi.runtime
10
9
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
- if sys.version_info >= (3, 11):
12
- from typing import NotRequired, TypedDict, TypeAlias
13
- else:
14
- from typing_extensions import NotRequired, TypedDict, TypeAlias
15
10
  from . import _utilities
16
11
 
17
12
  __all__ = ['VappEntityArgs', 'VappEntity']
@@ -411,77 +406,7 @@ class VappEntity(pulumi.CustomResource):
411
406
  wait_for_guest: Optional[pulumi.Input[bool]] = None,
412
407
  __props__=None):
413
408
  """
414
- The `VappEntity` resource can be used to describe the behavior of an
415
- entity (virtual machine or sub-vApp container) in a vApp container.
416
-
417
- For more information on vSphere vApps, see [this
418
- page][ref-vsphere-vapp].
419
-
420
- [ref-vsphere-vapp]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-2A95EBB8-1779-40FA-B4FB-4D0845750879.html
421
-
422
- ## Example Usage
423
-
424
- The basic example below sets up a vApp container and a virtual machine in a
425
- compute cluster and then creates a vApp entity to change the virtual machine's
426
- power on behavior in the vApp container.
427
-
428
- ```python
429
- import pulumi
430
- import pulumi_vsphere as vsphere
431
-
432
- config = pulumi.Config()
433
- datacenter = config.get("datacenter")
434
- if datacenter is None:
435
- datacenter = "dc-01"
436
- cluster = config.get("cluster")
437
- if cluster is None:
438
- cluster = "cluster-01"
439
- datacenter_get_datacenter = vsphere.get_datacenter(name=datacenter)
440
- compute_cluster = vsphere.get_compute_cluster(name=cluster,
441
- datacenter_id=datacenter_get_datacenter.id)
442
- network = vsphere.get_network(name="network1",
443
- datacenter_id=datacenter_get_datacenter.id)
444
- datastore = vsphere.get_datastore(name="datastore1",
445
- datacenter_id=datacenter_get_datacenter.id)
446
- vapp_container = vsphere.VappContainer("vapp_container",
447
- name="vapp-container-test",
448
- parent_resource_pool_id=compute_cluster.id)
449
- vm = vsphere.VirtualMachine("vm",
450
- name="virtual-machine-test",
451
- resource_pool_id=vapp_container.id,
452
- datastore_id=datastore.id,
453
- num_cpus=2,
454
- memory=1024,
455
- guest_id="ubuntu64Guest",
456
- disks=[{
457
- "label": "disk0",
458
- "size": 1,
459
- }],
460
- network_interfaces=[{
461
- "network_id": network.id,
462
- }])
463
- vapp_entity = vsphere.VappEntity("vapp_entity",
464
- target_id=vm.moid,
465
- container_id=vapp_container.id,
466
- start_action="none")
467
- ```
468
-
469
- ## Import
470
-
471
- An existing vApp entity can be imported into this resource via
472
-
473
- the ID of the vApp Entity.
474
-
475
- ```sh
476
- $ pulumi import vsphere:index/vappEntity:VappEntity vapp_entity vm-123:res-456
477
- ```
478
-
479
- The above would import the vApp entity that governs the behavior of the virtual
480
-
481
- machine with a [managed object ID][docs-about-morefs] of vm-123 in the vApp
482
-
483
- container with the [managed object ID][docs-about-morefs] res-456.
484
-
409
+ Create a VappEntity resource with the given unique name, props, and options.
485
410
  :param str resource_name: The name of the resource.
486
411
  :param pulumi.ResourceOptions opts: Options for the resource.
487
412
  :param pulumi.Input[str] container_id: Managed object ID of the vApp
@@ -513,77 +438,7 @@ class VappEntity(pulumi.CustomResource):
513
438
  args: VappEntityArgs,
514
439
  opts: Optional[pulumi.ResourceOptions] = None):
515
440
  """
516
- The `VappEntity` resource can be used to describe the behavior of an
517
- entity (virtual machine or sub-vApp container) in a vApp container.
518
-
519
- For more information on vSphere vApps, see [this
520
- page][ref-vsphere-vapp].
521
-
522
- [ref-vsphere-vapp]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-2A95EBB8-1779-40FA-B4FB-4D0845750879.html
523
-
524
- ## Example Usage
525
-
526
- The basic example below sets up a vApp container and a virtual machine in a
527
- compute cluster and then creates a vApp entity to change the virtual machine's
528
- power on behavior in the vApp container.
529
-
530
- ```python
531
- import pulumi
532
- import pulumi_vsphere as vsphere
533
-
534
- config = pulumi.Config()
535
- datacenter = config.get("datacenter")
536
- if datacenter is None:
537
- datacenter = "dc-01"
538
- cluster = config.get("cluster")
539
- if cluster is None:
540
- cluster = "cluster-01"
541
- datacenter_get_datacenter = vsphere.get_datacenter(name=datacenter)
542
- compute_cluster = vsphere.get_compute_cluster(name=cluster,
543
- datacenter_id=datacenter_get_datacenter.id)
544
- network = vsphere.get_network(name="network1",
545
- datacenter_id=datacenter_get_datacenter.id)
546
- datastore = vsphere.get_datastore(name="datastore1",
547
- datacenter_id=datacenter_get_datacenter.id)
548
- vapp_container = vsphere.VappContainer("vapp_container",
549
- name="vapp-container-test",
550
- parent_resource_pool_id=compute_cluster.id)
551
- vm = vsphere.VirtualMachine("vm",
552
- name="virtual-machine-test",
553
- resource_pool_id=vapp_container.id,
554
- datastore_id=datastore.id,
555
- num_cpus=2,
556
- memory=1024,
557
- guest_id="ubuntu64Guest",
558
- disks=[{
559
- "label": "disk0",
560
- "size": 1,
561
- }],
562
- network_interfaces=[{
563
- "network_id": network.id,
564
- }])
565
- vapp_entity = vsphere.VappEntity("vapp_entity",
566
- target_id=vm.moid,
567
- container_id=vapp_container.id,
568
- start_action="none")
569
- ```
570
-
571
- ## Import
572
-
573
- An existing vApp entity can be imported into this resource via
574
-
575
- the ID of the vApp Entity.
576
-
577
- ```sh
578
- $ pulumi import vsphere:index/vappEntity:VappEntity vapp_entity vm-123:res-456
579
- ```
580
-
581
- The above would import the vApp entity that governs the behavior of the virtual
582
-
583
- machine with a [managed object ID][docs-about-morefs] of vm-123 in the vApp
584
-
585
- container with the [managed object ID][docs-about-morefs] res-456.
586
-
441
+ Create a VappEntity resource with the given unique name, props, and options.
587
442
  :param str resource_name: The name of the resource.
588
443
  :param VappEntityArgs args: The arguments to use to populate this resource's properties.
589
444
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -4,14 +4,9 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
- import sys
8
7
  import pulumi
9
8
  import pulumi.runtime
10
9
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
- if sys.version_info >= (3, 11):
12
- from typing import NotRequired, TypedDict, TypeAlias
13
- else:
14
- from typing_extensions import NotRequired, TypedDict, TypeAlias
15
10
  from . import _utilities
16
11
 
17
12
  __all__ = ['VirtualDiskArgs', 'VirtualDisk']
@@ -375,44 +370,7 @@ class VirtualDisk(pulumi.CustomResource):
375
370
  vmdk_path: Optional[pulumi.Input[str]] = None,
376
371
  __props__=None):
377
372
  """
378
- The `VirtualDisk` resource can be used to create virtual disks outside
379
- of any given `VirtualMachine`
380
- resource. These disks can be attached to a virtual machine by creating a disk
381
- block with the `attach` parameter.
382
-
383
- ## Example Usage
384
-
385
- ```python
386
- import pulumi
387
- import pulumi_vsphere as vsphere
388
-
389
- datacenter = vsphere.get_datacenter(name="dc-01")
390
- datastore = vsphere.get_datacenter(name="datastore-01")
391
- virtual_disk = vsphere.VirtualDisk("virtual_disk",
392
- size=40,
393
- type="thin",
394
- vmdk_path="/foo/foo.vmdk",
395
- create_directories=True,
396
- datacenter=datacenter.name,
397
- datastore=datastore_vsphere_datastore["name"])
398
- ```
399
-
400
- ## Import
401
-
402
- An existing virtual disk can be imported into this resource
403
-
404
- via supplying the full datastore path to the virtual disk. An example is below:
405
-
406
- ```sh
407
- $ pulumi import vsphere:index/virtualDisk:VirtualDisk virtual_disk \\
408
- ```
409
-
410
- '{"virtual_disk_path": "/dc-01/[datastore-01]foo/bar.vmdk", \\ "create_directories": "true"}'
411
-
412
- The above would import the virtual disk located at `foo/bar.vmdk` in the `datastore-01`
413
-
414
- datastore of the `dc-01` datacenter with `create_directories` set as `true`.
415
-
373
+ Create a VirtualDisk resource with the given unique name, props, and options.
416
374
  :param str resource_name: The name of the resource.
417
375
  :param pulumi.ResourceOptions opts: Options for the resource.
418
376
  :param pulumi.Input[str] adapter_type: The adapter type for this virtual disk. Can be
@@ -455,44 +413,7 @@ class VirtualDisk(pulumi.CustomResource):
455
413
  args: VirtualDiskArgs,
456
414
  opts: Optional[pulumi.ResourceOptions] = None):
457
415
  """
458
- The `VirtualDisk` resource can be used to create virtual disks outside
459
- of any given `VirtualMachine`
460
- resource. These disks can be attached to a virtual machine by creating a disk
461
- block with the `attach` parameter.
462
-
463
- ## Example Usage
464
-
465
- ```python
466
- import pulumi
467
- import pulumi_vsphere as vsphere
468
-
469
- datacenter = vsphere.get_datacenter(name="dc-01")
470
- datastore = vsphere.get_datacenter(name="datastore-01")
471
- virtual_disk = vsphere.VirtualDisk("virtual_disk",
472
- size=40,
473
- type="thin",
474
- vmdk_path="/foo/foo.vmdk",
475
- create_directories=True,
476
- datacenter=datacenter.name,
477
- datastore=datastore_vsphere_datastore["name"])
478
- ```
479
-
480
- ## Import
481
-
482
- An existing virtual disk can be imported into this resource
483
-
484
- via supplying the full datastore path to the virtual disk. An example is below:
485
-
486
- ```sh
487
- $ pulumi import vsphere:index/virtualDisk:VirtualDisk virtual_disk \\
488
- ```
489
-
490
- '{"virtual_disk_path": "/dc-01/[datastore-01]foo/bar.vmdk", \\ "create_directories": "true"}'
491
-
492
- The above would import the virtual disk located at `foo/bar.vmdk` in the `datastore-01`
493
-
494
- datastore of the `dc-01` datacenter with `create_directories` set as `true`.
495
-
416
+ Create a VirtualDisk resource with the given unique name, props, and options.
496
417
  :param str resource_name: The name of the resource.
497
418
  :param VirtualDiskArgs args: The arguments to use to populate this resource's properties.
498
419
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -4,14 +4,9 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
- import sys
8
7
  import pulumi
9
8
  import pulumi.runtime
10
9
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
- if sys.version_info >= (3, 11):
12
- from typing import NotRequired, TypedDict, TypeAlias
13
- else:
14
- from typing_extensions import NotRequired, TypedDict, TypeAlias
15
10
  from . import _utilities
16
11
  from . import outputs
17
12
  from ._inputs import *
@@ -2723,30 +2718,7 @@ class VirtualMachine(pulumi.CustomResource):
2723
2718
  wait_for_guest_net_timeout: Optional[pulumi.Input[int]] = None,
2724
2719
  __props__=None):
2725
2720
  """
2726
- ## Import
2727
-
2728
- ### Additional Importing Requirements
2729
-
2730
- Many of the requirements for [cloning](#additional-requirements-and-notes-for-cloning) apply to importing. Although importing writes directly to the Terraform state, some rules can not be enforced during import time, so every effort should be made to ensure the correctness of the configuration before the import.
2731
-
2732
- The following requirements apply to import:
2733
-
2734
- * The disks must have a [`label`](#label) argument assigned in a convention matching `Hard Disk`, starting with disk number 0, based on each virtual disk order on the SCSI bus. As an example, a disk on SCSI controller `0` with a unit number of `0` would be labeled as `Hard Disk 0`, a disk on the same controller with a unit number of `1` would be `Hard Disk 1`, but the next disk, which is on SCSI controller `1` with a unit number of `0`, still becomes `Hard Disk 2`.
2735
-
2736
- * Disks are always imported with [`keep_on_remove`](#keep_on_remove) enabled until the first `pulumi up` run which will remove the setting for known disks. This process safeguards against naming or accounting mistakes in the disk configuration.
2737
-
2738
- * The storage controller count for the resource is set to the number of contiguous storage controllers found, starting with the controller at SCSI bus number `0`. If no storage controllers are discovered, the virtual machine is not eligible for import. For maximum compatibility, ensure that the virtual machine has the exact number of storage controllers needed and set the storage controller count accordingly.
2739
-
2740
- After importing, you should run `pulumi preview`. Unless you have changed anything else in the configuration that would cause other attributes to change. The only difference should be configuration-only changes, which are typically comprised of:
2741
-
2742
- * The [`imported`](#imported) flag will transition from `true` to `false`.
2743
-
2744
- * The [`keep_on_remove`](#keep_on_remove) of known disks will transition from `true` to `false`.
2745
-
2746
- * Configuration supplied in the [`clone`](#clone) block, if present, will be persisted to state. This initial persistence operation does not perform any cloning or customization actions, nor does it force a new resource. After the first apply operation, further changes to `clone` will force the creation of a new resource.
2747
-
2748
- These changes only update Terraform state when applied. Hence, it is safe to run when the virtual machine is running. If more settings are modified, you may need to plan maintenance accordingly for any necessary virtual machine re-configurations.
2749
-
2721
+ Create a VirtualMachine resource with the given unique name, props, and options.
2750
2722
  :param str resource_name: The name of the resource.
2751
2723
  :param pulumi.ResourceOptions opts: Options for the resource.
2752
2724
  :param pulumi.Input[str] alternate_guest_name: The guest name for the operating system when guest_id is otherGuest or otherGuest64.
@@ -2844,30 +2816,7 @@ class VirtualMachine(pulumi.CustomResource):
2844
2816
  args: VirtualMachineArgs,
2845
2817
  opts: Optional[pulumi.ResourceOptions] = None):
2846
2818
  """
2847
- ## Import
2848
-
2849
- ### Additional Importing Requirements
2850
-
2851
- Many of the requirements for [cloning](#additional-requirements-and-notes-for-cloning) apply to importing. Although importing writes directly to the Terraform state, some rules can not be enforced during import time, so every effort should be made to ensure the correctness of the configuration before the import.
2852
-
2853
- The following requirements apply to import:
2854
-
2855
- * The disks must have a [`label`](#label) argument assigned in a convention matching `Hard Disk`, starting with disk number 0, based on each virtual disk order on the SCSI bus. As an example, a disk on SCSI controller `0` with a unit number of `0` would be labeled as `Hard Disk 0`, a disk on the same controller with a unit number of `1` would be `Hard Disk 1`, but the next disk, which is on SCSI controller `1` with a unit number of `0`, still becomes `Hard Disk 2`.
2856
-
2857
- * Disks are always imported with [`keep_on_remove`](#keep_on_remove) enabled until the first `pulumi up` run which will remove the setting for known disks. This process safeguards against naming or accounting mistakes in the disk configuration.
2858
-
2859
- * The storage controller count for the resource is set to the number of contiguous storage controllers found, starting with the controller at SCSI bus number `0`. If no storage controllers are discovered, the virtual machine is not eligible for import. For maximum compatibility, ensure that the virtual machine has the exact number of storage controllers needed and set the storage controller count accordingly.
2860
-
2861
- After importing, you should run `pulumi preview`. Unless you have changed anything else in the configuration that would cause other attributes to change. The only difference should be configuration-only changes, which are typically comprised of:
2862
-
2863
- * The [`imported`](#imported) flag will transition from `true` to `false`.
2864
-
2865
- * The [`keep_on_remove`](#keep_on_remove) of known disks will transition from `true` to `false`.
2866
-
2867
- * Configuration supplied in the [`clone`](#clone) block, if present, will be persisted to state. This initial persistence operation does not perform any cloning or customization actions, nor does it force a new resource. After the first apply operation, further changes to `clone` will force the creation of a new resource.
2868
-
2869
- These changes only update Terraform state when applied. Hence, it is safe to run when the virtual machine is running. If more settings are modified, you may need to plan maintenance accordingly for any necessary virtual machine re-configurations.
2870
-
2819
+ Create a VirtualMachine resource with the given unique name, props, and options.
2871
2820
  :param str resource_name: The name of the resource.
2872
2821
  :param VirtualMachineArgs args: The arguments to use to populate this resource's properties.
2873
2822
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -4,14 +4,9 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
- import sys
8
7
  import pulumi
9
8
  import pulumi.runtime
10
9
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
- if sys.version_info >= (3, 11):
12
- from typing import NotRequired, TypedDict, TypeAlias
13
- else:
14
- from typing_extensions import NotRequired, TypedDict, TypeAlias
15
10
  from . import _utilities
16
11
 
17
12
  __all__ = ['VirtualMachineClassArgs', 'VirtualMachineClass']
@@ -4,14 +4,9 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
- import sys
8
7
  import pulumi
9
8
  import pulumi.runtime
10
9
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
- if sys.version_info >= (3, 11):
12
- from typing import NotRequired, TypedDict, TypeAlias
13
- else:
14
- from typing_extensions import NotRequired, TypedDict, TypeAlias
15
10
  from . import _utilities
16
11
 
17
12
  __all__ = ['VirtualMachineSnapshotArgs', 'VirtualMachineSnapshot']
@@ -4,14 +4,9 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
- import sys
8
7
  import pulumi
9
8
  import pulumi.runtime
10
9
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
- if sys.version_info >= (3, 11):
12
- from typing import NotRequired, TypedDict, TypeAlias
13
- else:
14
- from typing_extensions import NotRequired, TypedDict, TypeAlias
15
10
  from . import _utilities
16
11
  from . import outputs
17
12
  from ._inputs import *