pulumi-vsphere 4.12.0a1727221820__py3-none-any.whl → 4.12.0a1727889180__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.
- pulumi_vsphere/compute_cluster.py +176 -2
- pulumi_vsphere/compute_cluster_host_group.py +62 -2
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +24 -2
- pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +36 -2
- pulumi_vsphere/compute_cluster_vm_dependency_rule.py +200 -2
- pulumi_vsphere/compute_cluster_vm_group.py +158 -2
- pulumi_vsphere/compute_cluster_vm_host_rule.py +68 -2
- pulumi_vsphere/content_library.py +98 -2
- pulumi_vsphere/content_library_item.py +138 -2
- pulumi_vsphere/custom_attribute.py +72 -2
- pulumi_vsphere/datacenter.py +14 -4
- pulumi_vsphere/datastore_cluster.py +58 -2
- pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +154 -2
- pulumi_vsphere/distributed_port_group.py +280 -2
- pulumi_vsphere/distributed_virtual_switch.py +256 -2
- pulumi_vsphere/dpm_host_override.py +58 -2
- pulumi_vsphere/drs_vm_override.py +62 -2
- pulumi_vsphere/folder.py +136 -2
- pulumi_vsphere/get_compute_cluster_host_group.py +2 -2
- pulumi_vsphere/ha_vm_override.py +158 -2
- pulumi_vsphere/host.py +250 -2
- pulumi_vsphere/host_port_group.py +12 -2
- pulumi_vsphere/host_virtual_switch.py +64 -2
- pulumi_vsphere/nas_datastore.py +62 -2
- pulumi_vsphere/pulumi-plugin.json +1 -1
- pulumi_vsphere/resource_pool.py +4 -16
- pulumi_vsphere/role.py +28 -2
- pulumi_vsphere/storage_drs_vm_override.py +128 -2
- pulumi_vsphere/tag.py +154 -2
- pulumi_vsphere/tag_category.py +78 -2
- pulumi_vsphere/vapp_container.py +158 -2
- pulumi_vsphere/vapp_entity.py +142 -2
- pulumi_vsphere/virtual_disk.py +76 -2
- pulumi_vsphere/virtual_machine.py +48 -2
- pulumi_vsphere/vmfs_datastore.py +266 -2
- pulumi_vsphere/vnic.py +14 -4
- {pulumi_vsphere-4.12.0a1727221820.dist-info → pulumi_vsphere-4.12.0a1727889180.dist-info}/METADATA +1 -1
- {pulumi_vsphere-4.12.0a1727221820.dist-info → pulumi_vsphere-4.12.0a1727889180.dist-info}/RECORD +40 -40
- {pulumi_vsphere-4.12.0a1727221820.dist-info → pulumi_vsphere-4.12.0a1727889180.dist-info}/WHEEL +0 -0
- {pulumi_vsphere-4.12.0a1727221820.dist-info → pulumi_vsphere-4.12.0a1727889180.dist-info}/top_level.txt +0 -0
pulumi_vsphere/ha_vm_override.py
CHANGED
|
@@ -575,7 +575,85 @@ class HaVmOverride(pulumi.CustomResource):
|
|
|
575
575
|
virtual_machine_id: Optional[pulumi.Input[str]] = None,
|
|
576
576
|
__props__=None):
|
|
577
577
|
"""
|
|
578
|
-
|
|
578
|
+
The `HaVmOverride` resource can be used to add an override for
|
|
579
|
+
vSphere HA settings on a cluster for a specific virtual machine. With this
|
|
580
|
+
resource, one can control specific HA settings so that they are different than
|
|
581
|
+
the cluster default, accommodating the needs of that specific virtual machine,
|
|
582
|
+
while not affecting the rest of the cluster.
|
|
583
|
+
|
|
584
|
+
For more information on vSphere HA, see [this page][ref-vsphere-ha-clusters].
|
|
585
|
+
|
|
586
|
+
[ref-vsphere-ha-clusters]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-availability/GUID-5432CA24-14F1-44E3-87FB-61D937831CF6.html
|
|
587
|
+
|
|
588
|
+
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
589
|
+
connections.
|
|
590
|
+
|
|
591
|
+
## Example Usage
|
|
592
|
+
|
|
593
|
+
The example below creates a virtual machine in a cluster using the
|
|
594
|
+
`VirtualMachine` resource, creating the
|
|
595
|
+
virtual machine in the cluster looked up by the
|
|
596
|
+
`ComputeCluster` data source.
|
|
597
|
+
|
|
598
|
+
Considering a scenario where this virtual machine is of high value to the
|
|
599
|
+
application or organization for which it does its work, it's been determined in
|
|
600
|
+
the event of a host failure, that this should be one of the first virtual
|
|
601
|
+
machines to be started by vSphere HA during recovery. Hence, it
|
|
602
|
+
`ha_vm_restart_priority` has been set to `highest`,
|
|
603
|
+
which, assuming that the default restart priority is `medium` and no other
|
|
604
|
+
virtual machine has been assigned the `highest` priority, will mean that this
|
|
605
|
+
VM will be started before any other virtual machine in the event of host
|
|
606
|
+
failure.
|
|
607
|
+
|
|
608
|
+
```python
|
|
609
|
+
import pulumi
|
|
610
|
+
import pulumi_vsphere as vsphere
|
|
611
|
+
|
|
612
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
613
|
+
datastore = vsphere.get_datastore(name="datastore1",
|
|
614
|
+
datacenter_id=datacenter.id)
|
|
615
|
+
cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
616
|
+
datacenter_id=datacenter.id)
|
|
617
|
+
network = vsphere.get_network(name="network1",
|
|
618
|
+
datacenter_id=datacenter.id)
|
|
619
|
+
vm = vsphere.VirtualMachine("vm",
|
|
620
|
+
name="test",
|
|
621
|
+
resource_pool_id=cluster.resource_pool_id,
|
|
622
|
+
datastore_id=datastore.id,
|
|
623
|
+
num_cpus=2,
|
|
624
|
+
memory=2048,
|
|
625
|
+
guest_id="otherLinux64Guest",
|
|
626
|
+
network_interfaces=[{
|
|
627
|
+
"network_id": network.id,
|
|
628
|
+
}],
|
|
629
|
+
disks=[{
|
|
630
|
+
"label": "disk0",
|
|
631
|
+
"size": 20,
|
|
632
|
+
}])
|
|
633
|
+
ha_vm_override = vsphere.HaVmOverride("ha_vm_override",
|
|
634
|
+
compute_cluster_id=cluster.id,
|
|
635
|
+
virtual_machine_id=vm.id,
|
|
636
|
+
ha_vm_restart_priority="highest")
|
|
637
|
+
```
|
|
638
|
+
|
|
639
|
+
## Import
|
|
640
|
+
|
|
641
|
+
An existing override can be imported into this resource by
|
|
642
|
+
|
|
643
|
+
supplying both the path to the cluster, and the path to the virtual machine, to
|
|
644
|
+
|
|
645
|
+
`pulumi import`. If no override exists, an error will be given. An example
|
|
646
|
+
|
|
647
|
+
is below:
|
|
648
|
+
|
|
649
|
+
```sh
|
|
650
|
+
$ pulumi import vsphere:index/haVmOverride:HaVmOverride ha_vm_override \\
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
'{"compute_cluster_path": "/dc1/host/cluster1", \\
|
|
654
|
+
|
|
655
|
+
"virtual_machine_path": "/dc1/vm/srv1"}'
|
|
656
|
+
|
|
579
657
|
:param str resource_name: The name of the resource.
|
|
580
658
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
581
659
|
:param pulumi.Input[str] compute_cluster_id: The managed object ID of the cluster.
|
|
@@ -613,7 +691,85 @@ class HaVmOverride(pulumi.CustomResource):
|
|
|
613
691
|
args: HaVmOverrideArgs,
|
|
614
692
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
615
693
|
"""
|
|
616
|
-
|
|
694
|
+
The `HaVmOverride` resource can be used to add an override for
|
|
695
|
+
vSphere HA settings on a cluster for a specific virtual machine. With this
|
|
696
|
+
resource, one can control specific HA settings so that they are different than
|
|
697
|
+
the cluster default, accommodating the needs of that specific virtual machine,
|
|
698
|
+
while not affecting the rest of the cluster.
|
|
699
|
+
|
|
700
|
+
For more information on vSphere HA, see [this page][ref-vsphere-ha-clusters].
|
|
701
|
+
|
|
702
|
+
[ref-vsphere-ha-clusters]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-availability/GUID-5432CA24-14F1-44E3-87FB-61D937831CF6.html
|
|
703
|
+
|
|
704
|
+
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
705
|
+
connections.
|
|
706
|
+
|
|
707
|
+
## Example Usage
|
|
708
|
+
|
|
709
|
+
The example below creates a virtual machine in a cluster using the
|
|
710
|
+
`VirtualMachine` resource, creating the
|
|
711
|
+
virtual machine in the cluster looked up by the
|
|
712
|
+
`ComputeCluster` data source.
|
|
713
|
+
|
|
714
|
+
Considering a scenario where this virtual machine is of high value to the
|
|
715
|
+
application or organization for which it does its work, it's been determined in
|
|
716
|
+
the event of a host failure, that this should be one of the first virtual
|
|
717
|
+
machines to be started by vSphere HA during recovery. Hence, it
|
|
718
|
+
`ha_vm_restart_priority` has been set to `highest`,
|
|
719
|
+
which, assuming that the default restart priority is `medium` and no other
|
|
720
|
+
virtual machine has been assigned the `highest` priority, will mean that this
|
|
721
|
+
VM will be started before any other virtual machine in the event of host
|
|
722
|
+
failure.
|
|
723
|
+
|
|
724
|
+
```python
|
|
725
|
+
import pulumi
|
|
726
|
+
import pulumi_vsphere as vsphere
|
|
727
|
+
|
|
728
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
729
|
+
datastore = vsphere.get_datastore(name="datastore1",
|
|
730
|
+
datacenter_id=datacenter.id)
|
|
731
|
+
cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
732
|
+
datacenter_id=datacenter.id)
|
|
733
|
+
network = vsphere.get_network(name="network1",
|
|
734
|
+
datacenter_id=datacenter.id)
|
|
735
|
+
vm = vsphere.VirtualMachine("vm",
|
|
736
|
+
name="test",
|
|
737
|
+
resource_pool_id=cluster.resource_pool_id,
|
|
738
|
+
datastore_id=datastore.id,
|
|
739
|
+
num_cpus=2,
|
|
740
|
+
memory=2048,
|
|
741
|
+
guest_id="otherLinux64Guest",
|
|
742
|
+
network_interfaces=[{
|
|
743
|
+
"network_id": network.id,
|
|
744
|
+
}],
|
|
745
|
+
disks=[{
|
|
746
|
+
"label": "disk0",
|
|
747
|
+
"size": 20,
|
|
748
|
+
}])
|
|
749
|
+
ha_vm_override = vsphere.HaVmOverride("ha_vm_override",
|
|
750
|
+
compute_cluster_id=cluster.id,
|
|
751
|
+
virtual_machine_id=vm.id,
|
|
752
|
+
ha_vm_restart_priority="highest")
|
|
753
|
+
```
|
|
754
|
+
|
|
755
|
+
## Import
|
|
756
|
+
|
|
757
|
+
An existing override can be imported into this resource by
|
|
758
|
+
|
|
759
|
+
supplying both the path to the cluster, and the path to the virtual machine, to
|
|
760
|
+
|
|
761
|
+
`pulumi import`. If no override exists, an error will be given. An example
|
|
762
|
+
|
|
763
|
+
is below:
|
|
764
|
+
|
|
765
|
+
```sh
|
|
766
|
+
$ pulumi import vsphere:index/haVmOverride:HaVmOverride ha_vm_override \\
|
|
767
|
+
```
|
|
768
|
+
|
|
769
|
+
'{"compute_cluster_path": "/dc1/host/cluster1", \\
|
|
770
|
+
|
|
771
|
+
"virtual_machine_path": "/dc1/vm/srv1"}'
|
|
772
|
+
|
|
617
773
|
:param str resource_name: The name of the resource.
|
|
618
774
|
:param HaVmOverrideArgs args: The arguments to use to populate this resource's properties.
|
|
619
775
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
pulumi_vsphere/host.py
CHANGED
|
@@ -644,7 +644,131 @@ class Host(pulumi.CustomResource):
|
|
|
644
644
|
username: Optional[pulumi.Input[str]] = None,
|
|
645
645
|
__props__=None):
|
|
646
646
|
"""
|
|
647
|
-
|
|
647
|
+
Provides a VMware vSphere host resource. This represents an ESXi host that
|
|
648
|
+
can be used either as a member of a cluster or as a standalone host.
|
|
649
|
+
|
|
650
|
+
## Example Usage
|
|
651
|
+
|
|
652
|
+
### Create a standalone host
|
|
653
|
+
|
|
654
|
+
```python
|
|
655
|
+
import pulumi
|
|
656
|
+
import pulumi_vsphere as vsphere
|
|
657
|
+
|
|
658
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
659
|
+
thumbprint = vsphere.get_host_thumbprint(address="esx-01.example.com",
|
|
660
|
+
insecure=True)
|
|
661
|
+
esx_01 = vsphere.Host("esx-01",
|
|
662
|
+
hostname="esx-01.example.com",
|
|
663
|
+
username="root",
|
|
664
|
+
password="password",
|
|
665
|
+
license="00000-00000-00000-00000-00000",
|
|
666
|
+
thumbprint=thumbprint.id,
|
|
667
|
+
datacenter=datacenter.id)
|
|
668
|
+
```
|
|
669
|
+
|
|
670
|
+
## Import
|
|
671
|
+
|
|
672
|
+
An existing host can be imported into this resource by supplying
|
|
673
|
+
|
|
674
|
+
the host's ID.
|
|
675
|
+
|
|
676
|
+
[docs-import]: /docs/import/index.html
|
|
677
|
+
|
|
678
|
+
Obtain the host's ID using the data source. For example:
|
|
679
|
+
|
|
680
|
+
hcl
|
|
681
|
+
|
|
682
|
+
data "vsphere_datacenter" "datacenter" {
|
|
683
|
+
|
|
684
|
+
name = "dc-01"
|
|
685
|
+
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
data "vsphere_host" "host" {
|
|
689
|
+
|
|
690
|
+
name = "esx-01.example.com"
|
|
691
|
+
|
|
692
|
+
datacenter_id = data.vsphere_datacenter.datacenter.id
|
|
693
|
+
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
output "host_id" {
|
|
697
|
+
|
|
698
|
+
value = data.vsphere_host.host.id
|
|
699
|
+
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
Next, create a resource configuration, For example:
|
|
703
|
+
|
|
704
|
+
hcl
|
|
705
|
+
|
|
706
|
+
data "vsphere_datacenter" "datacenter" {
|
|
707
|
+
|
|
708
|
+
name = "dc-01"
|
|
709
|
+
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
data "vsphere_host_thumbprint" "thumbprint" {
|
|
713
|
+
|
|
714
|
+
address = "esx-01.example.com"
|
|
715
|
+
|
|
716
|
+
insecure = true
|
|
717
|
+
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
resource "vsphere_host" "esx-01" {
|
|
721
|
+
|
|
722
|
+
hostname = "esx-01.example.com"
|
|
723
|
+
|
|
724
|
+
username = "root"
|
|
725
|
+
|
|
726
|
+
password = "password"
|
|
727
|
+
|
|
728
|
+
thumbprint = data.vsphere_host_thumbprint.thumbprint.id
|
|
729
|
+
|
|
730
|
+
datacenter = data.vsphere_datacenter.datacenter.id
|
|
731
|
+
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
hcl
|
|
735
|
+
|
|
736
|
+
resource "vsphere_host" "esx-01" {
|
|
737
|
+
|
|
738
|
+
hostname = "esx-01.example.com"
|
|
739
|
+
|
|
740
|
+
username = "root"
|
|
741
|
+
|
|
742
|
+
password = "password"
|
|
743
|
+
|
|
744
|
+
license = "00000-00000-00000-00000-00000"
|
|
745
|
+
|
|
746
|
+
thumbprint = data.vsphere_host_thumbprint.thumbprint.id
|
|
747
|
+
|
|
748
|
+
cluster = data.vsphere_compute_cluster.cluster.id
|
|
749
|
+
|
|
750
|
+
services {
|
|
751
|
+
|
|
752
|
+
ntpd {
|
|
753
|
+
|
|
754
|
+
enabled = true
|
|
755
|
+
|
|
756
|
+
policy = "on"
|
|
757
|
+
|
|
758
|
+
ntp_servers = ["pool.ntp.org"]
|
|
759
|
+
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
console
|
|
765
|
+
|
|
766
|
+
```sh
|
|
767
|
+
$ pulumi import vsphere:index/host:Host esx-01 host-123
|
|
768
|
+
```
|
|
769
|
+
|
|
770
|
+
The above would import the host `esx-01.example.com` with the host ID `host-123`.
|
|
771
|
+
|
|
648
772
|
:param str resource_name: The name of the resource.
|
|
649
773
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
650
774
|
:param pulumi.Input[str] cluster: The ID of the Compute Cluster this host should
|
|
@@ -699,7 +823,131 @@ class Host(pulumi.CustomResource):
|
|
|
699
823
|
args: HostArgs,
|
|
700
824
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
701
825
|
"""
|
|
702
|
-
|
|
826
|
+
Provides a VMware vSphere host resource. This represents an ESXi host that
|
|
827
|
+
can be used either as a member of a cluster or as a standalone host.
|
|
828
|
+
|
|
829
|
+
## Example Usage
|
|
830
|
+
|
|
831
|
+
### Create a standalone host
|
|
832
|
+
|
|
833
|
+
```python
|
|
834
|
+
import pulumi
|
|
835
|
+
import pulumi_vsphere as vsphere
|
|
836
|
+
|
|
837
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
838
|
+
thumbprint = vsphere.get_host_thumbprint(address="esx-01.example.com",
|
|
839
|
+
insecure=True)
|
|
840
|
+
esx_01 = vsphere.Host("esx-01",
|
|
841
|
+
hostname="esx-01.example.com",
|
|
842
|
+
username="root",
|
|
843
|
+
password="password",
|
|
844
|
+
license="00000-00000-00000-00000-00000",
|
|
845
|
+
thumbprint=thumbprint.id,
|
|
846
|
+
datacenter=datacenter.id)
|
|
847
|
+
```
|
|
848
|
+
|
|
849
|
+
## Import
|
|
850
|
+
|
|
851
|
+
An existing host can be imported into this resource by supplying
|
|
852
|
+
|
|
853
|
+
the host's ID.
|
|
854
|
+
|
|
855
|
+
[docs-import]: /docs/import/index.html
|
|
856
|
+
|
|
857
|
+
Obtain the host's ID using the data source. For example:
|
|
858
|
+
|
|
859
|
+
hcl
|
|
860
|
+
|
|
861
|
+
data "vsphere_datacenter" "datacenter" {
|
|
862
|
+
|
|
863
|
+
name = "dc-01"
|
|
864
|
+
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
data "vsphere_host" "host" {
|
|
868
|
+
|
|
869
|
+
name = "esx-01.example.com"
|
|
870
|
+
|
|
871
|
+
datacenter_id = data.vsphere_datacenter.datacenter.id
|
|
872
|
+
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
output "host_id" {
|
|
876
|
+
|
|
877
|
+
value = data.vsphere_host.host.id
|
|
878
|
+
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
Next, create a resource configuration, For example:
|
|
882
|
+
|
|
883
|
+
hcl
|
|
884
|
+
|
|
885
|
+
data "vsphere_datacenter" "datacenter" {
|
|
886
|
+
|
|
887
|
+
name = "dc-01"
|
|
888
|
+
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
data "vsphere_host_thumbprint" "thumbprint" {
|
|
892
|
+
|
|
893
|
+
address = "esx-01.example.com"
|
|
894
|
+
|
|
895
|
+
insecure = true
|
|
896
|
+
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
resource "vsphere_host" "esx-01" {
|
|
900
|
+
|
|
901
|
+
hostname = "esx-01.example.com"
|
|
902
|
+
|
|
903
|
+
username = "root"
|
|
904
|
+
|
|
905
|
+
password = "password"
|
|
906
|
+
|
|
907
|
+
thumbprint = data.vsphere_host_thumbprint.thumbprint.id
|
|
908
|
+
|
|
909
|
+
datacenter = data.vsphere_datacenter.datacenter.id
|
|
910
|
+
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
hcl
|
|
914
|
+
|
|
915
|
+
resource "vsphere_host" "esx-01" {
|
|
916
|
+
|
|
917
|
+
hostname = "esx-01.example.com"
|
|
918
|
+
|
|
919
|
+
username = "root"
|
|
920
|
+
|
|
921
|
+
password = "password"
|
|
922
|
+
|
|
923
|
+
license = "00000-00000-00000-00000-00000"
|
|
924
|
+
|
|
925
|
+
thumbprint = data.vsphere_host_thumbprint.thumbprint.id
|
|
926
|
+
|
|
927
|
+
cluster = data.vsphere_compute_cluster.cluster.id
|
|
928
|
+
|
|
929
|
+
services {
|
|
930
|
+
|
|
931
|
+
ntpd {
|
|
932
|
+
|
|
933
|
+
enabled = true
|
|
934
|
+
|
|
935
|
+
policy = "on"
|
|
936
|
+
|
|
937
|
+
ntp_servers = ["pool.ntp.org"]
|
|
938
|
+
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
console
|
|
944
|
+
|
|
945
|
+
```sh
|
|
946
|
+
$ pulumi import vsphere:index/host:Host esx-01 host-123
|
|
947
|
+
```
|
|
948
|
+
|
|
949
|
+
The above would import the host `esx-01.example.com` with the host ID `host-123`.
|
|
950
|
+
|
|
703
951
|
:param str resource_name: The name of the resource.
|
|
704
952
|
:param HostArgs args: The arguments to use to populate this resource's properties.
|
|
705
953
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -750,11 +750,16 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
750
750
|
allow_promiscuous=True)
|
|
751
751
|
```
|
|
752
752
|
|
|
753
|
-
##
|
|
753
|
+
## Import
|
|
754
754
|
|
|
755
755
|
An existing host port group can be imported into this resource
|
|
756
|
+
|
|
756
757
|
using the host port group's ID. An example is below:
|
|
757
758
|
|
|
759
|
+
```sh
|
|
760
|
+
$ pulumi import vsphere:index/hostPortGroup:HostPortGroup management tf-HostPortGroup:host-123:management
|
|
761
|
+
```
|
|
762
|
+
|
|
758
763
|
The above would import the `management` host port group from host with ID `host-123`.
|
|
759
764
|
|
|
760
765
|
:param str resource_name: The name of the resource.
|
|
@@ -860,11 +865,16 @@ class HostPortGroup(pulumi.CustomResource):
|
|
|
860
865
|
allow_promiscuous=True)
|
|
861
866
|
```
|
|
862
867
|
|
|
863
|
-
##
|
|
868
|
+
## Import
|
|
864
869
|
|
|
865
870
|
An existing host port group can be imported into this resource
|
|
871
|
+
|
|
866
872
|
using the host port group's ID. An example is below:
|
|
867
873
|
|
|
874
|
+
```sh
|
|
875
|
+
$ pulumi import vsphere:index/hostPortGroup:HostPortGroup management tf-HostPortGroup:host-123:management
|
|
876
|
+
```
|
|
877
|
+
|
|
868
878
|
The above would import the `management` host port group from host with ID `host-123`.
|
|
869
879
|
|
|
870
880
|
:param str resource_name: The name of the resource.
|
|
@@ -764,7 +764,38 @@ class HostVirtualSwitch(pulumi.CustomResource):
|
|
|
764
764
|
teaming_policy: Optional[pulumi.Input[str]] = None,
|
|
765
765
|
__props__=None):
|
|
766
766
|
"""
|
|
767
|
-
|
|
767
|
+
The `HostVirtualSwitch` resource can be used to manage vSphere
|
|
768
|
+
standard switches on an ESXi host. These switches can be used as a backing for
|
|
769
|
+
standard port groups, which can be managed by the
|
|
770
|
+
`HostPortGroup` resource.
|
|
771
|
+
|
|
772
|
+
For an overview on vSphere networking concepts, see [this
|
|
773
|
+
page][ref-vsphere-net-concepts].
|
|
774
|
+
|
|
775
|
+
[ref-vsphere-net-concepts]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-2B11DBB8-CB3C-4AFF-8885-EFEA0FC562F4.html
|
|
776
|
+
|
|
777
|
+
## Example Usage
|
|
778
|
+
|
|
779
|
+
## Import
|
|
780
|
+
|
|
781
|
+
An existing vSwitch can be imported into this resource by its ID.
|
|
782
|
+
|
|
783
|
+
The convention of the id is a prefix, the host system [managed objectID][docs-about-morefs], and the virtual switch
|
|
784
|
+
|
|
785
|
+
name. An example would be `tf-HostVirtualSwitch:host-10:vSwitchTerraformTest`.
|
|
786
|
+
|
|
787
|
+
Import can the be done via the following command:
|
|
788
|
+
|
|
789
|
+
[docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
|
|
790
|
+
|
|
791
|
+
```sh
|
|
792
|
+
$ pulumi import vsphere:index/hostVirtualSwitch:HostVirtualSwitch switch tf-HostVirtualSwitch:host-10:vSwitchTerraformTest
|
|
793
|
+
```
|
|
794
|
+
|
|
795
|
+
The above would import the vSwitch named `vSwitchTerraformTest` that is located in the `host-10`
|
|
796
|
+
|
|
797
|
+
vSphere host.
|
|
798
|
+
|
|
768
799
|
:param str resource_name: The name of the resource.
|
|
769
800
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
770
801
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] active_nics: List of active network adapters used for load balancing.
|
|
@@ -806,7 +837,38 @@ class HostVirtualSwitch(pulumi.CustomResource):
|
|
|
806
837
|
args: HostVirtualSwitchArgs,
|
|
807
838
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
808
839
|
"""
|
|
809
|
-
|
|
840
|
+
The `HostVirtualSwitch` resource can be used to manage vSphere
|
|
841
|
+
standard switches on an ESXi host. These switches can be used as a backing for
|
|
842
|
+
standard port groups, which can be managed by the
|
|
843
|
+
`HostPortGroup` resource.
|
|
844
|
+
|
|
845
|
+
For an overview on vSphere networking concepts, see [this
|
|
846
|
+
page][ref-vsphere-net-concepts].
|
|
847
|
+
|
|
848
|
+
[ref-vsphere-net-concepts]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-2B11DBB8-CB3C-4AFF-8885-EFEA0FC562F4.html
|
|
849
|
+
|
|
850
|
+
## Example Usage
|
|
851
|
+
|
|
852
|
+
## Import
|
|
853
|
+
|
|
854
|
+
An existing vSwitch can be imported into this resource by its ID.
|
|
855
|
+
|
|
856
|
+
The convention of the id is a prefix, the host system [managed objectID][docs-about-morefs], and the virtual switch
|
|
857
|
+
|
|
858
|
+
name. An example would be `tf-HostVirtualSwitch:host-10:vSwitchTerraformTest`.
|
|
859
|
+
|
|
860
|
+
Import can the be done via the following command:
|
|
861
|
+
|
|
862
|
+
[docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
|
|
863
|
+
|
|
864
|
+
```sh
|
|
865
|
+
$ pulumi import vsphere:index/hostVirtualSwitch:HostVirtualSwitch switch tf-HostVirtualSwitch:host-10:vSwitchTerraformTest
|
|
866
|
+
```
|
|
867
|
+
|
|
868
|
+
The above would import the vSwitch named `vSwitchTerraformTest` that is located in the `host-10`
|
|
869
|
+
|
|
870
|
+
vSphere host.
|
|
871
|
+
|
|
810
872
|
:param str resource_name: The name of the resource.
|
|
811
873
|
:param HostVirtualSwitchArgs args: The arguments to use to populate this resource's properties.
|
|
812
874
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
pulumi_vsphere/nas_datastore.py
CHANGED
|
@@ -638,7 +638,37 @@ class NasDatastore(pulumi.CustomResource):
|
|
|
638
638
|
type: Optional[pulumi.Input[str]] = None,
|
|
639
639
|
__props__=None):
|
|
640
640
|
"""
|
|
641
|
-
|
|
641
|
+
The `NasDatastore` resource can be used to create and manage NAS
|
|
642
|
+
datastores on an ESXi host or a set of hosts. The resource supports mounting
|
|
643
|
+
NFS v3 and v4.1 shares to be used as datastores.
|
|
644
|
+
|
|
645
|
+
> **NOTE:** Unlike `VmfsDatastore`, a NAS
|
|
646
|
+
datastore is only mounted on the hosts you choose to mount it on. To mount on
|
|
647
|
+
multiple hosts, you must specify each host that you want to add in the
|
|
648
|
+
`host_system_ids` argument.
|
|
649
|
+
|
|
650
|
+
## Import
|
|
651
|
+
|
|
652
|
+
An existing NAS datastore can be imported into this resource via
|
|
653
|
+
|
|
654
|
+
its managed object ID, via the following command:
|
|
655
|
+
|
|
656
|
+
```sh
|
|
657
|
+
$ pulumi import vsphere:index/nasDatastore:NasDatastore datastore datastore-123
|
|
658
|
+
```
|
|
659
|
+
|
|
660
|
+
You need a tool like [`govc`][ext-govc] that can display managed object IDs.
|
|
661
|
+
|
|
662
|
+
[ext-govc]: https://github.com/vmware/govmomi/tree/master/govc
|
|
663
|
+
|
|
664
|
+
In the case of govc, you can locate a managed object ID from an inventory path
|
|
665
|
+
|
|
666
|
+
by doing the following:
|
|
667
|
+
|
|
668
|
+
$ govc ls -i /dc/datastore/terraform-test
|
|
669
|
+
|
|
670
|
+
Datastore:datastore-123
|
|
671
|
+
|
|
642
672
|
:param str resource_name: The name of the resource.
|
|
643
673
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
644
674
|
:param pulumi.Input[str] access_mode: Access mode for the mount point. Can be one of
|
|
@@ -687,7 +717,37 @@ class NasDatastore(pulumi.CustomResource):
|
|
|
687
717
|
args: NasDatastoreArgs,
|
|
688
718
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
689
719
|
"""
|
|
690
|
-
|
|
720
|
+
The `NasDatastore` resource can be used to create and manage NAS
|
|
721
|
+
datastores on an ESXi host or a set of hosts. The resource supports mounting
|
|
722
|
+
NFS v3 and v4.1 shares to be used as datastores.
|
|
723
|
+
|
|
724
|
+
> **NOTE:** Unlike `VmfsDatastore`, a NAS
|
|
725
|
+
datastore is only mounted on the hosts you choose to mount it on. To mount on
|
|
726
|
+
multiple hosts, you must specify each host that you want to add in the
|
|
727
|
+
`host_system_ids` argument.
|
|
728
|
+
|
|
729
|
+
## Import
|
|
730
|
+
|
|
731
|
+
An existing NAS datastore can be imported into this resource via
|
|
732
|
+
|
|
733
|
+
its managed object ID, via the following command:
|
|
734
|
+
|
|
735
|
+
```sh
|
|
736
|
+
$ pulumi import vsphere:index/nasDatastore:NasDatastore datastore datastore-123
|
|
737
|
+
```
|
|
738
|
+
|
|
739
|
+
You need a tool like [`govc`][ext-govc] that can display managed object IDs.
|
|
740
|
+
|
|
741
|
+
[ext-govc]: https://github.com/vmware/govmomi/tree/master/govc
|
|
742
|
+
|
|
743
|
+
In the case of govc, you can locate a managed object ID from an inventory path
|
|
744
|
+
|
|
745
|
+
by doing the following:
|
|
746
|
+
|
|
747
|
+
$ govc ls -i /dc/datastore/terraform-test
|
|
748
|
+
|
|
749
|
+
Datastore:datastore-123
|
|
750
|
+
|
|
691
751
|
:param str resource_name: The name of the resource.
|
|
692
752
|
:param NasDatastoreArgs args: The arguments to use to populate this resource's properties.
|
|
693
753
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
pulumi_vsphere/resource_pool.py
CHANGED
|
@@ -698,19 +698,13 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
698
698
|
parent_resource_pool_id=resource_pool_parent.id)
|
|
699
699
|
```
|
|
700
700
|
|
|
701
|
-
##
|
|
702
|
-
|
|
703
|
-
An existing resource pool can be imported into this resource via
|
|
704
|
-
the path to the resource pool, using the following command:
|
|
705
|
-
|
|
706
|
-
The above would import the resource pool named `resource-pool-01` that is located
|
|
707
|
-
in the compute cluster `cluster-01` in the `dc-01` datacenter.
|
|
701
|
+
## Import
|
|
708
702
|
|
|
709
703
|
### Settings that Require vSphere 7.0 or higher
|
|
710
704
|
|
|
711
705
|
These settings require vSphere 7.0 or higher:
|
|
712
706
|
|
|
713
|
-
* `scale_descendants_shares`
|
|
707
|
+
* [`scale_descendants_shares`](#scale_descendants_shares)
|
|
714
708
|
|
|
715
709
|
:param str resource_name: The name of the resource.
|
|
716
710
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -820,19 +814,13 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
820
814
|
parent_resource_pool_id=resource_pool_parent.id)
|
|
821
815
|
```
|
|
822
816
|
|
|
823
|
-
##
|
|
824
|
-
|
|
825
|
-
An existing resource pool can be imported into this resource via
|
|
826
|
-
the path to the resource pool, using the following command:
|
|
827
|
-
|
|
828
|
-
The above would import the resource pool named `resource-pool-01` that is located
|
|
829
|
-
in the compute cluster `cluster-01` in the `dc-01` datacenter.
|
|
817
|
+
## Import
|
|
830
818
|
|
|
831
819
|
### Settings that Require vSphere 7.0 or higher
|
|
832
820
|
|
|
833
821
|
These settings require vSphere 7.0 or higher:
|
|
834
822
|
|
|
835
|
-
* `scale_descendants_shares`
|
|
823
|
+
* [`scale_descendants_shares`](#scale_descendants_shares)
|
|
836
824
|
|
|
837
825
|
:param str resource_name: The name of the resource.
|
|
838
826
|
:param ResourcePoolArgs args: The arguments to use to populate this resource's properties.
|