pulumi-vsphere 4.14.0a1745952392__py3-none-any.whl → 4.14.0a1747752163__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 -13
- pulumi_vsphere/compute_cluster_host_group.py +71 -3
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +1 -3
- pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +5 -3
- pulumi_vsphere/compute_cluster_vm_dependency_rule.py +5 -3
- pulumi_vsphere/compute_cluster_vm_group.py +5 -3
- pulumi_vsphere/compute_cluster_vm_host_rule.py +5 -3
- pulumi_vsphere/content_library.py +5 -3
- pulumi_vsphere/content_library_item.py +5 -3
- pulumi_vsphere/custom_attribute.py +5 -3
- pulumi_vsphere/datacenter.py +1 -3
- pulumi_vsphere/datastore_cluster.py +89 -3
- pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +5 -3
- pulumi_vsphere/distributed_port_group.py +5 -3
- pulumi_vsphere/distributed_virtual_switch.py +5 -3
- pulumi_vsphere/distributed_virtual_switch_pvlan_mapping.py +1 -3
- pulumi_vsphere/dpm_host_override.py +89 -3
- pulumi_vsphere/drs_vm_override.py +5 -3
- pulumi_vsphere/entity_permissions.py +1 -3
- pulumi_vsphere/file.py +35 -52
- pulumi_vsphere/folder.py +17 -15
- 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 -3
- pulumi_vsphere/ha_vm_override.py +5 -3
- pulumi_vsphere/host.py +61 -9
- pulumi_vsphere/host_port_group.py +1 -3
- pulumi_vsphere/host_virtual_switch.py +5 -3
- pulumi_vsphere/license.py +67 -29
- pulumi_vsphere/nas_datastore.py +63 -3
- pulumi_vsphere/offline_software_depot.py +5 -3
- pulumi_vsphere/outputs.py +33 -0
- pulumi_vsphere/provider.py +21 -3
- pulumi_vsphere/pulumi-plugin.json +1 -1
- pulumi_vsphere/resource_pool.py +490 -166
- pulumi_vsphere/role.py +1 -3
- pulumi_vsphere/storage_drs_vm_override.py +5 -3
- pulumi_vsphere/supervisor.py +3 -5
- pulumi_vsphere/tag.py +5 -3
- pulumi_vsphere/tag_category.py +5 -3
- pulumi_vsphere/vapp_container.py +5 -3
- pulumi_vsphere/vapp_entity.py +5 -3
- pulumi_vsphere/virtual_disk.py +5 -3
- pulumi_vsphere/virtual_machine.py +5 -7
- pulumi_vsphere/virtual_machine_class.py +5 -7
- pulumi_vsphere/virtual_machine_snapshot.py +1 -3
- pulumi_vsphere/vm_storage_policy.py +1 -3
- pulumi_vsphere/vmfs_datastore.py +5 -3
- pulumi_vsphere/vnic.py +1 -3
- {pulumi_vsphere-4.14.0a1745952392.dist-info → pulumi_vsphere-4.14.0a1747752163.dist-info}/METADATA +3 -3
- pulumi_vsphere-4.14.0a1747752163.dist-info/RECORD +87 -0
- {pulumi_vsphere-4.14.0a1745952392.dist-info → pulumi_vsphere-4.14.0a1747752163.dist-info}/WHEEL +1 -1
- pulumi_vsphere-4.14.0a1745952392.dist-info/RECORD +0 -87
- {pulumi_vsphere-4.14.0a1745952392.dist-info → pulumi_vsphere-4.14.0a1747752163.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,10 +628,8 @@ 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
|
-
|
|
553
|
-
pulumi_type = "vsphere:index/resourcePool:ResourcePool"
|
|
554
|
-
|
|
555
633
|
@overload
|
|
556
634
|
def __init__(__self__,
|
|
557
635
|
resource_name: str,
|
|
@@ -573,33 +651,146 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
573
651
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
|
|
574
652
|
__props__=None):
|
|
575
653
|
"""
|
|
576
|
-
|
|
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
|
+
|
|
577
748
|
:param str resource_name: The name of the resource.
|
|
578
749
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
579
|
-
:param pulumi.Input[builtins.bool] cpu_expandable: Determines if the reservation on a resource
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
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`.
|
|
588
766
|
:param pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]] custom_attributes: A list of custom attributes to set on this resource.
|
|
589
|
-
:param pulumi.Input[builtins.bool] memory_expandable: Determines if the reservation on a resource
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
: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.
|
|
603
794
|
"""
|
|
604
795
|
...
|
|
605
796
|
@overload
|
|
@@ -608,7 +799,100 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
608
799
|
args: ResourcePoolArgs,
|
|
609
800
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
610
801
|
"""
|
|
611
|
-
|
|
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
|
+
|
|
612
896
|
:param str resource_name: The name of the resource.
|
|
613
897
|
:param ResourcePoolArgs args: The arguments to use to populate this resource's properties.
|
|
614
898
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -697,30 +981,50 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
697
981
|
:param str resource_name: The unique name of the resulting resource.
|
|
698
982
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
699
983
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
700
|
-
:param pulumi.Input[builtins.bool] cpu_expandable: Determines if the reservation on a resource
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
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`.
|
|
709
1000
|
:param pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]] custom_attributes: A list of custom attributes to set on this resource.
|
|
710
|
-
:param pulumi.Input[builtins.bool] memory_expandable: Determines if the reservation on a resource
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
: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.
|
|
724
1028
|
"""
|
|
725
1029
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
726
1030
|
|
|
@@ -747,8 +1051,9 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
747
1051
|
@pulumi.getter(name="cpuExpandable")
|
|
748
1052
|
def cpu_expandable(self) -> pulumi.Output[Optional[builtins.bool]]:
|
|
749
1053
|
"""
|
|
750
|
-
Determines if the reservation on a resource
|
|
751
|
-
|
|
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`
|
|
752
1057
|
"""
|
|
753
1058
|
return pulumi.get(self, "cpu_expandable")
|
|
754
1059
|
|
|
@@ -756,8 +1061,9 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
756
1061
|
@pulumi.getter(name="cpuLimit")
|
|
757
1062
|
def cpu_limit(self) -> pulumi.Output[Optional[builtins.int]]:
|
|
758
1063
|
"""
|
|
759
|
-
The utilization of a resource pool will not
|
|
760
|
-
|
|
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`
|
|
761
1067
|
"""
|
|
762
1068
|
return pulumi.get(self, "cpu_limit")
|
|
763
1069
|
|
|
@@ -765,7 +1071,8 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
765
1071
|
@pulumi.getter(name="cpuReservation")
|
|
766
1072
|
def cpu_reservation(self) -> pulumi.Output[Optional[builtins.int]]:
|
|
767
1073
|
"""
|
|
768
|
-
Amount of CPU (MHz) that is guaranteed
|
|
1074
|
+
Amount of CPU (MHz) that is guaranteed
|
|
1075
|
+
available to the resource pool. Default: `0`
|
|
769
1076
|
"""
|
|
770
1077
|
return pulumi.get(self, "cpu_reservation")
|
|
771
1078
|
|
|
@@ -773,8 +1080,11 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
773
1080
|
@pulumi.getter(name="cpuShareLevel")
|
|
774
1081
|
def cpu_share_level(self) -> pulumi.Output[Optional[builtins.str]]:
|
|
775
1082
|
"""
|
|
776
|
-
The allocation level. The level is a
|
|
777
|
-
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`
|
|
778
1088
|
"""
|
|
779
1089
|
return pulumi.get(self, "cpu_share_level")
|
|
780
1090
|
|
|
@@ -782,8 +1092,9 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
782
1092
|
@pulumi.getter(name="cpuShares")
|
|
783
1093
|
def cpu_shares(self) -> pulumi.Output[builtins.int]:
|
|
784
1094
|
"""
|
|
785
|
-
The number of shares allocated. Used to
|
|
786
|
-
|
|
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`.
|
|
787
1098
|
"""
|
|
788
1099
|
return pulumi.get(self, "cpu_shares")
|
|
789
1100
|
|
|
@@ -799,8 +1110,9 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
799
1110
|
@pulumi.getter(name="memoryExpandable")
|
|
800
1111
|
def memory_expandable(self) -> pulumi.Output[Optional[builtins.bool]]:
|
|
801
1112
|
"""
|
|
802
|
-
Determines if the reservation on a resource
|
|
803
|
-
|
|
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`
|
|
804
1116
|
"""
|
|
805
1117
|
return pulumi.get(self, "memory_expandable")
|
|
806
1118
|
|
|
@@ -808,8 +1120,9 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
808
1120
|
@pulumi.getter(name="memoryLimit")
|
|
809
1121
|
def memory_limit(self) -> pulumi.Output[Optional[builtins.int]]:
|
|
810
1122
|
"""
|
|
811
|
-
The utilization of a resource pool will not
|
|
812
|
-
|
|
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`
|
|
813
1126
|
"""
|
|
814
1127
|
return pulumi.get(self, "memory_limit")
|
|
815
1128
|
|
|
@@ -817,7 +1130,8 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
817
1130
|
@pulumi.getter(name="memoryReservation")
|
|
818
1131
|
def memory_reservation(self) -> pulumi.Output[Optional[builtins.int]]:
|
|
819
1132
|
"""
|
|
820
|
-
Amount of
|
|
1133
|
+
Amount of CPU (MHz) that is guaranteed
|
|
1134
|
+
available to the resource pool. Default: `0`
|
|
821
1135
|
"""
|
|
822
1136
|
return pulumi.get(self, "memory_reservation")
|
|
823
1137
|
|
|
@@ -825,8 +1139,11 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
825
1139
|
@pulumi.getter(name="memoryShareLevel")
|
|
826
1140
|
def memory_share_level(self) -> pulumi.Output[Optional[builtins.str]]:
|
|
827
1141
|
"""
|
|
828
|
-
The allocation level. The level is a
|
|
829
|
-
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`
|
|
830
1147
|
"""
|
|
831
1148
|
return pulumi.get(self, "memory_share_level")
|
|
832
1149
|
|
|
@@ -834,8 +1151,9 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
834
1151
|
@pulumi.getter(name="memoryShares")
|
|
835
1152
|
def memory_shares(self) -> pulumi.Output[builtins.int]:
|
|
836
1153
|
"""
|
|
837
|
-
The number of shares allocated. Used to
|
|
838
|
-
|
|
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`.
|
|
839
1157
|
"""
|
|
840
1158
|
return pulumi.get(self, "memory_shares")
|
|
841
1159
|
|
|
@@ -843,7 +1161,7 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
843
1161
|
@pulumi.getter
|
|
844
1162
|
def name(self) -> pulumi.Output[builtins.str]:
|
|
845
1163
|
"""
|
|
846
|
-
|
|
1164
|
+
The name of the resource pool.
|
|
847
1165
|
"""
|
|
848
1166
|
return pulumi.get(self, "name")
|
|
849
1167
|
|
|
@@ -851,7 +1169,11 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
851
1169
|
@pulumi.getter(name="parentResourcePoolId")
|
|
852
1170
|
def parent_resource_pool_id(self) -> pulumi.Output[builtins.str]:
|
|
853
1171
|
"""
|
|
854
|
-
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.
|
|
855
1177
|
"""
|
|
856
1178
|
return pulumi.get(self, "parent_resource_pool_id")
|
|
857
1179
|
|
|
@@ -859,8 +1181,10 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
859
1181
|
@pulumi.getter(name="scaleDescendantsShares")
|
|
860
1182
|
def scale_descendants_shares(self) -> pulumi.Output[Optional[builtins.str]]:
|
|
861
1183
|
"""
|
|
862
|
-
Determines if the shares of all
|
|
863
|
-
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`.
|
|
864
1188
|
"""
|
|
865
1189
|
return pulumi.get(self, "scale_descendants_shares")
|
|
866
1190
|
|
|
@@ -868,7 +1192,7 @@ class ResourcePool(pulumi.CustomResource):
|
|
|
868
1192
|
@pulumi.getter
|
|
869
1193
|
def tags(self) -> pulumi.Output[Optional[Sequence[builtins.str]]]:
|
|
870
1194
|
"""
|
|
871
|
-
|
|
1195
|
+
The IDs of any tags to attach to this resource.
|
|
872
1196
|
"""
|
|
873
1197
|
return pulumi.get(self, "tags")
|
|
874
1198
|
|