pulumi-vsphere 4.14.0a1746734806__py3-none-any.whl → 4.15.0__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/__init__.py +1 -1
- pulumi_vsphere/_inputs.py +1 -1
- pulumi_vsphere/_utilities.py +1 -1
- pulumi_vsphere/compute_cluster.py +11 -11
- pulumi_vsphere/compute_cluster_host_group.py +71 -1
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +1 -1
- pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +5 -1
- pulumi_vsphere/compute_cluster_vm_dependency_rule.py +5 -1
- pulumi_vsphere/compute_cluster_vm_group.py +5 -1
- pulumi_vsphere/compute_cluster_vm_host_rule.py +5 -1
- pulumi_vsphere/config/__init__.py +1 -1
- pulumi_vsphere/config/__init__.pyi +1 -1
- pulumi_vsphere/config/vars.py +1 -1
- pulumi_vsphere/content_library.py +5 -1
- pulumi_vsphere/content_library_item.py +5 -1
- pulumi_vsphere/custom_attribute.py +5 -1
- pulumi_vsphere/datacenter.py +1 -1
- pulumi_vsphere/datastore_cluster.py +89 -1
- pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +5 -1
- pulumi_vsphere/distributed_port_group.py +5 -1
- pulumi_vsphere/distributed_virtual_switch.py +5 -1
- pulumi_vsphere/distributed_virtual_switch_pvlan_mapping.py +1 -1
- pulumi_vsphere/dpm_host_override.py +89 -1
- pulumi_vsphere/drs_vm_override.py +5 -1
- pulumi_vsphere/entity_permissions.py +1 -1
- pulumi_vsphere/file.py +35 -50
- pulumi_vsphere/folder.py +17 -13
- pulumi_vsphere/get_compute_cluster.py +1 -1
- pulumi_vsphere/get_compute_cluster_host_group.py +1 -5
- pulumi_vsphere/get_content_library.py +1 -1
- pulumi_vsphere/get_content_library_item.py +1 -1
- pulumi_vsphere/get_custom_attribute.py +1 -1
- pulumi_vsphere/get_datacenter.py +1 -1
- pulumi_vsphere/get_datastore.py +1 -1
- pulumi_vsphere/get_datastore_cluster.py +2 -2
- pulumi_vsphere/get_datastore_stats.py +1 -5
- pulumi_vsphere/get_distributed_virtual_switch.py +1 -1
- pulumi_vsphere/get_dynamic.py +1 -5
- pulumi_vsphere/get_folder.py +131 -9
- pulumi_vsphere/get_guest_os_customization.py +22 -3
- pulumi_vsphere/get_host.py +1 -1
- pulumi_vsphere/get_host_base_images.py +1 -1
- pulumi_vsphere/get_host_pci_device.py +1 -1
- pulumi_vsphere/get_host_thumbprint.py +1 -1
- pulumi_vsphere/get_host_vgpu_profile.py +1 -1
- pulumi_vsphere/get_license.py +9 -7
- pulumi_vsphere/get_network.py +56 -5
- pulumi_vsphere/get_ovf_vm_template.py +5 -5
- pulumi_vsphere/get_policy.py +1 -1
- pulumi_vsphere/get_resource_pool.py +64 -13
- pulumi_vsphere/get_role.py +1 -1
- pulumi_vsphere/get_tag.py +1 -1
- pulumi_vsphere/get_tag_category.py +1 -1
- pulumi_vsphere/get_vapp_container.py +1 -1
- pulumi_vsphere/get_virtual_machine.py +1 -1
- pulumi_vsphere/get_vmfs_disks.py +1 -1
- pulumi_vsphere/guest_os_customization.py +1 -1
- pulumi_vsphere/ha_vm_override.py +5 -1
- pulumi_vsphere/host.py +61 -7
- pulumi_vsphere/host_port_group.py +1 -1
- pulumi_vsphere/host_virtual_switch.py +5 -1
- pulumi_vsphere/license.py +67 -27
- pulumi_vsphere/nas_datastore.py +63 -1
- pulumi_vsphere/offline_software_depot.py +5 -1
- pulumi_vsphere/outputs.py +34 -1
- pulumi_vsphere/provider.py +36 -38
- pulumi_vsphere/pulumi-plugin.json +1 -1
- pulumi_vsphere/resource_pool.py +490 -164
- pulumi_vsphere/role.py +1 -1
- pulumi_vsphere/storage_drs_vm_override.py +5 -1
- pulumi_vsphere/supervisor.py +3 -3
- pulumi_vsphere/tag.py +5 -1
- pulumi_vsphere/tag_category.py +5 -1
- pulumi_vsphere/vapp_container.py +5 -1
- pulumi_vsphere/vapp_entity.py +5 -1
- pulumi_vsphere/virtual_disk.py +5 -1
- pulumi_vsphere/virtual_machine.py +5 -5
- pulumi_vsphere/virtual_machine_class.py +5 -5
- pulumi_vsphere/virtual_machine_snapshot.py +1 -1
- pulumi_vsphere/vm_storage_policy.py +1 -1
- pulumi_vsphere/vmfs_datastore.py +5 -1
- pulumi_vsphere/vnic.py +1 -1
- {pulumi_vsphere-4.14.0a1746734806.dist-info → pulumi_vsphere-4.15.0.dist-info}/METADATA +1 -1
- pulumi_vsphere-4.15.0.dist-info/RECORD +87 -0
- {pulumi_vsphere-4.14.0a1746734806.dist-info → pulumi_vsphere-4.15.0.dist-info}/WHEEL +1 -1
- pulumi_vsphere-4.14.0a1746734806.dist-info/RECORD +0 -87
- {pulumi_vsphere-4.14.0a1746734806.dist-info → pulumi_vsphere-4.15.0.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
5
|
import builtins
|
|
@@ -27,7 +27,7 @@ class GetResourcePoolResult:
|
|
|
27
27
|
"""
|
|
28
28
|
A collection of values returned by getResourcePool.
|
|
29
29
|
"""
|
|
30
|
-
def __init__(__self__, datacenter_id=None, id=None, name=None):
|
|
30
|
+
def __init__(__self__, datacenter_id=None, id=None, name=None, parent_resource_pool_id=None):
|
|
31
31
|
if datacenter_id and not isinstance(datacenter_id, str):
|
|
32
32
|
raise TypeError("Expected argument 'datacenter_id' to be a str")
|
|
33
33
|
pulumi.set(__self__, "datacenter_id", datacenter_id)
|
|
@@ -37,6 +37,9 @@ class GetResourcePoolResult:
|
|
|
37
37
|
if name and not isinstance(name, str):
|
|
38
38
|
raise TypeError("Expected argument 'name' to be a str")
|
|
39
39
|
pulumi.set(__self__, "name", name)
|
|
40
|
+
if parent_resource_pool_id and not isinstance(parent_resource_pool_id, str):
|
|
41
|
+
raise TypeError("Expected argument 'parent_resource_pool_id' to be a str")
|
|
42
|
+
pulumi.set(__self__, "parent_resource_pool_id", parent_resource_pool_id)
|
|
40
43
|
|
|
41
44
|
@property
|
|
42
45
|
@pulumi.getter(name="datacenterId")
|
|
@@ -56,6 +59,11 @@ class GetResourcePoolResult:
|
|
|
56
59
|
def name(self) -> Optional[builtins.str]:
|
|
57
60
|
return pulumi.get(self, "name")
|
|
58
61
|
|
|
62
|
+
@property
|
|
63
|
+
@pulumi.getter(name="parentResourcePoolId")
|
|
64
|
+
def parent_resource_pool_id(self) -> Optional[builtins.str]:
|
|
65
|
+
return pulumi.get(self, "parent_resource_pool_id")
|
|
66
|
+
|
|
59
67
|
|
|
60
68
|
class AwaitableGetResourcePoolResult(GetResourcePoolResult):
|
|
61
69
|
# pylint: disable=using-constant-test
|
|
@@ -65,11 +73,13 @@ class AwaitableGetResourcePoolResult(GetResourcePoolResult):
|
|
|
65
73
|
return GetResourcePoolResult(
|
|
66
74
|
datacenter_id=self.datacenter_id,
|
|
67
75
|
id=self.id,
|
|
68
|
-
name=self.name
|
|
76
|
+
name=self.name,
|
|
77
|
+
parent_resource_pool_id=self.parent_resource_pool_id)
|
|
69
78
|
|
|
70
79
|
|
|
71
80
|
def get_resource_pool(datacenter_id: Optional[builtins.str] = None,
|
|
72
81
|
name: Optional[builtins.str] = None,
|
|
82
|
+
parent_resource_pool_id: Optional[builtins.str] = None,
|
|
73
83
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetResourcePoolResult:
|
|
74
84
|
"""
|
|
75
85
|
The `ResourcePool` data source can be used to discover the ID of a
|
|
@@ -79,15 +89,30 @@ def get_resource_pool(datacenter_id: Optional[builtins.str] = None,
|
|
|
79
89
|
|
|
80
90
|
## Example Usage
|
|
81
91
|
|
|
92
|
+
### Find a Resource Pool by Path
|
|
93
|
+
|
|
82
94
|
```python
|
|
83
95
|
import pulumi
|
|
84
96
|
import pulumi_vsphere as vsphere
|
|
85
97
|
|
|
86
98
|
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
87
|
-
pool = vsphere.get_resource_pool(name="
|
|
99
|
+
pool = vsphere.get_resource_pool(name="cluster-01/Resources",
|
|
88
100
|
datacenter_id=datacenter.id)
|
|
89
101
|
```
|
|
90
102
|
|
|
103
|
+
### Find a Child Resource Pool Using the Parent ID
|
|
104
|
+
|
|
105
|
+
```python
|
|
106
|
+
import pulumi
|
|
107
|
+
import pulumi_vsphere as vsphere
|
|
108
|
+
|
|
109
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
110
|
+
parent_pool = vsphere.get_resource_pool(name="cluster-01/Resources",
|
|
111
|
+
datacenter_id=datacenter.id)
|
|
112
|
+
child_pool = vsphere.get_resource_pool(name="example",
|
|
113
|
+
parent_resource_pool_id=parent_pool.id)
|
|
114
|
+
```
|
|
115
|
+
|
|
91
116
|
### Specifying the Root Resource Pool for a Standalone ESXi Host
|
|
92
117
|
|
|
93
118
|
> **NOTE:** Returning the root resource pool for a cluster can be done
|
|
@@ -117,26 +142,32 @@ def get_resource_pool(datacenter_id: Optional[builtins.str] = None,
|
|
|
117
142
|
of the datacenter in which the resource pool is located. This can be omitted
|
|
118
143
|
if the search path used in `name` is an absolute path. For default
|
|
119
144
|
datacenters, use the id attribute from an empty `Datacenter` data
|
|
120
|
-
source
|
|
145
|
+
source..
|
|
146
|
+
:param builtins.str name: The name of the resource pool. This can be a name or
|
|
147
|
+
path. This is required when using vCenter.
|
|
148
|
+
:param builtins.str parent_resource_pool_id: The managed object ID
|
|
149
|
+
of the parent resource pool. When specified, the `name` parameter is used to find
|
|
150
|
+
a child resource pool with the given name under this parent resource pool.
|
|
121
151
|
|
|
122
152
|
> **Note:** When using ESXi without a vCenter Server instance, you do not
|
|
123
153
|
need to specify either attribute to use this data source. An empty declaration
|
|
124
154
|
will load the ESXi host's root resource pool.
|
|
125
|
-
:param builtins.str name: The name of the resource pool. This can be a name or
|
|
126
|
-
path. This is required when using vCenter.
|
|
127
155
|
"""
|
|
128
156
|
__args__ = dict()
|
|
129
157
|
__args__['datacenterId'] = datacenter_id
|
|
130
158
|
__args__['name'] = name
|
|
159
|
+
__args__['parentResourcePoolId'] = parent_resource_pool_id
|
|
131
160
|
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
132
161
|
__ret__ = pulumi.runtime.invoke('vsphere:index/getResourcePool:getResourcePool', __args__, opts=opts, typ=GetResourcePoolResult).value
|
|
133
162
|
|
|
134
163
|
return AwaitableGetResourcePoolResult(
|
|
135
164
|
datacenter_id=pulumi.get(__ret__, 'datacenter_id'),
|
|
136
165
|
id=pulumi.get(__ret__, 'id'),
|
|
137
|
-
name=pulumi.get(__ret__, 'name')
|
|
166
|
+
name=pulumi.get(__ret__, 'name'),
|
|
167
|
+
parent_resource_pool_id=pulumi.get(__ret__, 'parent_resource_pool_id'))
|
|
138
168
|
def get_resource_pool_output(datacenter_id: Optional[pulumi.Input[Optional[builtins.str]]] = None,
|
|
139
169
|
name: Optional[pulumi.Input[Optional[builtins.str]]] = None,
|
|
170
|
+
parent_resource_pool_id: Optional[pulumi.Input[Optional[builtins.str]]] = None,
|
|
140
171
|
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetResourcePoolResult]:
|
|
141
172
|
"""
|
|
142
173
|
The `ResourcePool` data source can be used to discover the ID of a
|
|
@@ -146,15 +177,30 @@ def get_resource_pool_output(datacenter_id: Optional[pulumi.Input[Optional[built
|
|
|
146
177
|
|
|
147
178
|
## Example Usage
|
|
148
179
|
|
|
180
|
+
### Find a Resource Pool by Path
|
|
181
|
+
|
|
149
182
|
```python
|
|
150
183
|
import pulumi
|
|
151
184
|
import pulumi_vsphere as vsphere
|
|
152
185
|
|
|
153
186
|
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
154
|
-
pool = vsphere.get_resource_pool(name="
|
|
187
|
+
pool = vsphere.get_resource_pool(name="cluster-01/Resources",
|
|
155
188
|
datacenter_id=datacenter.id)
|
|
156
189
|
```
|
|
157
190
|
|
|
191
|
+
### Find a Child Resource Pool Using the Parent ID
|
|
192
|
+
|
|
193
|
+
```python
|
|
194
|
+
import pulumi
|
|
195
|
+
import pulumi_vsphere as vsphere
|
|
196
|
+
|
|
197
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
198
|
+
parent_pool = vsphere.get_resource_pool(name="cluster-01/Resources",
|
|
199
|
+
datacenter_id=datacenter.id)
|
|
200
|
+
child_pool = vsphere.get_resource_pool(name="example",
|
|
201
|
+
parent_resource_pool_id=parent_pool.id)
|
|
202
|
+
```
|
|
203
|
+
|
|
158
204
|
### Specifying the Root Resource Pool for a Standalone ESXi Host
|
|
159
205
|
|
|
160
206
|
> **NOTE:** Returning the root resource pool for a cluster can be done
|
|
@@ -184,20 +230,25 @@ def get_resource_pool_output(datacenter_id: Optional[pulumi.Input[Optional[built
|
|
|
184
230
|
of the datacenter in which the resource pool is located. This can be omitted
|
|
185
231
|
if the search path used in `name` is an absolute path. For default
|
|
186
232
|
datacenters, use the id attribute from an empty `Datacenter` data
|
|
187
|
-
source
|
|
233
|
+
source..
|
|
234
|
+
:param builtins.str name: The name of the resource pool. This can be a name or
|
|
235
|
+
path. This is required when using vCenter.
|
|
236
|
+
:param builtins.str parent_resource_pool_id: The managed object ID
|
|
237
|
+
of the parent resource pool. When specified, the `name` parameter is used to find
|
|
238
|
+
a child resource pool with the given name under this parent resource pool.
|
|
188
239
|
|
|
189
240
|
> **Note:** When using ESXi without a vCenter Server instance, you do not
|
|
190
241
|
need to specify either attribute to use this data source. An empty declaration
|
|
191
242
|
will load the ESXi host's root resource pool.
|
|
192
|
-
:param builtins.str name: The name of the resource pool. This can be a name or
|
|
193
|
-
path. This is required when using vCenter.
|
|
194
243
|
"""
|
|
195
244
|
__args__ = dict()
|
|
196
245
|
__args__['datacenterId'] = datacenter_id
|
|
197
246
|
__args__['name'] = name
|
|
247
|
+
__args__['parentResourcePoolId'] = parent_resource_pool_id
|
|
198
248
|
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
199
249
|
__ret__ = pulumi.runtime.invoke_output('vsphere:index/getResourcePool:getResourcePool', __args__, opts=opts, typ=GetResourcePoolResult)
|
|
200
250
|
return __ret__.apply(lambda __response__: GetResourcePoolResult(
|
|
201
251
|
datacenter_id=pulumi.get(__response__, 'datacenter_id'),
|
|
202
252
|
id=pulumi.get(__response__, 'id'),
|
|
203
|
-
name=pulumi.get(__response__, 'name')
|
|
253
|
+
name=pulumi.get(__response__, 'name'),
|
|
254
|
+
parent_resource_pool_id=pulumi.get(__response__, 'parent_resource_pool_id')))
|
pulumi_vsphere/get_role.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
5
|
import builtins
|
pulumi_vsphere/get_tag.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
5
|
import builtins
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
5
|
import builtins
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
5
|
import builtins
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
5
|
import builtins
|
pulumi_vsphere/get_vmfs_disks.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
5
|
import builtins
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
5
|
import builtins
|
pulumi_vsphere/ha_vm_override.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
5
|
import builtins
|
|
@@ -653,6 +653,8 @@ class HaVmOverride(pulumi.CustomResource):
|
|
|
653
653
|
|
|
654
654
|
is below:
|
|
655
655
|
|
|
656
|
+
[docs-import]: https://developer.hashicorp.com/terraform/cli/import
|
|
657
|
+
|
|
656
658
|
```sh
|
|
657
659
|
$ pulumi import vsphere:index/haVmOverride:HaVmOverride ha_vm_override \\
|
|
658
660
|
```
|
|
@@ -769,6 +771,8 @@ class HaVmOverride(pulumi.CustomResource):
|
|
|
769
771
|
|
|
770
772
|
is below:
|
|
771
773
|
|
|
774
|
+
[docs-import]: https://developer.hashicorp.com/terraform/cli/import
|
|
775
|
+
|
|
772
776
|
```sh
|
|
773
777
|
$ pulumi import vsphere:index/haVmOverride:HaVmOverride ha_vm_override \\
|
|
774
778
|
```
|
pulumi_vsphere/host.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
5
|
import builtins
|
|
@@ -674,6 +674,33 @@ class Host(pulumi.CustomResource):
|
|
|
674
674
|
datacenter=datacenter.id)
|
|
675
675
|
```
|
|
676
676
|
|
|
677
|
+
### Create host in a compute cluster
|
|
678
|
+
|
|
679
|
+
```python
|
|
680
|
+
import pulumi
|
|
681
|
+
import pulumi_vsphere as vsphere
|
|
682
|
+
|
|
683
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
684
|
+
cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
685
|
+
datacenter_id=datacenter.id)
|
|
686
|
+
thumbprint = vsphere.get_host_thumbprint(address="esxi-01.example.com",
|
|
687
|
+
insecure=True)
|
|
688
|
+
esx_01 = vsphere.Host("esx-01",
|
|
689
|
+
hostname="esxi-01.example.com",
|
|
690
|
+
username="root",
|
|
691
|
+
password="password",
|
|
692
|
+
license="00000-00000-00000-00000-00000",
|
|
693
|
+
thumbprint=thumbprint.id,
|
|
694
|
+
cluster=cluster.id,
|
|
695
|
+
services=[{
|
|
696
|
+
"ntpd": {
|
|
697
|
+
"enabled": True,
|
|
698
|
+
"policy": "on",
|
|
699
|
+
"ntp_servers": ["pool.ntp.org"],
|
|
700
|
+
},
|
|
701
|
+
}])
|
|
702
|
+
```
|
|
703
|
+
|
|
677
704
|
## Import
|
|
678
705
|
|
|
679
706
|
An existing host can be imported into this resource by supplying
|
|
@@ -718,7 +745,7 @@ class Host(pulumi.CustomResource):
|
|
|
718
745
|
|
|
719
746
|
data "vsphere_host_thumbprint" "thumbprint" {
|
|
720
747
|
|
|
721
|
-
address
|
|
748
|
+
address = "esxi-01.example.com"
|
|
722
749
|
|
|
723
750
|
insecure = true
|
|
724
751
|
|
|
@@ -766,9 +793,9 @@ class Host(pulumi.CustomResource):
|
|
|
766
793
|
|
|
767
794
|
}
|
|
768
795
|
|
|
769
|
-
|
|
796
|
+
}
|
|
770
797
|
|
|
771
|
-
|
|
798
|
+
}
|
|
772
799
|
|
|
773
800
|
```sh
|
|
774
801
|
$ pulumi import vsphere:index/host:Host esx-01 host-123
|
|
@@ -853,6 +880,33 @@ class Host(pulumi.CustomResource):
|
|
|
853
880
|
datacenter=datacenter.id)
|
|
854
881
|
```
|
|
855
882
|
|
|
883
|
+
### Create host in a compute cluster
|
|
884
|
+
|
|
885
|
+
```python
|
|
886
|
+
import pulumi
|
|
887
|
+
import pulumi_vsphere as vsphere
|
|
888
|
+
|
|
889
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
890
|
+
cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
891
|
+
datacenter_id=datacenter.id)
|
|
892
|
+
thumbprint = vsphere.get_host_thumbprint(address="esxi-01.example.com",
|
|
893
|
+
insecure=True)
|
|
894
|
+
esx_01 = vsphere.Host("esx-01",
|
|
895
|
+
hostname="esxi-01.example.com",
|
|
896
|
+
username="root",
|
|
897
|
+
password="password",
|
|
898
|
+
license="00000-00000-00000-00000-00000",
|
|
899
|
+
thumbprint=thumbprint.id,
|
|
900
|
+
cluster=cluster.id,
|
|
901
|
+
services=[{
|
|
902
|
+
"ntpd": {
|
|
903
|
+
"enabled": True,
|
|
904
|
+
"policy": "on",
|
|
905
|
+
"ntp_servers": ["pool.ntp.org"],
|
|
906
|
+
},
|
|
907
|
+
}])
|
|
908
|
+
```
|
|
909
|
+
|
|
856
910
|
## Import
|
|
857
911
|
|
|
858
912
|
An existing host can be imported into this resource by supplying
|
|
@@ -897,7 +951,7 @@ class Host(pulumi.CustomResource):
|
|
|
897
951
|
|
|
898
952
|
data "vsphere_host_thumbprint" "thumbprint" {
|
|
899
953
|
|
|
900
|
-
address
|
|
954
|
+
address = "esxi-01.example.com"
|
|
901
955
|
|
|
902
956
|
insecure = true
|
|
903
957
|
|
|
@@ -945,9 +999,9 @@ class Host(pulumi.CustomResource):
|
|
|
945
999
|
|
|
946
1000
|
}
|
|
947
1001
|
|
|
948
|
-
|
|
1002
|
+
}
|
|
949
1003
|
|
|
950
|
-
|
|
1004
|
+
}
|
|
951
1005
|
|
|
952
1006
|
```sh
|
|
953
1007
|
$ pulumi import vsphere:index/host:Host esx-01 host-123
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
5
|
import builtins
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
5
|
import builtins
|
|
@@ -841,6 +841,8 @@ class HostVirtualSwitch(pulumi.CustomResource):
|
|
|
841
841
|
|
|
842
842
|
Import can the be done via the following command:
|
|
843
843
|
|
|
844
|
+
[docs-import]: https://developer.hashicorp.com/terraform/cli/import
|
|
845
|
+
|
|
844
846
|
[docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
|
|
845
847
|
|
|
846
848
|
```sh
|
|
@@ -962,6 +964,8 @@ class HostVirtualSwitch(pulumi.CustomResource):
|
|
|
962
964
|
|
|
963
965
|
Import can the be done via the following command:
|
|
964
966
|
|
|
967
|
+
[docs-import]: https://developer.hashicorp.com/terraform/cli/import
|
|
968
|
+
|
|
965
969
|
[docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
|
|
966
970
|
|
|
967
971
|
```sh
|
pulumi_vsphere/license.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
5
|
import builtins
|
|
@@ -24,8 +24,10 @@ class LicenseArgs:
|
|
|
24
24
|
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]] = None):
|
|
25
25
|
"""
|
|
26
26
|
The set of arguments for constructing a License resource.
|
|
27
|
-
:param pulumi.Input[builtins.str] license_key: The license key
|
|
28
|
-
:param pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]] labels: A map of
|
|
27
|
+
:param pulumi.Input[builtins.str] license_key: The license key value.
|
|
28
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]] labels: A map of labels to be applied to the license key.
|
|
29
|
+
|
|
30
|
+
> **NOTE:** Labels are not allowed for unmanaged ESX hosts.
|
|
29
31
|
"""
|
|
30
32
|
pulumi.set(__self__, "license_key", license_key)
|
|
31
33
|
if labels is not None:
|
|
@@ -35,7 +37,7 @@ class LicenseArgs:
|
|
|
35
37
|
@pulumi.getter(name="licenseKey")
|
|
36
38
|
def license_key(self) -> pulumi.Input[builtins.str]:
|
|
37
39
|
"""
|
|
38
|
-
The license key
|
|
40
|
+
The license key value.
|
|
39
41
|
"""
|
|
40
42
|
return pulumi.get(self, "license_key")
|
|
41
43
|
|
|
@@ -47,7 +49,9 @@ class LicenseArgs:
|
|
|
47
49
|
@pulumi.getter
|
|
48
50
|
def labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]]:
|
|
49
51
|
"""
|
|
50
|
-
A map of
|
|
52
|
+
A map of labels to be applied to the license key.
|
|
53
|
+
|
|
54
|
+
> **NOTE:** Labels are not allowed for unmanaged ESX hosts.
|
|
51
55
|
"""
|
|
52
56
|
return pulumi.get(self, "labels")
|
|
53
57
|
|
|
@@ -68,11 +72,13 @@ class _LicenseState:
|
|
|
68
72
|
"""
|
|
69
73
|
Input properties used for looking up and filtering License resources.
|
|
70
74
|
:param pulumi.Input[builtins.str] edition_key: The product edition of the license key.
|
|
71
|
-
:param pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]] labels: A map of
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
:param pulumi.Input[builtins.
|
|
75
|
-
:param pulumi.Input[builtins.
|
|
75
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]] labels: A map of labels to be applied to the license key.
|
|
76
|
+
|
|
77
|
+
> **NOTE:** Labels are not allowed for unmanaged ESX hosts.
|
|
78
|
+
:param pulumi.Input[builtins.str] license_key: The license key value.
|
|
79
|
+
:param pulumi.Input[builtins.str] name: The display name for the license key.
|
|
80
|
+
:param pulumi.Input[builtins.int] total: The total number of units contained in the license key.
|
|
81
|
+
:param pulumi.Input[builtins.int] used: The number of units assigned to this license key.
|
|
76
82
|
"""
|
|
77
83
|
if edition_key is not None:
|
|
78
84
|
pulumi.set(__self__, "edition_key", edition_key)
|
|
@@ -103,7 +109,9 @@ class _LicenseState:
|
|
|
103
109
|
@pulumi.getter
|
|
104
110
|
def labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]]:
|
|
105
111
|
"""
|
|
106
|
-
A map of
|
|
112
|
+
A map of labels to be applied to the license key.
|
|
113
|
+
|
|
114
|
+
> **NOTE:** Labels are not allowed for unmanaged ESX hosts.
|
|
107
115
|
"""
|
|
108
116
|
return pulumi.get(self, "labels")
|
|
109
117
|
|
|
@@ -115,7 +123,7 @@ class _LicenseState:
|
|
|
115
123
|
@pulumi.getter(name="licenseKey")
|
|
116
124
|
def license_key(self) -> Optional[pulumi.Input[builtins.str]]:
|
|
117
125
|
"""
|
|
118
|
-
The license key
|
|
126
|
+
The license key value.
|
|
119
127
|
"""
|
|
120
128
|
return pulumi.get(self, "license_key")
|
|
121
129
|
|
|
@@ -127,7 +135,7 @@ class _LicenseState:
|
|
|
127
135
|
@pulumi.getter
|
|
128
136
|
def name(self) -> Optional[pulumi.Input[builtins.str]]:
|
|
129
137
|
"""
|
|
130
|
-
The display name for the license.
|
|
138
|
+
The display name for the license key.
|
|
131
139
|
"""
|
|
132
140
|
return pulumi.get(self, "name")
|
|
133
141
|
|
|
@@ -139,7 +147,7 @@ class _LicenseState:
|
|
|
139
147
|
@pulumi.getter
|
|
140
148
|
def total(self) -> Optional[pulumi.Input[builtins.int]]:
|
|
141
149
|
"""
|
|
142
|
-
|
|
150
|
+
The total number of units contained in the license key.
|
|
143
151
|
"""
|
|
144
152
|
return pulumi.get(self, "total")
|
|
145
153
|
|
|
@@ -151,7 +159,7 @@ class _LicenseState:
|
|
|
151
159
|
@pulumi.getter
|
|
152
160
|
def used(self) -> Optional[pulumi.Input[builtins.int]]:
|
|
153
161
|
"""
|
|
154
|
-
The number of units
|
|
162
|
+
The number of units assigned to this license key.
|
|
155
163
|
"""
|
|
156
164
|
return pulumi.get(self, "used")
|
|
157
165
|
|
|
@@ -172,10 +180,25 @@ class License(pulumi.CustomResource):
|
|
|
172
180
|
"""
|
|
173
181
|
Provides a VMware vSphere license resource. This can be used to add and remove license keys.
|
|
174
182
|
|
|
183
|
+
## Example Usage
|
|
184
|
+
|
|
185
|
+
```python
|
|
186
|
+
import pulumi
|
|
187
|
+
import pulumi_vsphere as vsphere
|
|
188
|
+
|
|
189
|
+
license_key = vsphere.License("licenseKey",
|
|
190
|
+
license_key="00000-00000-00000-00000-00000",
|
|
191
|
+
labels={
|
|
192
|
+
"VpxClientLicenseLabel": "example",
|
|
193
|
+
})
|
|
194
|
+
```
|
|
195
|
+
|
|
175
196
|
:param str resource_name: The name of the resource.
|
|
176
197
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
177
|
-
:param pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]] labels: A map of
|
|
178
|
-
|
|
198
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]] labels: A map of labels to be applied to the license key.
|
|
199
|
+
|
|
200
|
+
> **NOTE:** Labels are not allowed for unmanaged ESX hosts.
|
|
201
|
+
:param pulumi.Input[builtins.str] license_key: The license key value.
|
|
179
202
|
"""
|
|
180
203
|
...
|
|
181
204
|
@overload
|
|
@@ -186,6 +209,19 @@ class License(pulumi.CustomResource):
|
|
|
186
209
|
"""
|
|
187
210
|
Provides a VMware vSphere license resource. This can be used to add and remove license keys.
|
|
188
211
|
|
|
212
|
+
## Example Usage
|
|
213
|
+
|
|
214
|
+
```python
|
|
215
|
+
import pulumi
|
|
216
|
+
import pulumi_vsphere as vsphere
|
|
217
|
+
|
|
218
|
+
license_key = vsphere.License("licenseKey",
|
|
219
|
+
license_key="00000-00000-00000-00000-00000",
|
|
220
|
+
labels={
|
|
221
|
+
"VpxClientLicenseLabel": "example",
|
|
222
|
+
})
|
|
223
|
+
```
|
|
224
|
+
|
|
189
225
|
:param str resource_name: The name of the resource.
|
|
190
226
|
:param LicenseArgs args: The arguments to use to populate this resource's properties.
|
|
191
227
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -244,11 +280,13 @@ class License(pulumi.CustomResource):
|
|
|
244
280
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
245
281
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
246
282
|
:param pulumi.Input[builtins.str] edition_key: The product edition of the license key.
|
|
247
|
-
:param pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]] labels: A map of
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
:param pulumi.Input[builtins.
|
|
251
|
-
:param pulumi.Input[builtins.
|
|
283
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]] labels: A map of labels to be applied to the license key.
|
|
284
|
+
|
|
285
|
+
> **NOTE:** Labels are not allowed for unmanaged ESX hosts.
|
|
286
|
+
:param pulumi.Input[builtins.str] license_key: The license key value.
|
|
287
|
+
:param pulumi.Input[builtins.str] name: The display name for the license key.
|
|
288
|
+
:param pulumi.Input[builtins.int] total: The total number of units contained in the license key.
|
|
289
|
+
:param pulumi.Input[builtins.int] used: The number of units assigned to this license key.
|
|
252
290
|
"""
|
|
253
291
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
254
292
|
|
|
@@ -274,7 +312,9 @@ class License(pulumi.CustomResource):
|
|
|
274
312
|
@pulumi.getter
|
|
275
313
|
def labels(self) -> pulumi.Output[Optional[Mapping[str, builtins.str]]]:
|
|
276
314
|
"""
|
|
277
|
-
A map of
|
|
315
|
+
A map of labels to be applied to the license key.
|
|
316
|
+
|
|
317
|
+
> **NOTE:** Labels are not allowed for unmanaged ESX hosts.
|
|
278
318
|
"""
|
|
279
319
|
return pulumi.get(self, "labels")
|
|
280
320
|
|
|
@@ -282,7 +322,7 @@ class License(pulumi.CustomResource):
|
|
|
282
322
|
@pulumi.getter(name="licenseKey")
|
|
283
323
|
def license_key(self) -> pulumi.Output[builtins.str]:
|
|
284
324
|
"""
|
|
285
|
-
The license key
|
|
325
|
+
The license key value.
|
|
286
326
|
"""
|
|
287
327
|
return pulumi.get(self, "license_key")
|
|
288
328
|
|
|
@@ -290,7 +330,7 @@ class License(pulumi.CustomResource):
|
|
|
290
330
|
@pulumi.getter
|
|
291
331
|
def name(self) -> pulumi.Output[builtins.str]:
|
|
292
332
|
"""
|
|
293
|
-
The display name for the license.
|
|
333
|
+
The display name for the license key.
|
|
294
334
|
"""
|
|
295
335
|
return pulumi.get(self, "name")
|
|
296
336
|
|
|
@@ -298,7 +338,7 @@ class License(pulumi.CustomResource):
|
|
|
298
338
|
@pulumi.getter
|
|
299
339
|
def total(self) -> pulumi.Output[builtins.int]:
|
|
300
340
|
"""
|
|
301
|
-
|
|
341
|
+
The total number of units contained in the license key.
|
|
302
342
|
"""
|
|
303
343
|
return pulumi.get(self, "total")
|
|
304
344
|
|
|
@@ -306,7 +346,7 @@ class License(pulumi.CustomResource):
|
|
|
306
346
|
@pulumi.getter
|
|
307
347
|
def used(self) -> pulumi.Output[builtins.int]:
|
|
308
348
|
"""
|
|
309
|
-
The number of units
|
|
349
|
+
The number of units assigned to this license key.
|
|
310
350
|
"""
|
|
311
351
|
return pulumi.get(self, "used")
|
|
312
352
|
|