pulumi-vsphere 4.13.2__py3-none-any.whl → 4.14.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/compute_cluster.py +11 -10
- pulumi_vsphere/compute_cluster_host_group.py +71 -0
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +1 -0
- pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +5 -0
- pulumi_vsphere/compute_cluster_vm_dependency_rule.py +5 -0
- pulumi_vsphere/compute_cluster_vm_group.py +5 -0
- pulumi_vsphere/compute_cluster_vm_host_rule.py +5 -0
- pulumi_vsphere/content_library.py +5 -0
- pulumi_vsphere/content_library_item.py +5 -0
- pulumi_vsphere/custom_attribute.py +5 -0
- pulumi_vsphere/datacenter.py +1 -0
- pulumi_vsphere/datastore_cluster.py +89 -0
- pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +5 -0
- pulumi_vsphere/distributed_port_group.py +5 -0
- pulumi_vsphere/distributed_virtual_switch.py +5 -0
- pulumi_vsphere/distributed_virtual_switch_pvlan_mapping.py +1 -0
- pulumi_vsphere/dpm_host_override.py +89 -0
- pulumi_vsphere/drs_vm_override.py +5 -0
- pulumi_vsphere/entity_permissions.py +1 -0
- pulumi_vsphere/file.py +35 -49
- pulumi_vsphere/folder.py +17 -12
- pulumi_vsphere/get_compute_cluster_host_group.py +0 -4
- pulumi_vsphere/get_datastore_cluster.py +1 -1
- pulumi_vsphere/get_datastore_stats.py +0 -4
- pulumi_vsphere/get_dynamic.py +0 -4
- pulumi_vsphere/get_folder.py +130 -8
- pulumi_vsphere/get_guest_os_customization.py +21 -2
- pulumi_vsphere/get_license.py +8 -6
- pulumi_vsphere/get_network.py +35 -1
- pulumi_vsphere/get_ovf_vm_template.py +4 -4
- pulumi_vsphere/guest_os_customization.py +1 -0
- pulumi_vsphere/ha_vm_override.py +5 -0
- pulumi_vsphere/host.py +61 -6
- pulumi_vsphere/host_port_group.py +1 -0
- pulumi_vsphere/host_virtual_switch.py +5 -0
- pulumi_vsphere/license.py +67 -26
- pulumi_vsphere/nas_datastore.py +63 -0
- pulumi_vsphere/offline_software_depot.py +5 -0
- pulumi_vsphere/outputs.py +33 -0
- pulumi_vsphere/provider.py +21 -0
- pulumi_vsphere/pulumi-plugin.json +1 -1
- pulumi_vsphere/resource_pool.py +490 -163
- pulumi_vsphere/role.py +1 -0
- pulumi_vsphere/storage_drs_vm_override.py +5 -0
- pulumi_vsphere/supervisor.py +3 -2
- pulumi_vsphere/tag.py +5 -0
- pulumi_vsphere/tag_category.py +5 -0
- pulumi_vsphere/vapp_container.py +5 -0
- pulumi_vsphere/vapp_entity.py +5 -0
- pulumi_vsphere/virtual_disk.py +5 -0
- pulumi_vsphere/virtual_machine.py +5 -4
- pulumi_vsphere/virtual_machine_class.py +5 -4
- pulumi_vsphere/virtual_machine_snapshot.py +1 -0
- pulumi_vsphere/vm_storage_policy.py +1 -0
- pulumi_vsphere/vmfs_datastore.py +5 -0
- pulumi_vsphere/vnic.py +1 -0
- {pulumi_vsphere-4.13.2.dist-info → pulumi_vsphere-4.14.0.dist-info}/METADATA +3 -3
- pulumi_vsphere-4.14.0.dist-info/RECORD +87 -0
- {pulumi_vsphere-4.13.2.dist-info → pulumi_vsphere-4.14.0.dist-info}/WHEEL +1 -1
- pulumi_vsphere-4.13.2.dist-info/RECORD +0 -87
- {pulumi_vsphere-4.13.2.dist-info → pulumi_vsphere-4.14.0.dist-info}/top_level.txt +0 -0
pulumi_vsphere/resource_pool.py
CHANGED
|
@@ -37,30 +37,50 @@ class ResourcePoolArgs:
|
|
|
37
37
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None):
|
|
38
38
|
"""
|
|
39
39
|
The set of arguments for constructing a ResourcePool resource.
|
|
40
|
-
:param pulumi.Input[builtins.str] parent_resource_pool_id: The
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
:param pulumi.Input[builtins.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
:param pulumi.Input[builtins.int]
|
|
49
|
-
|
|
40
|
+
:param pulumi.Input[builtins.str] parent_resource_pool_id: The managed object ID
|
|
41
|
+
of the parent resource pool. This can be the root resource pool for a cluster
|
|
42
|
+
or standalone host, or a resource pool itself. When moving a resource pool
|
|
43
|
+
from one parent resource pool to another, both must share a common root
|
|
44
|
+
resource pool.
|
|
45
|
+
:param pulumi.Input[builtins.bool] cpu_expandable: Determines if the reservation on a resource
|
|
46
|
+
pool can grow beyond the specified value if the parent resource pool has
|
|
47
|
+
unreserved resources. Default: `true`
|
|
48
|
+
:param pulumi.Input[builtins.int] cpu_limit: The CPU utilization of a resource pool will not
|
|
49
|
+
exceed this limit, even if there are available resources. Set to `-1` for
|
|
50
|
+
unlimited. Default: `-1`
|
|
51
|
+
:param pulumi.Input[builtins.int] cpu_reservation: Amount of CPU (MHz) that is guaranteed
|
|
52
|
+
available to the resource pool. Default: `0`
|
|
53
|
+
:param pulumi.Input[builtins.str] cpu_share_level: The CPU allocation level. The level is a
|
|
54
|
+
simplified view of shares. Levels map to a pre-determined set of numeric
|
|
55
|
+
values for shares. Can be one of `low`, `normal`, `high`, or `custom`. When
|
|
56
|
+
`low`, `normal`, or `high` are specified values in `cpu_shares` will be
|
|
57
|
+
ignored. Default: `normal`
|
|
58
|
+
:param pulumi.Input[builtins.int] cpu_shares: The number of shares allocated for CPU. Used to
|
|
59
|
+
determine resource allocation in case of resource contention. If this is set,
|
|
60
|
+
`cpu_share_level` must be `custom`.
|
|
50
61
|
:param pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]] custom_attributes: A list of custom attributes to set on this resource.
|
|
51
|
-
:param pulumi.Input[builtins.bool] memory_expandable: Determines if the reservation on a resource
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
:param pulumi.Input[builtins.bool] memory_expandable: Determines if the reservation on a resource
|
|
63
|
+
pool can grow beyond the specified value if the parent resource pool has
|
|
64
|
+
unreserved resources. Default: `true`
|
|
65
|
+
:param pulumi.Input[builtins.int] memory_limit: The CPU utilization of a resource pool will not
|
|
66
|
+
exceed this limit, even if there are available resources. Set to `-1` for
|
|
67
|
+
unlimited. Default: `-1`
|
|
68
|
+
:param pulumi.Input[builtins.int] memory_reservation: Amount of CPU (MHz) that is guaranteed
|
|
69
|
+
available to the resource pool. Default: `0`
|
|
70
|
+
:param pulumi.Input[builtins.str] memory_share_level: The CPU allocation level. The level is a
|
|
71
|
+
simplified view of shares. Levels map to a pre-determined set of numeric
|
|
72
|
+
values for shares. Can be one of `low`, `normal`, `high`, or `custom`. When
|
|
73
|
+
`low`, `normal`, or `high` are specified values in `memory_shares` will be
|
|
74
|
+
ignored. Default: `normal`
|
|
75
|
+
:param pulumi.Input[builtins.int] memory_shares: The number of shares allocated for CPU. Used to
|
|
76
|
+
determine resource allocation in case of resource contention. If this is set,
|
|
77
|
+
`memory_share_level` must be `custom`.
|
|
78
|
+
:param pulumi.Input[builtins.str] name: The name of the resource pool.
|
|
79
|
+
:param pulumi.Input[builtins.str] scale_descendants_shares: Determines if the shares of all
|
|
80
|
+
descendants of the resource pool are scaled up or down when the shares
|
|
81
|
+
of the resource pool are scaled up or down. Can be one of `disabled` or
|
|
82
|
+
`scaleCpuAndMemoryShares`. Default: `disabled`.
|
|
83
|
+
:param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] tags: The IDs of any tags to attach to this resource.
|
|
64
84
|
"""
|
|
65
85
|
pulumi.set(__self__, "parent_resource_pool_id", parent_resource_pool_id)
|
|
66
86
|
if cpu_expandable is not None:
|
|
@@ -96,7 +116,11 @@ class ResourcePoolArgs:
|
|
|
96
116
|
@pulumi.getter(name="parentResourcePoolId")
|
|
97
117
|
def parent_resource_pool_id(self) -> pulumi.Input[builtins.str]:
|
|
98
118
|
"""
|
|
99
|
-
The
|
|
119
|
+
The managed object ID
|
|
120
|
+
of the parent resource pool. This can be the root resource pool for a cluster
|
|
121
|
+
or standalone host, or a resource pool itself. When moving a resource pool
|
|
122
|
+
from one parent resource pool to another, both must share a common root
|
|
123
|
+
resource pool.
|
|
100
124
|
"""
|
|
101
125
|
return pulumi.get(self, "parent_resource_pool_id")
|
|
102
126
|
|
|
@@ -108,8 +132,9 @@ class ResourcePoolArgs:
|
|
|
108
132
|
@pulumi.getter(name="cpuExpandable")
|
|
109
133
|
def cpu_expandable(self) -> Optional[pulumi.Input[builtins.bool]]:
|
|
110
134
|
"""
|
|
111
|
-
Determines if the reservation on a resource
|
|
112
|
-
|
|
135
|
+
Determines if the reservation on a resource
|
|
136
|
+
pool can grow beyond the specified value if the parent resource pool has
|
|
137
|
+
unreserved resources. Default: `true`
|
|
113
138
|
"""
|
|
114
139
|
return pulumi.get(self, "cpu_expandable")
|
|
115
140
|
|
|
@@ -121,8 +146,9 @@ class ResourcePoolArgs:
|
|
|
121
146
|
@pulumi.getter(name="cpuLimit")
|
|
122
147
|
def cpu_limit(self) -> Optional[pulumi.Input[builtins.int]]:
|
|
123
148
|
"""
|
|
124
|
-
The utilization of a resource pool will not
|
|
125
|
-
|
|
149
|
+
The CPU utilization of a resource pool will not
|
|
150
|
+
exceed this limit, even if there are available resources. Set to `-1` for
|
|
151
|
+
unlimited. Default: `-1`
|
|
126
152
|
"""
|
|
127
153
|
return pulumi.get(self, "cpu_limit")
|
|
128
154
|
|
|
@@ -134,7 +160,8 @@ class ResourcePoolArgs:
|
|
|
134
160
|
@pulumi.getter(name="cpuReservation")
|
|
135
161
|
def cpu_reservation(self) -> Optional[pulumi.Input[builtins.int]]:
|
|
136
162
|
"""
|
|
137
|
-
Amount of CPU (MHz) that is guaranteed
|
|
163
|
+
Amount of CPU (MHz) that is guaranteed
|
|
164
|
+
available to the resource pool. Default: `0`
|
|
138
165
|
"""
|
|
139
166
|
return pulumi.get(self, "cpu_reservation")
|
|
140
167
|
|
|
@@ -146,8 +173,11 @@ class ResourcePoolArgs:
|
|
|
146
173
|
@pulumi.getter(name="cpuShareLevel")
|
|
147
174
|
def cpu_share_level(self) -> Optional[pulumi.Input[builtins.str]]:
|
|
148
175
|
"""
|
|
149
|
-
The allocation level. The level is a
|
|
150
|
-
shares.
|
|
176
|
+
The CPU allocation level. The level is a
|
|
177
|
+
simplified view of shares. Levels map to a pre-determined set of numeric
|
|
178
|
+
values for shares. Can be one of `low`, `normal`, `high`, or `custom`. When
|
|
179
|
+
`low`, `normal`, or `high` are specified values in `cpu_shares` will be
|
|
180
|
+
ignored. Default: `normal`
|
|
151
181
|
"""
|
|
152
182
|
return pulumi.get(self, "cpu_share_level")
|
|
153
183
|
|
|
@@ -159,8 +189,9 @@ class ResourcePoolArgs:
|
|
|
159
189
|
@pulumi.getter(name="cpuShares")
|
|
160
190
|
def cpu_shares(self) -> Optional[pulumi.Input[builtins.int]]:
|
|
161
191
|
"""
|
|
162
|
-
The number of shares allocated. Used to
|
|
163
|
-
|
|
192
|
+
The number of shares allocated for CPU. Used to
|
|
193
|
+
determine resource allocation in case of resource contention. If this is set,
|
|
194
|
+
`cpu_share_level` must be `custom`.
|
|
164
195
|
"""
|
|
165
196
|
return pulumi.get(self, "cpu_shares")
|
|
166
197
|
|
|
@@ -184,8 +215,9 @@ class ResourcePoolArgs:
|
|
|
184
215
|
@pulumi.getter(name="memoryExpandable")
|
|
185
216
|
def memory_expandable(self) -> Optional[pulumi.Input[builtins.bool]]:
|
|
186
217
|
"""
|
|
187
|
-
Determines if the reservation on a resource
|
|
188
|
-
|
|
218
|
+
Determines if the reservation on a resource
|
|
219
|
+
pool can grow beyond the specified value if the parent resource pool has
|
|
220
|
+
unreserved resources. Default: `true`
|
|
189
221
|
"""
|
|
190
222
|
return pulumi.get(self, "memory_expandable")
|
|
191
223
|
|
|
@@ -197,8 +229,9 @@ class ResourcePoolArgs:
|
|
|
197
229
|
@pulumi.getter(name="memoryLimit")
|
|
198
230
|
def memory_limit(self) -> Optional[pulumi.Input[builtins.int]]:
|
|
199
231
|
"""
|
|
200
|
-
The utilization of a resource pool will not
|
|
201
|
-
|
|
232
|
+
The CPU utilization of a resource pool will not
|
|
233
|
+
exceed this limit, even if there are available resources. Set to `-1` for
|
|
234
|
+
unlimited. Default: `-1`
|
|
202
235
|
"""
|
|
203
236
|
return pulumi.get(self, "memory_limit")
|
|
204
237
|
|
|
@@ -210,7 +243,8 @@ class ResourcePoolArgs:
|
|
|
210
243
|
@pulumi.getter(name="memoryReservation")
|
|
211
244
|
def memory_reservation(self) -> Optional[pulumi.Input[builtins.int]]:
|
|
212
245
|
"""
|
|
213
|
-
Amount of
|
|
246
|
+
Amount of CPU (MHz) that is guaranteed
|
|
247
|
+
available to the resource pool. Default: `0`
|
|
214
248
|
"""
|
|
215
249
|
return pulumi.get(self, "memory_reservation")
|
|
216
250
|
|
|
@@ -222,8 +256,11 @@ class ResourcePoolArgs:
|
|
|
222
256
|
@pulumi.getter(name="memoryShareLevel")
|
|
223
257
|
def memory_share_level(self) -> Optional[pulumi.Input[builtins.str]]:
|
|
224
258
|
"""
|
|
225
|
-
The allocation level. The level is a
|
|
226
|
-
shares.
|
|
259
|
+
The CPU allocation level. The level is a
|
|
260
|
+
simplified view of shares. Levels map to a pre-determined set of numeric
|
|
261
|
+
values for shares. Can be one of `low`, `normal`, `high`, or `custom`. When
|
|
262
|
+
`low`, `normal`, or `high` are specified values in `memory_shares` will be
|
|
263
|
+
ignored. Default: `normal`
|
|
227
264
|
"""
|
|
228
265
|
return pulumi.get(self, "memory_share_level")
|
|
229
266
|
|
|
@@ -235,8 +272,9 @@ class ResourcePoolArgs:
|
|
|
235
272
|
@pulumi.getter(name="memoryShares")
|
|
236
273
|
def memory_shares(self) -> Optional[pulumi.Input[builtins.int]]:
|
|
237
274
|
"""
|
|
238
|
-
The number of shares allocated. Used to
|
|
239
|
-
|
|
275
|
+
The number of shares allocated for CPU. Used to
|
|
276
|
+
determine resource allocation in case of resource contention. If this is set,
|
|
277
|
+
`memory_share_level` must be `custom`.
|
|
240
278
|
"""
|
|
241
279
|
return pulumi.get(self, "memory_shares")
|
|
242
280
|
|
|
@@ -248,7 +286,7 @@ class ResourcePoolArgs:
|
|
|
248
286
|
@pulumi.getter
|
|
249
287
|
def name(self) -> Optional[pulumi.Input[builtins.str]]:
|
|
250
288
|
"""
|
|
251
|
-
|
|
289
|
+
The name of the resource pool.
|
|
252
290
|
"""
|
|
253
291
|
return pulumi.get(self, "name")
|
|
254
292
|
|
|
@@ -260,8 +298,10 @@ class ResourcePoolArgs:
|
|
|
260
298
|
@pulumi.getter(name="scaleDescendantsShares")
|
|
261
299
|
def scale_descendants_shares(self) -> Optional[pulumi.Input[builtins.str]]:
|
|
262
300
|
"""
|
|
263
|
-
Determines if the shares of all
|
|
264
|
-
pool are scaled up or down
|
|
301
|
+
Determines if the shares of all
|
|
302
|
+
descendants of the resource pool are scaled up or down when the shares
|
|
303
|
+
of the resource pool are scaled up or down. Can be one of `disabled` or
|
|
304
|
+
`scaleCpuAndMemoryShares`. Default: `disabled`.
|
|
265
305
|
"""
|
|
266
306
|
return pulumi.get(self, "scale_descendants_shares")
|
|
267
307
|
|
|
@@ -273,7 +313,7 @@ class ResourcePoolArgs:
|
|
|
273
313
|
@pulumi.getter
|
|
274
314
|
def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]:
|
|
275
315
|
"""
|
|
276
|
-
|
|
316
|
+
The IDs of any tags to attach to this resource.
|
|
277
317
|
"""
|
|
278
318
|
return pulumi.get(self, "tags")
|
|
279
319
|
|
|
@@ -302,30 +342,50 @@ class _ResourcePoolState:
|
|
|
302
342
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None):
|
|
303
343
|
"""
|
|
304
344
|
Input properties used for looking up and filtering ResourcePool resources.
|
|
305
|
-
:param pulumi.Input[builtins.bool] cpu_expandable: Determines if the reservation on a resource
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
345
|
+
:param pulumi.Input[builtins.bool] cpu_expandable: Determines if the reservation on a resource
|
|
346
|
+
pool can grow beyond the specified value if the parent resource pool has
|
|
347
|
+
unreserved resources. Default: `true`
|
|
348
|
+
:param pulumi.Input[builtins.int] cpu_limit: The CPU utilization of a resource pool will not
|
|
349
|
+
exceed this limit, even if there are available resources. Set to `-1` for
|
|
350
|
+
unlimited. Default: `-1`
|
|
351
|
+
:param pulumi.Input[builtins.int] cpu_reservation: Amount of CPU (MHz) that is guaranteed
|
|
352
|
+
available to the resource pool. Default: `0`
|
|
353
|
+
:param pulumi.Input[builtins.str] cpu_share_level: The CPU allocation level. The level is a
|
|
354
|
+
simplified view of shares. Levels map to a pre-determined set of numeric
|
|
355
|
+
values for shares. Can be one of `low`, `normal`, `high`, or `custom`. When
|
|
356
|
+
`low`, `normal`, or `high` are specified values in `cpu_shares` will be
|
|
357
|
+
ignored. Default: `normal`
|
|
358
|
+
:param pulumi.Input[builtins.int] cpu_shares: The number of shares allocated for CPU. Used to
|
|
359
|
+
determine resource allocation in case of resource contention. If this is set,
|
|
360
|
+
`cpu_share_level` must be `custom`.
|
|
314
361
|
:param pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]] custom_attributes: A list of custom attributes to set on this resource.
|
|
315
|
-
:param pulumi.Input[builtins.bool] memory_expandable: Determines if the reservation on a resource
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
:param pulumi.Input[
|
|
362
|
+
:param pulumi.Input[builtins.bool] memory_expandable: Determines if the reservation on a resource
|
|
363
|
+
pool can grow beyond the specified value if the parent resource pool has
|
|
364
|
+
unreserved resources. Default: `true`
|
|
365
|
+
:param pulumi.Input[builtins.int] memory_limit: The CPU utilization of a resource pool will not
|
|
366
|
+
exceed this limit, even if there are available resources. Set to `-1` for
|
|
367
|
+
unlimited. Default: `-1`
|
|
368
|
+
:param pulumi.Input[builtins.int] memory_reservation: Amount of CPU (MHz) that is guaranteed
|
|
369
|
+
available to the resource pool. Default: `0`
|
|
370
|
+
:param pulumi.Input[builtins.str] memory_share_level: The CPU allocation level. The level is a
|
|
371
|
+
simplified view of shares. Levels map to a pre-determined set of numeric
|
|
372
|
+
values for shares. Can be one of `low`, `normal`, `high`, or `custom`. When
|
|
373
|
+
`low`, `normal`, or `high` are specified values in `memory_shares` will be
|
|
374
|
+
ignored. Default: `normal`
|
|
375
|
+
:param pulumi.Input[builtins.int] memory_shares: The number of shares allocated for CPU. Used to
|
|
376
|
+
determine resource allocation in case of resource contention. If this is set,
|
|
377
|
+
`memory_share_level` must be `custom`.
|
|
378
|
+
:param pulumi.Input[builtins.str] name: The name of the resource pool.
|
|
379
|
+
:param pulumi.Input[builtins.str] parent_resource_pool_id: The managed object ID
|
|
380
|
+
of the parent resource pool. This can be the root resource pool for a cluster
|
|
381
|
+
or standalone host, or a resource pool itself. When moving a resource pool
|
|
382
|
+
from one parent resource pool to another, both must share a common root
|
|
383
|
+
resource pool.
|
|
384
|
+
:param pulumi.Input[builtins.str] scale_descendants_shares: Determines if the shares of all
|
|
385
|
+
descendants of the resource pool are scaled up or down when the shares
|
|
386
|
+
of the resource pool are scaled up or down. Can be one of `disabled` or
|
|
387
|
+
`scaleCpuAndMemoryShares`. Default: `disabled`.
|
|
388
|
+
:param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] tags: The IDs of any tags to attach to this resource.
|
|
329
389
|
"""
|
|
330
390
|
if cpu_expandable is not None:
|
|
331
391
|
pulumi.set(__self__, "cpu_expandable", cpu_expandable)
|
|
@@ -362,8 +422,9 @@ class _ResourcePoolState:
|
|
|
362
422
|
@pulumi.getter(name="cpuExpandable")
|
|
363
423
|
def cpu_expandable(self) -> Optional[pulumi.Input[builtins.bool]]:
|
|
364
424
|
"""
|
|
365
|
-
Determines if the reservation on a resource
|
|
366
|
-
|
|
425
|
+
Determines if the reservation on a resource
|
|
426
|
+
pool can grow beyond the specified value if the parent resource pool has
|
|
427
|
+
unreserved resources. Default: `true`
|
|
367
428
|
"""
|
|
368
429
|
return pulumi.get(self, "cpu_expandable")
|
|
369
430
|
|
|
@@ -375,8 +436,9 @@ class _ResourcePoolState:
|
|
|
375
436
|
@pulumi.getter(name="cpuLimit")
|
|
376
437
|
def cpu_limit(self) -> Optional[pulumi.Input[builtins.int]]:
|
|
377
438
|
"""
|
|
378
|
-
The utilization of a resource pool will not
|
|
379
|
-
|
|
439
|
+
The CPU utilization of a resource pool will not
|
|
440
|
+
exceed this limit, even if there are available resources. Set to `-1` for
|
|
441
|
+
unlimited. Default: `-1`
|
|
380
442
|
"""
|
|
381
443
|
return pulumi.get(self, "cpu_limit")
|
|
382
444
|
|
|
@@ -388,7 +450,8 @@ class _ResourcePoolState:
|
|
|
388
450
|
@pulumi.getter(name="cpuReservation")
|
|
389
451
|
def cpu_reservation(self) -> Optional[pulumi.Input[builtins.int]]:
|
|
390
452
|
"""
|
|
391
|
-
Amount of CPU (MHz) that is guaranteed
|
|
453
|
+
Amount of CPU (MHz) that is guaranteed
|
|
454
|
+
available to the resource pool. Default: `0`
|
|
392
455
|
"""
|
|
393
456
|
return pulumi.get(self, "cpu_reservation")
|
|
394
457
|
|
|
@@ -400,8 +463,11 @@ class _ResourcePoolState:
|
|
|
400
463
|
@pulumi.getter(name="cpuShareLevel")
|
|
401
464
|
def cpu_share_level(self) -> Optional[pulumi.Input[builtins.str]]:
|
|
402
465
|
"""
|
|
403
|
-
The allocation level. The level is a
|
|
404
|
-
shares.
|
|
466
|
+
The CPU allocation level. The level is a
|
|
467
|
+
simplified view of shares. Levels map to a pre-determined set of numeric
|
|
468
|
+
values for shares. Can be one of `low`, `normal`, `high`, or `custom`. When
|
|
469
|
+
`low`, `normal`, or `high` are specified values in `cpu_shares` will be
|
|
470
|
+
ignored. Default: `normal`
|
|
405
471
|
"""
|
|
406
472
|
return pulumi.get(self, "cpu_share_level")
|
|
407
473
|
|
|
@@ -413,8 +479,9 @@ class _ResourcePoolState:
|
|
|
413
479
|
@pulumi.getter(name="cpuShares")
|
|
414
480
|
def cpu_shares(self) -> Optional[pulumi.Input[builtins.int]]:
|
|
415
481
|
"""
|
|
416
|
-
The number of shares allocated. Used to
|
|
417
|
-
|
|
482
|
+
The number of shares allocated for CPU. Used to
|
|
483
|
+
determine resource allocation in case of resource contention. If this is set,
|
|
484
|
+
`cpu_share_level` must be `custom`.
|
|
418
485
|
"""
|
|
419
486
|
return pulumi.get(self, "cpu_shares")
|
|
420
487
|
|
|
@@ -438,8 +505,9 @@ class _ResourcePoolState:
|
|
|
438
505
|
@pulumi.getter(name="memoryExpandable")
|
|
439
506
|
def memory_expandable(self) -> Optional[pulumi.Input[builtins.bool]]:
|
|
440
507
|
"""
|
|
441
|
-
Determines if the reservation on a resource
|
|
442
|
-
|
|
508
|
+
Determines if the reservation on a resource
|
|
509
|
+
pool can grow beyond the specified value if the parent resource pool has
|
|
510
|
+
unreserved resources. Default: `true`
|
|
443
511
|
"""
|
|
444
512
|
return pulumi.get(self, "memory_expandable")
|
|
445
513
|
|
|
@@ -451,8 +519,9 @@ class _ResourcePoolState:
|
|
|
451
519
|
@pulumi.getter(name="memoryLimit")
|
|
452
520
|
def memory_limit(self) -> Optional[pulumi.Input[builtins.int]]:
|
|
453
521
|
"""
|
|
454
|
-
The utilization of a resource pool will not
|
|
455
|
-
|
|
522
|
+
The CPU utilization of a resource pool will not
|
|
523
|
+
exceed this limit, even if there are available resources. Set to `-1` for
|
|
524
|
+
unlimited. Default: `-1`
|
|
456
525
|
"""
|
|
457
526
|
return pulumi.get(self, "memory_limit")
|
|
458
527
|
|
|
@@ -464,7 +533,8 @@ class _ResourcePoolState:
|
|
|
464
533
|
@pulumi.getter(name="memoryReservation")
|
|
465
534
|
def memory_reservation(self) -> Optional[pulumi.Input[builtins.int]]:
|
|
466
535
|
"""
|
|
467
|
-
Amount of
|
|
536
|
+
Amount of CPU (MHz) that is guaranteed
|
|
537
|
+
available to the resource pool. Default: `0`
|
|
468
538
|
"""
|
|
469
539
|
return pulumi.get(self, "memory_reservation")
|
|
470
540
|
|
|
@@ -476,8 +546,11 @@ class _ResourcePoolState:
|
|
|
476
546
|
@pulumi.getter(name="memoryShareLevel")
|
|
477
547
|
def memory_share_level(self) -> Optional[pulumi.Input[builtins.str]]:
|
|
478
548
|
"""
|
|
479
|
-
The allocation level. The level is a
|
|
480
|
-
shares.
|
|
549
|
+
The CPU allocation level. The level is a
|
|
550
|
+
simplified view of shares. Levels map to a pre-determined set of numeric
|
|
551
|
+
values for shares. Can be one of `low`, `normal`, `high`, or `custom`. When
|
|
552
|
+
`low`, `normal`, or `high` are specified values in `memory_shares` will be
|
|
553
|
+
ignored. Default: `normal`
|
|
481
554
|
"""
|
|
482
555
|
return pulumi.get(self, "memory_share_level")
|
|
483
556
|
|
|
@@ -489,8 +562,9 @@ class _ResourcePoolState:
|
|
|
489
562
|
@pulumi.getter(name="memoryShares")
|
|
490
563
|
def memory_shares(self) -> Optional[pulumi.Input[builtins.int]]:
|
|
491
564
|
"""
|
|
492
|
-
The number of shares allocated. Used to
|
|
493
|
-
|
|
565
|
+
The number of shares allocated for CPU. Used to
|
|
566
|
+
determine resource allocation in case of resource contention. If this is set,
|
|
567
|
+
`memory_share_level` must be `custom`.
|
|
494
568
|
"""
|
|
495
569
|
return pulumi.get(self, "memory_shares")
|
|
496
570
|
|
|
@@ -502,7 +576,7 @@ class _ResourcePoolState:
|
|
|
502
576
|
@pulumi.getter
|
|
503
577
|
def name(self) -> Optional[pulumi.Input[builtins.str]]:
|
|
504
578
|
"""
|
|
505
|
-
|
|
579
|
+
The name of the resource pool.
|
|
506
580
|
"""
|
|
507
581
|
return pulumi.get(self, "name")
|
|
508
582
|
|
|
@@ -514,7 +588,11 @@ class _ResourcePoolState:
|
|
|
514
588
|
@pulumi.getter(name="parentResourcePoolId")
|
|
515
589
|
def parent_resource_pool_id(self) -> Optional[pulumi.Input[builtins.str]]:
|
|
516
590
|
"""
|
|
517
|
-
The
|
|
591
|
+
The managed object ID
|
|
592
|
+
of the parent resource pool. This can be the root resource pool for a cluster
|
|
593
|
+
or standalone host, or a resource pool itself. When moving a resource pool
|
|
594
|
+
from one parent resource pool to another, both must share a common root
|
|
595
|
+
resource pool.
|
|
518
596
|
"""
|
|
519
597
|
return pulumi.get(self, "parent_resource_pool_id")
|
|
520
598
|
|
|
@@ -526,8 +604,10 @@ class _ResourcePoolState:
|
|
|
526
604
|
@pulumi.getter(name="scaleDescendantsShares")
|
|
527
605
|
def scale_descendants_shares(self) -> Optional[pulumi.Input[builtins.str]]:
|
|
528
606
|
"""
|
|
529
|
-
Determines if the shares of all
|
|
530
|
-
pool are scaled up or down
|
|
607
|
+
Determines if the shares of all
|
|
608
|
+
descendants of the resource pool are scaled up or down when the shares
|
|
609
|
+
of the resource pool are scaled up or down. Can be one of `disabled` or
|
|
610
|
+
`scaleCpuAndMemoryShares`. Default: `disabled`.
|
|
531
611
|
"""
|
|
532
612
|
return pulumi.get(self, "scale_descendants_shares")
|
|
533
613
|
|
|
@@ -539,7 +619,7 @@ class _ResourcePoolState:
|
|
|
539
619
|
@pulumi.getter
|
|
540
620
|
def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]:
|
|
541
621
|
"""
|
|
542
|
-
|
|
622
|
+
The IDs of any tags to attach to this resource.
|
|
543
623
|
"""
|
|
544
624
|
return pulumi.get(self, "tags")
|
|
545
625
|
|
|
@@ -548,6 +628,7 @@ class _ResourcePoolState:
|
|
|
548
628
|
pulumi.set(self, "tags", value)
|
|
549
629
|
|
|
550
630
|
|
|
631
|
+
@pulumi.type_token("vsphere:index/resourcePool:ResourcePool")
|
|
551
632
|
class ResourcePool(pulumi.CustomResource):
|
|
552
633
|
@overload
|
|
553
634
|
def __init__(__self__,
|
|
@@ -570,33 +651,146 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
570
651
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
|
|
571
652
|
__props__=None):
|
|
572
653
|
"""
|
|
573
|
-
|
|
654
|
+
The `ResourcePool` resource can be used to create and manage
|
|
655
|
+
resource pools on DRS-enabled vSphere clusters or standalone ESXi hosts.
|
|
656
|
+
|
|
657
|
+
For more information on vSphere resource pools, please refer to the
|
|
658
|
+
[product documentation][ref-vsphere-resource_pools].
|
|
659
|
+
|
|
660
|
+
[ref-vsphere-resource_pools]: https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/vsphere-resource-management-8-0/managing-resource-pools.html
|
|
661
|
+
|
|
662
|
+
## Example Usage
|
|
663
|
+
|
|
664
|
+
The following example sets up a resource pool in an existing compute cluster
|
|
665
|
+
with the default settings for CPU and memory reservations, shares, and limits.
|
|
666
|
+
|
|
667
|
+
```python
|
|
668
|
+
import pulumi
|
|
669
|
+
import pulumi_vsphere as vsphere
|
|
670
|
+
|
|
671
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
672
|
+
compute_cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
673
|
+
datacenter_id=datacenter.id)
|
|
674
|
+
resource_pool = vsphere.ResourcePool("resource_pool",
|
|
675
|
+
name="resource-pool-01",
|
|
676
|
+
parent_resource_pool_id=compute_cluster.resource_pool_id)
|
|
677
|
+
```
|
|
678
|
+
|
|
679
|
+
A virtual machine resource could be targeted to use the default resource pool
|
|
680
|
+
of the cluster using the following:
|
|
681
|
+
|
|
682
|
+
```python
|
|
683
|
+
import pulumi
|
|
684
|
+
import pulumi_vsphere as vsphere
|
|
685
|
+
|
|
686
|
+
vm = vsphere.VirtualMachine("vm", resource_pool_id=cluster["resourcePoolId"])
|
|
687
|
+
```
|
|
688
|
+
|
|
689
|
+
The following example sets up a parent resource pool in an existing compute cluster
|
|
690
|
+
with a child resource pool nested below. Each resource pool is configured with
|
|
691
|
+
the default settings for CPU and memory reservations, shares, and limits.
|
|
692
|
+
|
|
693
|
+
```python
|
|
694
|
+
import pulumi
|
|
695
|
+
import pulumi_vsphere as vsphere
|
|
696
|
+
|
|
697
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
698
|
+
compute_cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
699
|
+
datacenter_id=datacenter.id)
|
|
700
|
+
resource_pool_parent = vsphere.ResourcePool("resource_pool_parent",
|
|
701
|
+
name="parent",
|
|
702
|
+
parent_resource_pool_id=compute_cluster.resource_pool_id)
|
|
703
|
+
resource_pool_child = vsphere.ResourcePool("resource_pool_child",
|
|
704
|
+
name="child",
|
|
705
|
+
parent_resource_pool_id=resource_pool_parent.id)
|
|
706
|
+
```
|
|
707
|
+
|
|
708
|
+
The following example set up a parent resource pool on a standalone ESXi host with the default
|
|
709
|
+
settings for CPU and memory reservations, shares, and limits.
|
|
710
|
+
|
|
711
|
+
```python
|
|
712
|
+
import pulumi
|
|
713
|
+
import pulumi_vsphere as vsphere
|
|
714
|
+
|
|
715
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
716
|
+
thumbprint = vsphere.get_host_thumbprint(address="esxi-01.example.com",
|
|
717
|
+
insecure=True)
|
|
718
|
+
esx_01 = vsphere.Host("esx-01",
|
|
719
|
+
hostname="esxi-01.example.com",
|
|
720
|
+
username="root",
|
|
721
|
+
password="password",
|
|
722
|
+
license="00000-00000-00000-00000-00000",
|
|
723
|
+
thumbprint=thumbprint.id,
|
|
724
|
+
datacenter=datacenter.id)
|
|
725
|
+
```
|
|
726
|
+
|
|
727
|
+
After the hosts are added to the datacenter, a resource pool can then be created on the host.
|
|
728
|
+
|
|
729
|
+
```python
|
|
730
|
+
import pulumi
|
|
731
|
+
import pulumi_vsphere as vsphere
|
|
732
|
+
|
|
733
|
+
host = vsphere.get_host(name="esxi-01.example.com",
|
|
734
|
+
datacenter_id=datacenter["id"])
|
|
735
|
+
resource_pool = vsphere.ResourcePool("resource_pool",
|
|
736
|
+
name="site1-resource-pool",
|
|
737
|
+
parent_resource_pool_id=host.resource_pool_id)
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
## Import
|
|
741
|
+
|
|
742
|
+
### Settings that Require vSphere 7.0 or higher
|
|
743
|
+
|
|
744
|
+
These settings require vSphere 7.0 or higher:
|
|
745
|
+
|
|
746
|
+
* [`scale_descendants_shares`](#scale_descendants_shares)
|
|
747
|
+
|
|
574
748
|
:param str resource_name: The name of the resource.
|
|
575
749
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
576
|
-
:param pulumi.Input[builtins.bool] cpu_expandable: Determines if the reservation on a resource
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
750
|
+
:param pulumi.Input[builtins.bool] cpu_expandable: Determines if the reservation on a resource
|
|
751
|
+
pool can grow beyond the specified value if the parent resource pool has
|
|
752
|
+
unreserved resources. Default: `true`
|
|
753
|
+
:param pulumi.Input[builtins.int] cpu_limit: The CPU utilization of a resource pool will not
|
|
754
|
+
exceed this limit, even if there are available resources. Set to `-1` for
|
|
755
|
+
unlimited. Default: `-1`
|
|
756
|
+
:param pulumi.Input[builtins.int] cpu_reservation: Amount of CPU (MHz) that is guaranteed
|
|
757
|
+
available to the resource pool. Default: `0`
|
|
758
|
+
:param pulumi.Input[builtins.str] cpu_share_level: The CPU allocation level. The level is a
|
|
759
|
+
simplified view of shares. Levels map to a pre-determined set of numeric
|
|
760
|
+
values for shares. Can be one of `low`, `normal`, `high`, or `custom`. When
|
|
761
|
+
`low`, `normal`, or `high` are specified values in `cpu_shares` will be
|
|
762
|
+
ignored. Default: `normal`
|
|
763
|
+
:param pulumi.Input[builtins.int] cpu_shares: The number of shares allocated for CPU. Used to
|
|
764
|
+
determine resource allocation in case of resource contention. If this is set,
|
|
765
|
+
`cpu_share_level` must be `custom`.
|
|
585
766
|
:param pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]] custom_attributes: A list of custom attributes to set on this resource.
|
|
586
|
-
:param pulumi.Input[builtins.bool] memory_expandable: Determines if the reservation on a resource
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
:param pulumi.Input[
|
|
767
|
+
:param pulumi.Input[builtins.bool] memory_expandable: Determines if the reservation on a resource
|
|
768
|
+
pool can grow beyond the specified value if the parent resource pool has
|
|
769
|
+
unreserved resources. Default: `true`
|
|
770
|
+
:param pulumi.Input[builtins.int] memory_limit: The CPU utilization of a resource pool will not
|
|
771
|
+
exceed this limit, even if there are available resources. Set to `-1` for
|
|
772
|
+
unlimited. Default: `-1`
|
|
773
|
+
:param pulumi.Input[builtins.int] memory_reservation: Amount of CPU (MHz) that is guaranteed
|
|
774
|
+
available to the resource pool. Default: `0`
|
|
775
|
+
:param pulumi.Input[builtins.str] memory_share_level: The CPU allocation level. The level is a
|
|
776
|
+
simplified view of shares. Levels map to a pre-determined set of numeric
|
|
777
|
+
values for shares. Can be one of `low`, `normal`, `high`, or `custom`. When
|
|
778
|
+
`low`, `normal`, or `high` are specified values in `memory_shares` will be
|
|
779
|
+
ignored. Default: `normal`
|
|
780
|
+
:param pulumi.Input[builtins.int] memory_shares: The number of shares allocated for CPU. Used to
|
|
781
|
+
determine resource allocation in case of resource contention. If this is set,
|
|
782
|
+
`memory_share_level` must be `custom`.
|
|
783
|
+
:param pulumi.Input[builtins.str] name: The name of the resource pool.
|
|
784
|
+
:param pulumi.Input[builtins.str] parent_resource_pool_id: The managed object ID
|
|
785
|
+
of the parent resource pool. This can be the root resource pool for a cluster
|
|
786
|
+
or standalone host, or a resource pool itself. When moving a resource pool
|
|
787
|
+
from one parent resource pool to another, both must share a common root
|
|
788
|
+
resource pool.
|
|
789
|
+
:param pulumi.Input[builtins.str] scale_descendants_shares: Determines if the shares of all
|
|
790
|
+
descendants of the resource pool are scaled up or down when the shares
|
|
791
|
+
of the resource pool are scaled up or down. Can be one of `disabled` or
|
|
792
|
+
`scaleCpuAndMemoryShares`. Default: `disabled`.
|
|
793
|
+
:param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] tags: The IDs of any tags to attach to this resource.
|
|
600
794
|
"""
|
|
601
795
|
...
|
|
602
796
|
@overload
|
|
@@ -605,7 +799,100 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
605
799
|
args: ResourcePoolArgs,
|
|
606
800
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
607
801
|
"""
|
|
608
|
-
|
|
802
|
+
The `ResourcePool` resource can be used to create and manage
|
|
803
|
+
resource pools on DRS-enabled vSphere clusters or standalone ESXi hosts.
|
|
804
|
+
|
|
805
|
+
For more information on vSphere resource pools, please refer to the
|
|
806
|
+
[product documentation][ref-vsphere-resource_pools].
|
|
807
|
+
|
|
808
|
+
[ref-vsphere-resource_pools]: https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/vsphere-resource-management-8-0/managing-resource-pools.html
|
|
809
|
+
|
|
810
|
+
## Example Usage
|
|
811
|
+
|
|
812
|
+
The following example sets up a resource pool in an existing compute cluster
|
|
813
|
+
with the default settings for CPU and memory reservations, shares, and limits.
|
|
814
|
+
|
|
815
|
+
```python
|
|
816
|
+
import pulumi
|
|
817
|
+
import pulumi_vsphere as vsphere
|
|
818
|
+
|
|
819
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
820
|
+
compute_cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
821
|
+
datacenter_id=datacenter.id)
|
|
822
|
+
resource_pool = vsphere.ResourcePool("resource_pool",
|
|
823
|
+
name="resource-pool-01",
|
|
824
|
+
parent_resource_pool_id=compute_cluster.resource_pool_id)
|
|
825
|
+
```
|
|
826
|
+
|
|
827
|
+
A virtual machine resource could be targeted to use the default resource pool
|
|
828
|
+
of the cluster using the following:
|
|
829
|
+
|
|
830
|
+
```python
|
|
831
|
+
import pulumi
|
|
832
|
+
import pulumi_vsphere as vsphere
|
|
833
|
+
|
|
834
|
+
vm = vsphere.VirtualMachine("vm", resource_pool_id=cluster["resourcePoolId"])
|
|
835
|
+
```
|
|
836
|
+
|
|
837
|
+
The following example sets up a parent resource pool in an existing compute cluster
|
|
838
|
+
with a child resource pool nested below. Each resource pool is configured with
|
|
839
|
+
the default settings for CPU and memory reservations, shares, and limits.
|
|
840
|
+
|
|
841
|
+
```python
|
|
842
|
+
import pulumi
|
|
843
|
+
import pulumi_vsphere as vsphere
|
|
844
|
+
|
|
845
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
846
|
+
compute_cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
847
|
+
datacenter_id=datacenter.id)
|
|
848
|
+
resource_pool_parent = vsphere.ResourcePool("resource_pool_parent",
|
|
849
|
+
name="parent",
|
|
850
|
+
parent_resource_pool_id=compute_cluster.resource_pool_id)
|
|
851
|
+
resource_pool_child = vsphere.ResourcePool("resource_pool_child",
|
|
852
|
+
name="child",
|
|
853
|
+
parent_resource_pool_id=resource_pool_parent.id)
|
|
854
|
+
```
|
|
855
|
+
|
|
856
|
+
The following example set up a parent resource pool on a standalone ESXi host with the default
|
|
857
|
+
settings for CPU and memory reservations, shares, and limits.
|
|
858
|
+
|
|
859
|
+
```python
|
|
860
|
+
import pulumi
|
|
861
|
+
import pulumi_vsphere as vsphere
|
|
862
|
+
|
|
863
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
864
|
+
thumbprint = vsphere.get_host_thumbprint(address="esxi-01.example.com",
|
|
865
|
+
insecure=True)
|
|
866
|
+
esx_01 = vsphere.Host("esx-01",
|
|
867
|
+
hostname="esxi-01.example.com",
|
|
868
|
+
username="root",
|
|
869
|
+
password="password",
|
|
870
|
+
license="00000-00000-00000-00000-00000",
|
|
871
|
+
thumbprint=thumbprint.id,
|
|
872
|
+
datacenter=datacenter.id)
|
|
873
|
+
```
|
|
874
|
+
|
|
875
|
+
After the hosts are added to the datacenter, a resource pool can then be created on the host.
|
|
876
|
+
|
|
877
|
+
```python
|
|
878
|
+
import pulumi
|
|
879
|
+
import pulumi_vsphere as vsphere
|
|
880
|
+
|
|
881
|
+
host = vsphere.get_host(name="esxi-01.example.com",
|
|
882
|
+
datacenter_id=datacenter["id"])
|
|
883
|
+
resource_pool = vsphere.ResourcePool("resource_pool",
|
|
884
|
+
name="site1-resource-pool",
|
|
885
|
+
parent_resource_pool_id=host.resource_pool_id)
|
|
886
|
+
```
|
|
887
|
+
|
|
888
|
+
## Import
|
|
889
|
+
|
|
890
|
+
### Settings that Require vSphere 7.0 or higher
|
|
891
|
+
|
|
892
|
+
These settings require vSphere 7.0 or higher:
|
|
893
|
+
|
|
894
|
+
* [`scale_descendants_shares`](#scale_descendants_shares)
|
|
895
|
+
|
|
609
896
|
:param str resource_name: The name of the resource.
|
|
610
897
|
:param ResourcePoolArgs args: The arguments to use to populate this resource's properties.
|
|
611
898
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -694,30 +981,50 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
694
981
|
:param str resource_name: The unique name of the resulting resource.
|
|
695
982
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
696
983
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
697
|
-
:param pulumi.Input[builtins.bool] cpu_expandable: Determines if the reservation on a resource
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
984
|
+
:param pulumi.Input[builtins.bool] cpu_expandable: Determines if the reservation on a resource
|
|
985
|
+
pool can grow beyond the specified value if the parent resource pool has
|
|
986
|
+
unreserved resources. Default: `true`
|
|
987
|
+
:param pulumi.Input[builtins.int] cpu_limit: The CPU utilization of a resource pool will not
|
|
988
|
+
exceed this limit, even if there are available resources. Set to `-1` for
|
|
989
|
+
unlimited. Default: `-1`
|
|
990
|
+
:param pulumi.Input[builtins.int] cpu_reservation: Amount of CPU (MHz) that is guaranteed
|
|
991
|
+
available to the resource pool. Default: `0`
|
|
992
|
+
:param pulumi.Input[builtins.str] cpu_share_level: The CPU allocation level. The level is a
|
|
993
|
+
simplified view of shares. Levels map to a pre-determined set of numeric
|
|
994
|
+
values for shares. Can be one of `low`, `normal`, `high`, or `custom`. When
|
|
995
|
+
`low`, `normal`, or `high` are specified values in `cpu_shares` will be
|
|
996
|
+
ignored. Default: `normal`
|
|
997
|
+
:param pulumi.Input[builtins.int] cpu_shares: The number of shares allocated for CPU. Used to
|
|
998
|
+
determine resource allocation in case of resource contention. If this is set,
|
|
999
|
+
`cpu_share_level` must be `custom`.
|
|
706
1000
|
:param pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]] custom_attributes: A list of custom attributes to set on this resource.
|
|
707
|
-
:param pulumi.Input[builtins.bool] memory_expandable: Determines if the reservation on a resource
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
:param pulumi.Input[
|
|
1001
|
+
:param pulumi.Input[builtins.bool] memory_expandable: Determines if the reservation on a resource
|
|
1002
|
+
pool can grow beyond the specified value if the parent resource pool has
|
|
1003
|
+
unreserved resources. Default: `true`
|
|
1004
|
+
:param pulumi.Input[builtins.int] memory_limit: The CPU utilization of a resource pool will not
|
|
1005
|
+
exceed this limit, even if there are available resources. Set to `-1` for
|
|
1006
|
+
unlimited. Default: `-1`
|
|
1007
|
+
:param pulumi.Input[builtins.int] memory_reservation: Amount of CPU (MHz) that is guaranteed
|
|
1008
|
+
available to the resource pool. Default: `0`
|
|
1009
|
+
:param pulumi.Input[builtins.str] memory_share_level: The CPU allocation level. The level is a
|
|
1010
|
+
simplified view of shares. Levels map to a pre-determined set of numeric
|
|
1011
|
+
values for shares. Can be one of `low`, `normal`, `high`, or `custom`. When
|
|
1012
|
+
`low`, `normal`, or `high` are specified values in `memory_shares` will be
|
|
1013
|
+
ignored. Default: `normal`
|
|
1014
|
+
:param pulumi.Input[builtins.int] memory_shares: The number of shares allocated for CPU. Used to
|
|
1015
|
+
determine resource allocation in case of resource contention. If this is set,
|
|
1016
|
+
`memory_share_level` must be `custom`.
|
|
1017
|
+
:param pulumi.Input[builtins.str] name: The name of the resource pool.
|
|
1018
|
+
:param pulumi.Input[builtins.str] parent_resource_pool_id: The managed object ID
|
|
1019
|
+
of the parent resource pool. This can be the root resource pool for a cluster
|
|
1020
|
+
or standalone host, or a resource pool itself. When moving a resource pool
|
|
1021
|
+
from one parent resource pool to another, both must share a common root
|
|
1022
|
+
resource pool.
|
|
1023
|
+
:param pulumi.Input[builtins.str] scale_descendants_shares: Determines if the shares of all
|
|
1024
|
+
descendants of the resource pool are scaled up or down when the shares
|
|
1025
|
+
of the resource pool are scaled up or down. Can be one of `disabled` or
|
|
1026
|
+
`scaleCpuAndMemoryShares`. Default: `disabled`.
|
|
1027
|
+
:param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] tags: The IDs of any tags to attach to this resource.
|
|
721
1028
|
"""
|
|
722
1029
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
723
1030
|
|
|
@@ -744,8 +1051,9 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
744
1051
|
@pulumi.getter(name="cpuExpandable")
|
|
745
1052
|
def cpu_expandable(self) -> pulumi.Output[Optional[builtins.bool]]:
|
|
746
1053
|
"""
|
|
747
|
-
Determines if the reservation on a resource
|
|
748
|
-
|
|
1054
|
+
Determines if the reservation on a resource
|
|
1055
|
+
pool can grow beyond the specified value if the parent resource pool has
|
|
1056
|
+
unreserved resources. Default: `true`
|
|
749
1057
|
"""
|
|
750
1058
|
return pulumi.get(self, "cpu_expandable")
|
|
751
1059
|
|
|
@@ -753,8 +1061,9 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
753
1061
|
@pulumi.getter(name="cpuLimit")
|
|
754
1062
|
def cpu_limit(self) -> pulumi.Output[Optional[builtins.int]]:
|
|
755
1063
|
"""
|
|
756
|
-
The utilization of a resource pool will not
|
|
757
|
-
|
|
1064
|
+
The CPU utilization of a resource pool will not
|
|
1065
|
+
exceed this limit, even if there are available resources. Set to `-1` for
|
|
1066
|
+
unlimited. Default: `-1`
|
|
758
1067
|
"""
|
|
759
1068
|
return pulumi.get(self, "cpu_limit")
|
|
760
1069
|
|
|
@@ -762,7 +1071,8 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
762
1071
|
@pulumi.getter(name="cpuReservation")
|
|
763
1072
|
def cpu_reservation(self) -> pulumi.Output[Optional[builtins.int]]:
|
|
764
1073
|
"""
|
|
765
|
-
Amount of CPU (MHz) that is guaranteed
|
|
1074
|
+
Amount of CPU (MHz) that is guaranteed
|
|
1075
|
+
available to the resource pool. Default: `0`
|
|
766
1076
|
"""
|
|
767
1077
|
return pulumi.get(self, "cpu_reservation")
|
|
768
1078
|
|
|
@@ -770,8 +1080,11 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
770
1080
|
@pulumi.getter(name="cpuShareLevel")
|
|
771
1081
|
def cpu_share_level(self) -> pulumi.Output[Optional[builtins.str]]:
|
|
772
1082
|
"""
|
|
773
|
-
The allocation level. The level is a
|
|
774
|
-
shares.
|
|
1083
|
+
The CPU allocation level. The level is a
|
|
1084
|
+
simplified view of shares. Levels map to a pre-determined set of numeric
|
|
1085
|
+
values for shares. Can be one of `low`, `normal`, `high`, or `custom`. When
|
|
1086
|
+
`low`, `normal`, or `high` are specified values in `cpu_shares` will be
|
|
1087
|
+
ignored. Default: `normal`
|
|
775
1088
|
"""
|
|
776
1089
|
return pulumi.get(self, "cpu_share_level")
|
|
777
1090
|
|
|
@@ -779,8 +1092,9 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
779
1092
|
@pulumi.getter(name="cpuShares")
|
|
780
1093
|
def cpu_shares(self) -> pulumi.Output[builtins.int]:
|
|
781
1094
|
"""
|
|
782
|
-
The number of shares allocated. Used to
|
|
783
|
-
|
|
1095
|
+
The number of shares allocated for CPU. Used to
|
|
1096
|
+
determine resource allocation in case of resource contention. If this is set,
|
|
1097
|
+
`cpu_share_level` must be `custom`.
|
|
784
1098
|
"""
|
|
785
1099
|
return pulumi.get(self, "cpu_shares")
|
|
786
1100
|
|
|
@@ -796,8 +1110,9 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
796
1110
|
@pulumi.getter(name="memoryExpandable")
|
|
797
1111
|
def memory_expandable(self) -> pulumi.Output[Optional[builtins.bool]]:
|
|
798
1112
|
"""
|
|
799
|
-
Determines if the reservation on a resource
|
|
800
|
-
|
|
1113
|
+
Determines if the reservation on a resource
|
|
1114
|
+
pool can grow beyond the specified value if the parent resource pool has
|
|
1115
|
+
unreserved resources. Default: `true`
|
|
801
1116
|
"""
|
|
802
1117
|
return pulumi.get(self, "memory_expandable")
|
|
803
1118
|
|
|
@@ -805,8 +1120,9 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
805
1120
|
@pulumi.getter(name="memoryLimit")
|
|
806
1121
|
def memory_limit(self) -> pulumi.Output[Optional[builtins.int]]:
|
|
807
1122
|
"""
|
|
808
|
-
The utilization of a resource pool will not
|
|
809
|
-
|
|
1123
|
+
The CPU utilization of a resource pool will not
|
|
1124
|
+
exceed this limit, even if there are available resources. Set to `-1` for
|
|
1125
|
+
unlimited. Default: `-1`
|
|
810
1126
|
"""
|
|
811
1127
|
return pulumi.get(self, "memory_limit")
|
|
812
1128
|
|
|
@@ -814,7 +1130,8 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
814
1130
|
@pulumi.getter(name="memoryReservation")
|
|
815
1131
|
def memory_reservation(self) -> pulumi.Output[Optional[builtins.int]]:
|
|
816
1132
|
"""
|
|
817
|
-
Amount of
|
|
1133
|
+
Amount of CPU (MHz) that is guaranteed
|
|
1134
|
+
available to the resource pool. Default: `0`
|
|
818
1135
|
"""
|
|
819
1136
|
return pulumi.get(self, "memory_reservation")
|
|
820
1137
|
|
|
@@ -822,8 +1139,11 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
822
1139
|
@pulumi.getter(name="memoryShareLevel")
|
|
823
1140
|
def memory_share_level(self) -> pulumi.Output[Optional[builtins.str]]:
|
|
824
1141
|
"""
|
|
825
|
-
The allocation level. The level is a
|
|
826
|
-
shares.
|
|
1142
|
+
The CPU allocation level. The level is a
|
|
1143
|
+
simplified view of shares. Levels map to a pre-determined set of numeric
|
|
1144
|
+
values for shares. Can be one of `low`, `normal`, `high`, or `custom`. When
|
|
1145
|
+
`low`, `normal`, or `high` are specified values in `memory_shares` will be
|
|
1146
|
+
ignored. Default: `normal`
|
|
827
1147
|
"""
|
|
828
1148
|
return pulumi.get(self, "memory_share_level")
|
|
829
1149
|
|
|
@@ -831,8 +1151,9 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
831
1151
|
@pulumi.getter(name="memoryShares")
|
|
832
1152
|
def memory_shares(self) -> pulumi.Output[builtins.int]:
|
|
833
1153
|
"""
|
|
834
|
-
The number of shares allocated. Used to
|
|
835
|
-
|
|
1154
|
+
The number of shares allocated for CPU. Used to
|
|
1155
|
+
determine resource allocation in case of resource contention. If this is set,
|
|
1156
|
+
`memory_share_level` must be `custom`.
|
|
836
1157
|
"""
|
|
837
1158
|
return pulumi.get(self, "memory_shares")
|
|
838
1159
|
|
|
@@ -840,7 +1161,7 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
840
1161
|
@pulumi.getter
|
|
841
1162
|
def name(self) -> pulumi.Output[builtins.str]:
|
|
842
1163
|
"""
|
|
843
|
-
|
|
1164
|
+
The name of the resource pool.
|
|
844
1165
|
"""
|
|
845
1166
|
return pulumi.get(self, "name")
|
|
846
1167
|
|
|
@@ -848,7 +1169,11 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
848
1169
|
@pulumi.getter(name="parentResourcePoolId")
|
|
849
1170
|
def parent_resource_pool_id(self) -> pulumi.Output[builtins.str]:
|
|
850
1171
|
"""
|
|
851
|
-
The
|
|
1172
|
+
The managed object ID
|
|
1173
|
+
of the parent resource pool. This can be the root resource pool for a cluster
|
|
1174
|
+
or standalone host, or a resource pool itself. When moving a resource pool
|
|
1175
|
+
from one parent resource pool to another, both must share a common root
|
|
1176
|
+
resource pool.
|
|
852
1177
|
"""
|
|
853
1178
|
return pulumi.get(self, "parent_resource_pool_id")
|
|
854
1179
|
|
|
@@ -856,8 +1181,10 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
856
1181
|
@pulumi.getter(name="scaleDescendantsShares")
|
|
857
1182
|
def scale_descendants_shares(self) -> pulumi.Output[Optional[builtins.str]]:
|
|
858
1183
|
"""
|
|
859
|
-
Determines if the shares of all
|
|
860
|
-
pool are scaled up or down
|
|
1184
|
+
Determines if the shares of all
|
|
1185
|
+
descendants of the resource pool are scaled up or down when the shares
|
|
1186
|
+
of the resource pool are scaled up or down. Can be one of `disabled` or
|
|
1187
|
+
`scaleCpuAndMemoryShares`. Default: `disabled`.
|
|
861
1188
|
"""
|
|
862
1189
|
return pulumi.get(self, "scale_descendants_shares")
|
|
863
1190
|
|
|
@@ -865,7 +1192,7 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
865
1192
|
@pulumi.getter
|
|
866
1193
|
def tags(self) -> pulumi.Output[Optional[Sequence[builtins.str]]]:
|
|
867
1194
|
"""
|
|
868
|
-
|
|
1195
|
+
The IDs of any tags to attach to this resource.
|
|
869
1196
|
"""
|
|
870
1197
|
return pulumi.get(self, "tags")
|
|
871
1198
|
|