pulumi-vsphere 4.11.5__py3-none-any.whl → 4.12.0a1725603256__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pulumi-vsphere might be problematic. Click here for more details.
- pulumi_vsphere/_inputs.py +5 -1066
- pulumi_vsphere/_utilities.py +1 -1
- pulumi_vsphere/compute_cluster.py +2 -181
- pulumi_vsphere/compute_cluster_host_group.py +2 -67
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +2 -29
- pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +2 -41
- pulumi_vsphere/compute_cluster_vm_dependency_rule.py +2 -205
- pulumi_vsphere/compute_cluster_vm_group.py +2 -198
- pulumi_vsphere/compute_cluster_vm_host_rule.py +2 -73
- pulumi_vsphere/config/__init__.pyi +0 -5
- pulumi_vsphere/config/vars.py +0 -5
- pulumi_vsphere/content_library.py +2 -103
- pulumi_vsphere/content_library_item.py +2 -143
- pulumi_vsphere/custom_attribute.py +2 -77
- pulumi_vsphere/datacenter.py +4 -19
- pulumi_vsphere/datastore_cluster.py +2 -63
- pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +2 -159
- pulumi_vsphere/distributed_port_group.py +2 -285
- pulumi_vsphere/distributed_virtual_switch.py +2 -261
- pulumi_vsphere/dpm_host_override.py +2 -63
- pulumi_vsphere/drs_vm_override.py +2 -67
- pulumi_vsphere/entity_permissions.py +0 -5
- pulumi_vsphere/file.py +0 -5
- pulumi_vsphere/folder.py +2 -141
- pulumi_vsphere/get_compute_cluster.py +4 -15
- pulumi_vsphere/get_compute_cluster_host_group.py +6 -17
- pulumi_vsphere/get_content_library.py +4 -12
- pulumi_vsphere/get_content_library_item.py +4 -16
- pulumi_vsphere/get_custom_attribute.py +4 -13
- pulumi_vsphere/get_datacenter.py +4 -12
- pulumi_vsphere/get_datastore.py +4 -16
- pulumi_vsphere/get_datastore_cluster.py +4 -14
- pulumi_vsphere/get_datastore_stats.py +4 -16
- pulumi_vsphere/get_distributed_virtual_switch.py +4 -15
- pulumi_vsphere/get_dynamic.py +4 -16
- pulumi_vsphere/get_folder.py +4 -12
- pulumi_vsphere/get_guest_os_customization.py +4 -17
- pulumi_vsphere/get_host.py +4 -15
- pulumi_vsphere/get_host_base_images.py +4 -11
- pulumi_vsphere/get_host_pci_device.py +4 -19
- pulumi_vsphere/get_host_thumbprint.py +14 -34
- pulumi_vsphere/get_host_vgpu_profile.py +4 -15
- pulumi_vsphere/get_license.py +4 -17
- pulumi_vsphere/get_network.py +4 -17
- pulumi_vsphere/get_ovf_vm_template.py +4 -55
- pulumi_vsphere/get_policy.py +4 -12
- pulumi_vsphere/get_resource_pool.py +4 -14
- pulumi_vsphere/get_role.py +4 -18
- pulumi_vsphere/get_tag.py +4 -15
- pulumi_vsphere/get_tag_category.py +4 -15
- pulumi_vsphere/get_vapp_container.py +4 -14
- pulumi_vsphere/get_virtual_machine.py +4 -130
- pulumi_vsphere/get_vmfs_disks.py +4 -17
- pulumi_vsphere/guest_os_customization.py +0 -5
- pulumi_vsphere/ha_vm_override.py +2 -163
- pulumi_vsphere/host.py +12 -203
- pulumi_vsphere/host_port_group.py +2 -17
- pulumi_vsphere/host_virtual_switch.py +2 -69
- pulumi_vsphere/license.py +0 -5
- pulumi_vsphere/nas_datastore.py +2 -67
- pulumi_vsphere/offline_software_depot.py +0 -5
- pulumi_vsphere/outputs.py +0 -5
- pulumi_vsphere/provider.py +0 -5
- pulumi_vsphere/pulumi-plugin.json +1 -1
- pulumi_vsphere/resource_pool.py +437 -168
- pulumi_vsphere/role.py +2 -33
- pulumi_vsphere/storage_drs_vm_override.py +2 -133
- pulumi_vsphere/supervisor.py +0 -5
- pulumi_vsphere/tag.py +2 -159
- pulumi_vsphere/tag_category.py +2 -83
- pulumi_vsphere/vapp_container.py +2 -163
- pulumi_vsphere/vapp_entity.py +2 -147
- pulumi_vsphere/virtual_disk.py +2 -81
- pulumi_vsphere/virtual_machine.py +2 -53
- pulumi_vsphere/virtual_machine_class.py +0 -5
- pulumi_vsphere/virtual_machine_snapshot.py +0 -5
- pulumi_vsphere/vm_storage_policy.py +0 -5
- pulumi_vsphere/vmfs_datastore.py +2 -271
- pulumi_vsphere/vnic.py +4 -19
- {pulumi_vsphere-4.11.5.dist-info → pulumi_vsphere-4.12.0a1725603256.dist-info}/METADATA +2 -3
- pulumi_vsphere-4.12.0a1725603256.dist-info/RECORD +86 -0
- {pulumi_vsphere-4.11.5.dist-info → pulumi_vsphere-4.12.0a1725603256.dist-info}/WHEEL +1 -1
- pulumi_vsphere-4.11.5.dist-info/RECORD +0 -86
- {pulumi_vsphere-4.11.5.dist-info → pulumi_vsphere-4.12.0a1725603256.dist-info}/top_level.txt +0 -0
|
@@ -4,14 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
-
import sys
|
|
8
7
|
import pulumi
|
|
9
8
|
import pulumi.runtime
|
|
10
9
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
-
if sys.version_info >= (3, 11):
|
|
12
|
-
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
-
else:
|
|
14
|
-
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
15
10
|
from . import _utilities
|
|
16
11
|
|
|
17
12
|
__all__ = ['ContentLibraryItemArgs', 'ContentLibraryItem']
|
|
@@ -240,75 +235,7 @@ class ContentLibraryItem(pulumi.CustomResource):
|
|
|
240
235
|
type: Optional[pulumi.Input[str]] = None,
|
|
241
236
|
__props__=None):
|
|
242
237
|
"""
|
|
243
|
-
|
|
244
|
-
vSphere content library. The `file_url` must be accessible from the vSphere
|
|
245
|
-
environment as it will be downloaded from the specified location and stored
|
|
246
|
-
on the content library's storage backing.
|
|
247
|
-
|
|
248
|
-
## Example Usage
|
|
249
|
-
|
|
250
|
-
The first example below imports an OVF Template to a content
|
|
251
|
-
library.
|
|
252
|
-
|
|
253
|
-
```python
|
|
254
|
-
import pulumi
|
|
255
|
-
import pulumi_vsphere as vsphere
|
|
256
|
-
|
|
257
|
-
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
258
|
-
content_library = vsphere.get_content_library(name="clb-01")
|
|
259
|
-
content_library_item = vsphere.ContentLibraryItem("content_library_item",
|
|
260
|
-
name="ovf-linux-ubuntu-server-lts",
|
|
261
|
-
description="Ubuntu Server LTS OVF Template",
|
|
262
|
-
file_url="https://releases.example.com/ubuntu/ubuntu/ubuntu-live-server-amd64.ovf",
|
|
263
|
-
library_id=content_library.id)
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
The next example imports an .iso image to a content library.
|
|
267
|
-
|
|
268
|
-
[tf-vsphere-vm-resource]: /docs/providers/vsphere/r/virtual_machine.html
|
|
269
|
-
|
|
270
|
-
```python
|
|
271
|
-
import pulumi
|
|
272
|
-
import pulumi_vsphere as vsphere
|
|
273
|
-
|
|
274
|
-
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
275
|
-
content_library = vsphere.get_content_library(name="clb-01")
|
|
276
|
-
content_library_item = vsphere.ContentLibraryItem("content_library_item",
|
|
277
|
-
name="iso-linux-ubuntu-server-lts",
|
|
278
|
-
description="Ubuntu Server LTS .iso",
|
|
279
|
-
type="iso",
|
|
280
|
-
file_url="https://releases.example.com/ubuntu/ubuntu-live-server-amd64.iso",
|
|
281
|
-
library_id=content_library.id)
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
The last example imports a virtual machine image to a content library from an
|
|
285
|
-
existing virtual machine.
|
|
286
|
-
|
|
287
|
-
[tf-vsphere-vm-resource]: /docs/providers/vsphere/r/virtual_machine.html
|
|
288
|
-
|
|
289
|
-
```python
|
|
290
|
-
import pulumi
|
|
291
|
-
import pulumi_vsphere as vsphere
|
|
292
|
-
|
|
293
|
-
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
294
|
-
content_library = vsphere.get_content_library(name="clb-01")
|
|
295
|
-
content_library_item = vsphere.ContentLibraryItem("content_library_item",
|
|
296
|
-
name="tpl-linux-ubuntu-server-lts",
|
|
297
|
-
description="Ubuntu Server LTS",
|
|
298
|
-
source_uuid="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
|
299
|
-
library_id=content_library.id)
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
## Import
|
|
303
|
-
|
|
304
|
-
An existing content library item can be imported into this resource by
|
|
305
|
-
|
|
306
|
-
supplying the content library ID. An example is below:
|
|
307
|
-
|
|
308
|
-
```sh
|
|
309
|
-
$ pulumi import vsphere:index/contentLibraryItem:ContentLibraryItem vsphere_content_library_item iso-linux-ubuntu-server-lts xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
|
310
|
-
```
|
|
311
|
-
|
|
238
|
+
Create a ContentLibraryItem resource with the given unique name, props, and options.
|
|
312
239
|
:param str resource_name: The name of the resource.
|
|
313
240
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
314
241
|
:param pulumi.Input[str] description: A description for the content library item.
|
|
@@ -326,75 +253,7 @@ class ContentLibraryItem(pulumi.CustomResource):
|
|
|
326
253
|
args: ContentLibraryItemArgs,
|
|
327
254
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
328
255
|
"""
|
|
329
|
-
|
|
330
|
-
vSphere content library. The `file_url` must be accessible from the vSphere
|
|
331
|
-
environment as it will be downloaded from the specified location and stored
|
|
332
|
-
on the content library's storage backing.
|
|
333
|
-
|
|
334
|
-
## Example Usage
|
|
335
|
-
|
|
336
|
-
The first example below imports an OVF Template to a content
|
|
337
|
-
library.
|
|
338
|
-
|
|
339
|
-
```python
|
|
340
|
-
import pulumi
|
|
341
|
-
import pulumi_vsphere as vsphere
|
|
342
|
-
|
|
343
|
-
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
344
|
-
content_library = vsphere.get_content_library(name="clb-01")
|
|
345
|
-
content_library_item = vsphere.ContentLibraryItem("content_library_item",
|
|
346
|
-
name="ovf-linux-ubuntu-server-lts",
|
|
347
|
-
description="Ubuntu Server LTS OVF Template",
|
|
348
|
-
file_url="https://releases.example.com/ubuntu/ubuntu/ubuntu-live-server-amd64.ovf",
|
|
349
|
-
library_id=content_library.id)
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
The next example imports an .iso image to a content library.
|
|
353
|
-
|
|
354
|
-
[tf-vsphere-vm-resource]: /docs/providers/vsphere/r/virtual_machine.html
|
|
355
|
-
|
|
356
|
-
```python
|
|
357
|
-
import pulumi
|
|
358
|
-
import pulumi_vsphere as vsphere
|
|
359
|
-
|
|
360
|
-
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
361
|
-
content_library = vsphere.get_content_library(name="clb-01")
|
|
362
|
-
content_library_item = vsphere.ContentLibraryItem("content_library_item",
|
|
363
|
-
name="iso-linux-ubuntu-server-lts",
|
|
364
|
-
description="Ubuntu Server LTS .iso",
|
|
365
|
-
type="iso",
|
|
366
|
-
file_url="https://releases.example.com/ubuntu/ubuntu-live-server-amd64.iso",
|
|
367
|
-
library_id=content_library.id)
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
The last example imports a virtual machine image to a content library from an
|
|
371
|
-
existing virtual machine.
|
|
372
|
-
|
|
373
|
-
[tf-vsphere-vm-resource]: /docs/providers/vsphere/r/virtual_machine.html
|
|
374
|
-
|
|
375
|
-
```python
|
|
376
|
-
import pulumi
|
|
377
|
-
import pulumi_vsphere as vsphere
|
|
378
|
-
|
|
379
|
-
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
380
|
-
content_library = vsphere.get_content_library(name="clb-01")
|
|
381
|
-
content_library_item = vsphere.ContentLibraryItem("content_library_item",
|
|
382
|
-
name="tpl-linux-ubuntu-server-lts",
|
|
383
|
-
description="Ubuntu Server LTS",
|
|
384
|
-
source_uuid="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
|
385
|
-
library_id=content_library.id)
|
|
386
|
-
```
|
|
387
|
-
|
|
388
|
-
## Import
|
|
389
|
-
|
|
390
|
-
An existing content library item can be imported into this resource by
|
|
391
|
-
|
|
392
|
-
supplying the content library ID. An example is below:
|
|
393
|
-
|
|
394
|
-
```sh
|
|
395
|
-
$ pulumi import vsphere:index/contentLibraryItem:ContentLibraryItem vsphere_content_library_item iso-linux-ubuntu-server-lts xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
|
396
|
-
```
|
|
397
|
-
|
|
256
|
+
Create a ContentLibraryItem resource with the given unique name, props, and options.
|
|
398
257
|
:param str resource_name: The name of the resource.
|
|
399
258
|
:param ContentLibraryItemArgs args: The arguments to use to populate this resource's properties.
|
|
400
259
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -4,14 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
-
import sys
|
|
8
7
|
import pulumi
|
|
9
8
|
import pulumi.runtime
|
|
10
9
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
-
if sys.version_info >= (3, 11):
|
|
12
|
-
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
-
else:
|
|
14
|
-
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
15
10
|
from . import _utilities
|
|
16
11
|
|
|
17
12
|
__all__ = ['CustomAttributeArgs', 'CustomAttribute']
|
|
@@ -113,42 +108,7 @@ class CustomAttribute(pulumi.CustomResource):
|
|
|
113
108
|
name: Optional[pulumi.Input[str]] = None,
|
|
114
109
|
__props__=None):
|
|
115
110
|
"""
|
|
116
|
-
|
|
117
|
-
attributes, which allow users to associate user-specific meta-information with
|
|
118
|
-
vSphere managed objects. Custom attribute values must be strings and are stored
|
|
119
|
-
on the vCenter Server and not the managed object.
|
|
120
|
-
|
|
121
|
-
For more information about custom attributes, click [here][ext-custom-attributes].
|
|
122
|
-
|
|
123
|
-
[ext-custom-attributes]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-73606C4C-763C-4E27-A1DA-032E4C46219D.html
|
|
124
|
-
|
|
125
|
-
> **NOTE:** Custom attributes are unsupported on direct ESXi host connections
|
|
126
|
-
and require vCenter Server.
|
|
127
|
-
|
|
128
|
-
## Example Usage
|
|
129
|
-
|
|
130
|
-
This example creates a custom attribute named `test-attribute`. The
|
|
131
|
-
resulting custom attribute can be assigned to VMs only.
|
|
132
|
-
|
|
133
|
-
```python
|
|
134
|
-
import pulumi
|
|
135
|
-
import pulumi_vsphere as vsphere
|
|
136
|
-
|
|
137
|
-
attribute = vsphere.CustomAttribute("attribute",
|
|
138
|
-
name="test-attribute",
|
|
139
|
-
managed_object_type="VirtualMachine")
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
## Import
|
|
143
|
-
|
|
144
|
-
An existing custom attribute can be imported into this resource
|
|
145
|
-
|
|
146
|
-
via its name, using the following command:
|
|
147
|
-
|
|
148
|
-
```sh
|
|
149
|
-
$ pulumi import vsphere:index/customAttribute:CustomAttribute attribute terraform-test-attribute
|
|
150
|
-
```
|
|
151
|
-
|
|
111
|
+
Create a CustomAttribute resource with the given unique name, props, and options.
|
|
152
112
|
:param str resource_name: The name of the resource.
|
|
153
113
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
154
114
|
:param pulumi.Input[str] managed_object_type: The object type that this attribute may be
|
|
@@ -163,42 +123,7 @@ class CustomAttribute(pulumi.CustomResource):
|
|
|
163
123
|
args: Optional[CustomAttributeArgs] = None,
|
|
164
124
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
165
125
|
"""
|
|
166
|
-
|
|
167
|
-
attributes, which allow users to associate user-specific meta-information with
|
|
168
|
-
vSphere managed objects. Custom attribute values must be strings and are stored
|
|
169
|
-
on the vCenter Server and not the managed object.
|
|
170
|
-
|
|
171
|
-
For more information about custom attributes, click [here][ext-custom-attributes].
|
|
172
|
-
|
|
173
|
-
[ext-custom-attributes]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-73606C4C-763C-4E27-A1DA-032E4C46219D.html
|
|
174
|
-
|
|
175
|
-
> **NOTE:** Custom attributes are unsupported on direct ESXi host connections
|
|
176
|
-
and require vCenter Server.
|
|
177
|
-
|
|
178
|
-
## Example Usage
|
|
179
|
-
|
|
180
|
-
This example creates a custom attribute named `test-attribute`. The
|
|
181
|
-
resulting custom attribute can be assigned to VMs only.
|
|
182
|
-
|
|
183
|
-
```python
|
|
184
|
-
import pulumi
|
|
185
|
-
import pulumi_vsphere as vsphere
|
|
186
|
-
|
|
187
|
-
attribute = vsphere.CustomAttribute("attribute",
|
|
188
|
-
name="test-attribute",
|
|
189
|
-
managed_object_type="VirtualMachine")
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
## Import
|
|
193
|
-
|
|
194
|
-
An existing custom attribute can be imported into this resource
|
|
195
|
-
|
|
196
|
-
via its name, using the following command:
|
|
197
|
-
|
|
198
|
-
```sh
|
|
199
|
-
$ pulumi import vsphere:index/customAttribute:CustomAttribute attribute terraform-test-attribute
|
|
200
|
-
```
|
|
201
|
-
|
|
126
|
+
Create a CustomAttribute resource with the given unique name, props, and options.
|
|
202
127
|
:param str resource_name: The name of the resource.
|
|
203
128
|
:param CustomAttributeArgs args: The arguments to use to populate this resource's properties.
|
|
204
129
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
pulumi_vsphere/datacenter.py
CHANGED
|
@@ -4,14 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
-
import sys
|
|
8
7
|
import pulumi
|
|
9
8
|
import pulumi.runtime
|
|
10
9
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
-
if sys.version_info >= (3, 11):
|
|
12
|
-
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
-
else:
|
|
14
|
-
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
15
10
|
from . import _utilities
|
|
16
11
|
|
|
17
12
|
__all__ = ['DatacenterArgs', 'Datacenter']
|
|
@@ -252,18 +247,13 @@ class Datacenter(pulumi.CustomResource):
|
|
|
252
247
|
folder="/research/")
|
|
253
248
|
```
|
|
254
249
|
|
|
255
|
-
##
|
|
256
|
-
|
|
257
|
-
An existing datacenter can be imported into this resource
|
|
250
|
+
## Importing
|
|
258
251
|
|
|
252
|
+
An existing datacenter can be [imported][docs-import] into this resource
|
|
259
253
|
via supplying the full path to the datacenter. An example is below:
|
|
260
254
|
|
|
261
255
|
[docs-import]: /docs/import/index.html
|
|
262
256
|
|
|
263
|
-
```sh
|
|
264
|
-
$ pulumi import vsphere:index/datacenter:Datacenter dc /dc1
|
|
265
|
-
```
|
|
266
|
-
|
|
267
257
|
The above would import the datacenter named `dc1`.
|
|
268
258
|
|
|
269
259
|
:param str resource_name: The name of the resource.
|
|
@@ -315,18 +305,13 @@ class Datacenter(pulumi.CustomResource):
|
|
|
315
305
|
folder="/research/")
|
|
316
306
|
```
|
|
317
307
|
|
|
318
|
-
##
|
|
319
|
-
|
|
320
|
-
An existing datacenter can be imported into this resource
|
|
308
|
+
## Importing
|
|
321
309
|
|
|
310
|
+
An existing datacenter can be [imported][docs-import] into this resource
|
|
322
311
|
via supplying the full path to the datacenter. An example is below:
|
|
323
312
|
|
|
324
313
|
[docs-import]: /docs/import/index.html
|
|
325
314
|
|
|
326
|
-
```sh
|
|
327
|
-
$ pulumi import vsphere:index/datacenter:Datacenter dc /dc1
|
|
328
|
-
```
|
|
329
|
-
|
|
330
315
|
The above would import the datacenter named `dc1`.
|
|
331
316
|
|
|
332
317
|
:param str resource_name: The name of the resource.
|
|
@@ -4,14 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
-
import sys
|
|
8
7
|
import pulumi
|
|
9
8
|
import pulumi.runtime
|
|
10
9
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
-
if sys.version_info >= (3, 11):
|
|
12
|
-
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
-
else:
|
|
14
|
-
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
15
10
|
from . import _utilities
|
|
16
11
|
|
|
17
12
|
__all__ = ['DatastoreClusterArgs', 'DatastoreCluster']
|
|
@@ -951,35 +946,7 @@ class DatastoreCluster(pulumi.CustomResource):
|
|
|
951
946
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
952
947
|
__props__=None):
|
|
953
948
|
"""
|
|
954
|
-
|
|
955
|
-
datastore clusters. This can be used to create groups of datastores with a
|
|
956
|
-
shared management interface, allowing for resource control and load balancing
|
|
957
|
-
through Storage DRS.
|
|
958
|
-
|
|
959
|
-
For more information on vSphere datastore clusters and Storage DRS, see [this
|
|
960
|
-
page][ref-vsphere-datastore-clusters].
|
|
961
|
-
|
|
962
|
-
[ref-vsphere-datastore-clusters]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-598DF695-107E-406B-9C95-0AF961FC227A.html
|
|
963
|
-
|
|
964
|
-
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
965
|
-
connections.
|
|
966
|
-
|
|
967
|
-
> **NOTE:** Storage DRS requires a vSphere Enterprise Plus license.
|
|
968
|
-
|
|
969
|
-
## Import
|
|
970
|
-
|
|
971
|
-
An existing datastore cluster can be imported into this resource
|
|
972
|
-
|
|
973
|
-
via the path to the cluster, via the following command:
|
|
974
|
-
|
|
975
|
-
```sh
|
|
976
|
-
$ pulumi import vsphere:index/datastoreCluster:DatastoreCluster datastore_cluster /dc1/datastore/ds-cluster
|
|
977
|
-
```
|
|
978
|
-
|
|
979
|
-
The above would import the datastore cluster named `ds-cluster` that is located
|
|
980
|
-
|
|
981
|
-
in the `dc1` datacenter.
|
|
982
|
-
|
|
949
|
+
Create a DatastoreCluster resource with the given unique name, props, and options.
|
|
983
950
|
:param str resource_name: The name of the resource.
|
|
984
951
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
985
952
|
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: A map of custom attribute ids to attribute
|
|
@@ -1037,35 +1004,7 @@ class DatastoreCluster(pulumi.CustomResource):
|
|
|
1037
1004
|
args: DatastoreClusterArgs,
|
|
1038
1005
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
1039
1006
|
"""
|
|
1040
|
-
|
|
1041
|
-
datastore clusters. This can be used to create groups of datastores with a
|
|
1042
|
-
shared management interface, allowing for resource control and load balancing
|
|
1043
|
-
through Storage DRS.
|
|
1044
|
-
|
|
1045
|
-
For more information on vSphere datastore clusters and Storage DRS, see [this
|
|
1046
|
-
page][ref-vsphere-datastore-clusters].
|
|
1047
|
-
|
|
1048
|
-
[ref-vsphere-datastore-clusters]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-598DF695-107E-406B-9C95-0AF961FC227A.html
|
|
1049
|
-
|
|
1050
|
-
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
1051
|
-
connections.
|
|
1052
|
-
|
|
1053
|
-
> **NOTE:** Storage DRS requires a vSphere Enterprise Plus license.
|
|
1054
|
-
|
|
1055
|
-
## Import
|
|
1056
|
-
|
|
1057
|
-
An existing datastore cluster can be imported into this resource
|
|
1058
|
-
|
|
1059
|
-
via the path to the cluster, via the following command:
|
|
1060
|
-
|
|
1061
|
-
```sh
|
|
1062
|
-
$ pulumi import vsphere:index/datastoreCluster:DatastoreCluster datastore_cluster /dc1/datastore/ds-cluster
|
|
1063
|
-
```
|
|
1064
|
-
|
|
1065
|
-
The above would import the datastore cluster named `ds-cluster` that is located
|
|
1066
|
-
|
|
1067
|
-
in the `dc1` datacenter.
|
|
1068
|
-
|
|
1007
|
+
Create a DatastoreCluster resource with the given unique name, props, and options.
|
|
1069
1008
|
:param str resource_name: The name of the resource.
|
|
1070
1009
|
:param DatastoreClusterArgs args: The arguments to use to populate this resource's properties.
|
|
1071
1010
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -4,14 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
-
import sys
|
|
8
7
|
import pulumi
|
|
9
8
|
import pulumi.runtime
|
|
10
9
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
-
if sys.version_info >= (3, 11):
|
|
12
|
-
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
-
else:
|
|
14
|
-
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
15
10
|
from . import _utilities
|
|
16
11
|
|
|
17
12
|
__all__ = ['DatastoreClusterVmAntiAffinityRuleArgs', 'DatastoreClusterVmAntiAffinityRule']
|
|
@@ -226,83 +221,7 @@ class DatastoreClusterVmAntiAffinityRule(pulumi.CustomResource):
|
|
|
226
221
|
virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
227
222
|
__props__=None):
|
|
228
223
|
"""
|
|
229
|
-
|
|
230
|
-
manage VM anti-affinity rules in a datastore cluster, either created by the
|
|
231
|
-
`DatastoreCluster` resource or looked up
|
|
232
|
-
by the `DatastoreCluster` data source.
|
|
233
|
-
|
|
234
|
-
This rule can be used to tell a set to virtual machines to run on different
|
|
235
|
-
datastores within a cluster, useful for preventing single points of failure in
|
|
236
|
-
application cluster scenarios. When configured, Storage DRS will make a best effort to
|
|
237
|
-
ensure that the virtual machines run on different datastores, or prevent any
|
|
238
|
-
operation that would keep that from happening, depending on the value of the
|
|
239
|
-
`mandatory` flag.
|
|
240
|
-
|
|
241
|
-
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
242
|
-
connections.
|
|
243
|
-
|
|
244
|
-
> **NOTE:** Storage DRS requires a vSphere Enterprise Plus license.
|
|
245
|
-
|
|
246
|
-
## Example Usage
|
|
247
|
-
|
|
248
|
-
The example below creates two virtual machines in a cluster using the
|
|
249
|
-
`VirtualMachine` resource, creating the
|
|
250
|
-
virtual machines in the datastore cluster looked up by the
|
|
251
|
-
`DatastoreCluster` data
|
|
252
|
-
source. It then creates an anti-affinity rule for these two virtual machines,
|
|
253
|
-
ensuring they will run on different datastores whenever possible.
|
|
254
|
-
|
|
255
|
-
```python
|
|
256
|
-
import pulumi
|
|
257
|
-
import pulumi_vsphere as vsphere
|
|
258
|
-
|
|
259
|
-
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
260
|
-
datastore_cluster = vsphere.get_datastore_cluster(name="datastore-cluster1",
|
|
261
|
-
datacenter_id=datacenter.id)
|
|
262
|
-
cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
263
|
-
datacenter_id=datacenter.id)
|
|
264
|
-
network = vsphere.get_network(name="network1",
|
|
265
|
-
datacenter_id=datacenter.id)
|
|
266
|
-
vm = []
|
|
267
|
-
for range in [{"value": i} for i in range(0, 2)]:
|
|
268
|
-
vm.append(vsphere.VirtualMachine(f"vm-{range['value']}",
|
|
269
|
-
name=f"test-{range['value']}",
|
|
270
|
-
resource_pool_id=cluster.resource_pool_id,
|
|
271
|
-
datastore_cluster_id=datastore_cluster.id,
|
|
272
|
-
num_cpus=2,
|
|
273
|
-
memory=2048,
|
|
274
|
-
guest_id="otherLinux64Guest",
|
|
275
|
-
network_interfaces=[{
|
|
276
|
-
"network_id": network.id,
|
|
277
|
-
}],
|
|
278
|
-
disks=[{
|
|
279
|
-
"label": "disk0",
|
|
280
|
-
"size": 20,
|
|
281
|
-
}]))
|
|
282
|
-
cluster_vm_anti_affinity_rule = vsphere.DatastoreClusterVmAntiAffinityRule("cluster_vm_anti_affinity_rule",
|
|
283
|
-
name="test-datastore-cluster-vm-anti-affinity-rule",
|
|
284
|
-
datastore_cluster_id=datastore_cluster.id,
|
|
285
|
-
virtual_machine_ids=[[__item.id for __item in vm]])
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
## Import
|
|
289
|
-
|
|
290
|
-
An existing rule can be imported into this resource by supplying
|
|
291
|
-
|
|
292
|
-
both the path to the cluster, and the name the rule. If the name or cluster is
|
|
293
|
-
|
|
294
|
-
not found, or if the rule is of a different type, an error will be returned. An
|
|
295
|
-
|
|
296
|
-
example is below:
|
|
297
|
-
|
|
298
|
-
```sh
|
|
299
|
-
$ pulumi import vsphere:index/datastoreClusterVmAntiAffinityRule:DatastoreClusterVmAntiAffinityRule cluster_vm_anti_affinity_rule \\
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
'{"compute_cluster_path": "/dc1/datastore/cluster1", \\
|
|
303
|
-
|
|
304
|
-
"name": "pulumi-test-datastore-cluster-vm-anti-affinity-rule"}'
|
|
305
|
-
|
|
224
|
+
Create a DatastoreClusterVmAntiAffinityRule resource with the given unique name, props, and options.
|
|
306
225
|
:param str resource_name: The name of the resource.
|
|
307
226
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
308
227
|
:param pulumi.Input[str] datastore_cluster_id: The managed object reference
|
|
@@ -324,83 +243,7 @@ class DatastoreClusterVmAntiAffinityRule(pulumi.CustomResource):
|
|
|
324
243
|
args: DatastoreClusterVmAntiAffinityRuleArgs,
|
|
325
244
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
326
245
|
"""
|
|
327
|
-
|
|
328
|
-
manage VM anti-affinity rules in a datastore cluster, either created by the
|
|
329
|
-
`DatastoreCluster` resource or looked up
|
|
330
|
-
by the `DatastoreCluster` data source.
|
|
331
|
-
|
|
332
|
-
This rule can be used to tell a set to virtual machines to run on different
|
|
333
|
-
datastores within a cluster, useful for preventing single points of failure in
|
|
334
|
-
application cluster scenarios. When configured, Storage DRS will make a best effort to
|
|
335
|
-
ensure that the virtual machines run on different datastores, or prevent any
|
|
336
|
-
operation that would keep that from happening, depending on the value of the
|
|
337
|
-
`mandatory` flag.
|
|
338
|
-
|
|
339
|
-
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
340
|
-
connections.
|
|
341
|
-
|
|
342
|
-
> **NOTE:** Storage DRS requires a vSphere Enterprise Plus license.
|
|
343
|
-
|
|
344
|
-
## Example Usage
|
|
345
|
-
|
|
346
|
-
The example below creates two virtual machines in a cluster using the
|
|
347
|
-
`VirtualMachine` resource, creating the
|
|
348
|
-
virtual machines in the datastore cluster looked up by the
|
|
349
|
-
`DatastoreCluster` data
|
|
350
|
-
source. It then creates an anti-affinity rule for these two virtual machines,
|
|
351
|
-
ensuring they will run on different datastores whenever possible.
|
|
352
|
-
|
|
353
|
-
```python
|
|
354
|
-
import pulumi
|
|
355
|
-
import pulumi_vsphere as vsphere
|
|
356
|
-
|
|
357
|
-
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
358
|
-
datastore_cluster = vsphere.get_datastore_cluster(name="datastore-cluster1",
|
|
359
|
-
datacenter_id=datacenter.id)
|
|
360
|
-
cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
361
|
-
datacenter_id=datacenter.id)
|
|
362
|
-
network = vsphere.get_network(name="network1",
|
|
363
|
-
datacenter_id=datacenter.id)
|
|
364
|
-
vm = []
|
|
365
|
-
for range in [{"value": i} for i in range(0, 2)]:
|
|
366
|
-
vm.append(vsphere.VirtualMachine(f"vm-{range['value']}",
|
|
367
|
-
name=f"test-{range['value']}",
|
|
368
|
-
resource_pool_id=cluster.resource_pool_id,
|
|
369
|
-
datastore_cluster_id=datastore_cluster.id,
|
|
370
|
-
num_cpus=2,
|
|
371
|
-
memory=2048,
|
|
372
|
-
guest_id="otherLinux64Guest",
|
|
373
|
-
network_interfaces=[{
|
|
374
|
-
"network_id": network.id,
|
|
375
|
-
}],
|
|
376
|
-
disks=[{
|
|
377
|
-
"label": "disk0",
|
|
378
|
-
"size": 20,
|
|
379
|
-
}]))
|
|
380
|
-
cluster_vm_anti_affinity_rule = vsphere.DatastoreClusterVmAntiAffinityRule("cluster_vm_anti_affinity_rule",
|
|
381
|
-
name="test-datastore-cluster-vm-anti-affinity-rule",
|
|
382
|
-
datastore_cluster_id=datastore_cluster.id,
|
|
383
|
-
virtual_machine_ids=[[__item.id for __item in vm]])
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
## Import
|
|
387
|
-
|
|
388
|
-
An existing rule can be imported into this resource by supplying
|
|
389
|
-
|
|
390
|
-
both the path to the cluster, and the name the rule. If the name or cluster is
|
|
391
|
-
|
|
392
|
-
not found, or if the rule is of a different type, an error will be returned. An
|
|
393
|
-
|
|
394
|
-
example is below:
|
|
395
|
-
|
|
396
|
-
```sh
|
|
397
|
-
$ pulumi import vsphere:index/datastoreClusterVmAntiAffinityRule:DatastoreClusterVmAntiAffinityRule cluster_vm_anti_affinity_rule \\
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
'{"compute_cluster_path": "/dc1/datastore/cluster1", \\
|
|
401
|
-
|
|
402
|
-
"name": "pulumi-test-datastore-cluster-vm-anti-affinity-rule"}'
|
|
403
|
-
|
|
246
|
+
Create a DatastoreClusterVmAntiAffinityRule resource with the given unique name, props, and options.
|
|
404
247
|
:param str resource_name: The name of the resource.
|
|
405
248
|
:param DatastoreClusterVmAntiAffinityRuleArgs args: The arguments to use to populate this resource's properties.
|
|
406
249
|
:param pulumi.ResourceOptions opts: Options for the resource.
|