pulumi-vsphere 4.10.0a1710160860__py3-none-any.whl → 4.13.0a1736836157__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pulumi-vsphere might be problematic. Click here for more details.
- pulumi_vsphere/__init__.py +30 -0
- pulumi_vsphere/_inputs.py +1816 -277
- pulumi_vsphere/_utilities.py +41 -5
- pulumi_vsphere/compute_cluster.py +937 -1488
- pulumi_vsphere/compute_cluster_host_group.py +67 -2
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +69 -34
- pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +41 -2
- pulumi_vsphere/compute_cluster_vm_dependency_rule.py +205 -2
- pulumi_vsphere/compute_cluster_vm_group.py +198 -2
- pulumi_vsphere/compute_cluster_vm_host_rule.py +73 -2
- pulumi_vsphere/config/__init__.pyi +5 -0
- pulumi_vsphere/config/vars.py +5 -0
- pulumi_vsphere/content_library.py +113 -12
- pulumi_vsphere/content_library_item.py +143 -2
- pulumi_vsphere/custom_attribute.py +77 -2
- pulumi_vsphere/datacenter.py +48 -40
- pulumi_vsphere/datastore_cluster.py +217 -366
- pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +159 -2
- pulumi_vsphere/distributed_port_group.py +416 -189
- pulumi_vsphere/distributed_virtual_switch.py +571 -830
- pulumi_vsphere/dpm_host_override.py +63 -2
- pulumi_vsphere/drs_vm_override.py +67 -2
- pulumi_vsphere/entity_permissions.py +64 -38
- pulumi_vsphere/file.py +21 -24
- pulumi_vsphere/folder.py +148 -30
- pulumi_vsphere/get_compute_cluster.py +16 -9
- pulumi_vsphere/get_compute_cluster_host_group.py +36 -25
- pulumi_vsphere/get_content_library.py +23 -15
- pulumi_vsphere/get_content_library_item.py +29 -13
- pulumi_vsphere/get_custom_attribute.py +14 -9
- pulumi_vsphere/get_datacenter.py +30 -12
- pulumi_vsphere/get_datastore.py +44 -12
- pulumi_vsphere/get_datastore_cluster.py +31 -10
- pulumi_vsphere/get_datastore_stats.py +208 -0
- pulumi_vsphere/get_distributed_virtual_switch.py +18 -9
- pulumi_vsphere/get_dynamic.py +35 -25
- pulumi_vsphere/get_folder.py +23 -11
- pulumi_vsphere/get_guest_os_customization.py +26 -52
- pulumi_vsphere/get_host.py +16 -9
- pulumi_vsphere/get_host_base_images.py +104 -0
- pulumi_vsphere/get_host_pci_device.py +28 -19
- pulumi_vsphere/get_host_thumbprint.py +41 -25
- pulumi_vsphere/get_host_vgpu_profile.py +195 -0
- pulumi_vsphere/get_license.py +20 -10
- pulumi_vsphere/get_network.py +80 -24
- pulumi_vsphere/get_ovf_vm_template.py +56 -5
- pulumi_vsphere/get_policy.py +13 -9
- pulumi_vsphere/get_resource_pool.py +29 -23
- pulumi_vsphere/get_role.py +23 -13
- pulumi_vsphere/get_tag.py +16 -9
- pulumi_vsphere/get_tag_category.py +16 -9
- pulumi_vsphere/get_vapp_container.py +15 -9
- pulumi_vsphere/get_virtual_machine.py +233 -48
- pulumi_vsphere/get_vmfs_disks.py +18 -9
- pulumi_vsphere/guest_os_customization.py +60 -5
- pulumi_vsphere/ha_vm_override.py +352 -380
- pulumi_vsphere/host.py +244 -64
- pulumi_vsphere/host_port_group.py +27 -24
- pulumi_vsphere/host_virtual_switch.py +209 -289
- pulumi_vsphere/license.py +5 -32
- pulumi_vsphere/nas_datastore.py +74 -9
- pulumi_vsphere/offline_software_depot.py +185 -0
- pulumi_vsphere/outputs.py +774 -256
- pulumi_vsphere/provider.py +7 -6
- pulumi_vsphere/pulumi-plugin.json +2 -1
- pulumi_vsphere/resource_pool.py +168 -411
- pulumi_vsphere/role.py +33 -2
- pulumi_vsphere/storage_drs_vm_override.py +133 -2
- pulumi_vsphere/supervisor.py +967 -0
- pulumi_vsphere/tag.py +159 -2
- pulumi_vsphere/tag_category.py +83 -2
- pulumi_vsphere/vapp_container.py +163 -2
- pulumi_vsphere/vapp_entity.py +147 -2
- pulumi_vsphere/virtual_disk.py +123 -36
- pulumi_vsphere/virtual_machine.py +759 -829
- pulumi_vsphere/virtual_machine_class.py +447 -0
- pulumi_vsphere/virtual_machine_snapshot.py +13 -12
- pulumi_vsphere/vm_storage_policy.py +120 -127
- pulumi_vsphere/vmfs_datastore.py +271 -2
- pulumi_vsphere/vnic.py +104 -105
- {pulumi_vsphere-4.10.0a1710160860.dist-info → pulumi_vsphere-4.13.0a1736836157.dist-info}/METADATA +7 -6
- pulumi_vsphere-4.13.0a1736836157.dist-info/RECORD +86 -0
- {pulumi_vsphere-4.10.0a1710160860.dist-info → pulumi_vsphere-4.13.0a1736836157.dist-info}/WHEEL +1 -1
- pulumi_vsphere-4.10.0a1710160860.dist-info/RECORD +0 -80
- {pulumi_vsphere-4.10.0a1710160860.dist-info → pulumi_vsphere-4.13.0a1736836157.dist-info}/top_level.txt +0 -0
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
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
|
|
10
15
|
from . import _utilities
|
|
11
16
|
|
|
12
17
|
__all__ = ['ContentLibraryItemArgs', 'ContentLibraryItem']
|
|
@@ -235,7 +240,75 @@ class ContentLibraryItem(pulumi.CustomResource):
|
|
|
235
240
|
type: Optional[pulumi.Input[str]] = None,
|
|
236
241
|
__props__=None):
|
|
237
242
|
"""
|
|
238
|
-
|
|
243
|
+
The `ContentLibraryItem` resource can be used to create items in a
|
|
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
|
+
|
|
239
312
|
:param str resource_name: The name of the resource.
|
|
240
313
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
241
314
|
:param pulumi.Input[str] description: A description for the content library item.
|
|
@@ -253,7 +326,75 @@ class ContentLibraryItem(pulumi.CustomResource):
|
|
|
253
326
|
args: ContentLibraryItemArgs,
|
|
254
327
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
255
328
|
"""
|
|
256
|
-
|
|
329
|
+
The `ContentLibraryItem` resource can be used to create items in a
|
|
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
|
+
|
|
257
398
|
:param str resource_name: The name of the resource.
|
|
258
399
|
:param ContentLibraryItemArgs args: The arguments to use to populate this resource's properties.
|
|
259
400
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
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
|
|
10
15
|
from . import _utilities
|
|
11
16
|
|
|
12
17
|
__all__ = ['CustomAttributeArgs', 'CustomAttribute']
|
|
@@ -108,7 +113,42 @@ class CustomAttribute(pulumi.CustomResource):
|
|
|
108
113
|
name: Optional[pulumi.Input[str]] = None,
|
|
109
114
|
__props__=None):
|
|
110
115
|
"""
|
|
111
|
-
|
|
116
|
+
The `CustomAttribute` resource can be used to create and manage custom
|
|
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
|
+
|
|
112
152
|
:param str resource_name: The name of the resource.
|
|
113
153
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
114
154
|
:param pulumi.Input[str] managed_object_type: The object type that this attribute may be
|
|
@@ -123,7 +163,42 @@ class CustomAttribute(pulumi.CustomResource):
|
|
|
123
163
|
args: Optional[CustomAttributeArgs] = None,
|
|
124
164
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
125
165
|
"""
|
|
126
|
-
|
|
166
|
+
The `CustomAttribute` resource can be used to create and manage custom
|
|
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
|
+
|
|
127
202
|
:param str resource_name: The name of the resource.
|
|
128
203
|
:param CustomAttributeArgs args: The arguments to use to populate this resource's properties.
|
|
129
204
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
pulumi_vsphere/datacenter.py
CHANGED
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
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
|
|
10
15
|
from . import _utilities
|
|
11
16
|
|
|
12
17
|
__all__ = ['DatacenterArgs', 'Datacenter']
|
|
@@ -20,7 +25,7 @@ class DatacenterArgs:
|
|
|
20
25
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
|
|
21
26
|
"""
|
|
22
27
|
The set of arguments for constructing a Datacenter resource.
|
|
23
|
-
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to value
|
|
28
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to value
|
|
24
29
|
strings to set for datacenter resource. See
|
|
25
30
|
[here][docs-setting-custom-attributes] for a reference on how to set values
|
|
26
31
|
for custom attributes.
|
|
@@ -34,9 +39,6 @@ class DatacenterArgs:
|
|
|
34
39
|
:param pulumi.Input[str] name: The name of the datacenter. This name needs to be unique
|
|
35
40
|
within the folder. Forces a new resource if changed.
|
|
36
41
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource.
|
|
37
|
-
|
|
38
|
-
> **NOTE:** Tagging support is unsupported on direct ESXi connections and
|
|
39
|
-
requires vCenter 6.0 or higher.
|
|
40
42
|
"""
|
|
41
43
|
if custom_attributes is not None:
|
|
42
44
|
pulumi.set(__self__, "custom_attributes", custom_attributes)
|
|
@@ -51,7 +53,7 @@ class DatacenterArgs:
|
|
|
51
53
|
@pulumi.getter(name="customAttributes")
|
|
52
54
|
def custom_attributes(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
|
53
55
|
"""
|
|
54
|
-
Map of custom attribute ids to value
|
|
56
|
+
Map of custom attribute ids to value
|
|
55
57
|
strings to set for datacenter resource. See
|
|
56
58
|
[here][docs-setting-custom-attributes] for a reference on how to set values
|
|
57
59
|
for custom attributes.
|
|
@@ -98,9 +100,6 @@ class DatacenterArgs:
|
|
|
98
100
|
def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
|
99
101
|
"""
|
|
100
102
|
The IDs of any tags to attach to this resource.
|
|
101
|
-
|
|
102
|
-
> **NOTE:** Tagging support is unsupported on direct ESXi connections and
|
|
103
|
-
requires vCenter 6.0 or higher.
|
|
104
103
|
"""
|
|
105
104
|
return pulumi.get(self, "tags")
|
|
106
105
|
|
|
@@ -119,7 +118,7 @@ class _DatacenterState:
|
|
|
119
118
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
|
|
120
119
|
"""
|
|
121
120
|
Input properties used for looking up and filtering Datacenter resources.
|
|
122
|
-
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to value
|
|
121
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to value
|
|
123
122
|
strings to set for datacenter resource. See
|
|
124
123
|
[here][docs-setting-custom-attributes] for a reference on how to set values
|
|
125
124
|
for custom attributes.
|
|
@@ -134,9 +133,6 @@ class _DatacenterState:
|
|
|
134
133
|
:param pulumi.Input[str] name: The name of the datacenter. This name needs to be unique
|
|
135
134
|
within the folder. Forces a new resource if changed.
|
|
136
135
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource.
|
|
137
|
-
|
|
138
|
-
> **NOTE:** Tagging support is unsupported on direct ESXi connections and
|
|
139
|
-
requires vCenter 6.0 or higher.
|
|
140
136
|
"""
|
|
141
137
|
if custom_attributes is not None:
|
|
142
138
|
pulumi.set(__self__, "custom_attributes", custom_attributes)
|
|
@@ -153,7 +149,7 @@ class _DatacenterState:
|
|
|
153
149
|
@pulumi.getter(name="customAttributes")
|
|
154
150
|
def custom_attributes(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
|
155
151
|
"""
|
|
156
|
-
Map of custom attribute ids to value
|
|
152
|
+
Map of custom attribute ids to value
|
|
157
153
|
strings to set for datacenter resource. See
|
|
158
154
|
[here][docs-setting-custom-attributes] for a reference on how to set values
|
|
159
155
|
for custom attributes.
|
|
@@ -212,9 +208,6 @@ class _DatacenterState:
|
|
|
212
208
|
def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
|
213
209
|
"""
|
|
214
210
|
The IDs of any tags to attach to this resource.
|
|
215
|
-
|
|
216
|
-
> **NOTE:** Tagging support is unsupported on direct ESXi connections and
|
|
217
|
-
requires vCenter 6.0 or higher.
|
|
218
211
|
"""
|
|
219
212
|
return pulumi.get(self, "tags")
|
|
220
213
|
|
|
@@ -241,29 +234,41 @@ class Datacenter(pulumi.CustomResource):
|
|
|
241
234
|
|
|
242
235
|
### Create datacenter on the root folder
|
|
243
236
|
|
|
244
|
-
<!--Start PulumiCodeChooser -->
|
|
245
237
|
```python
|
|
246
238
|
import pulumi
|
|
247
239
|
import pulumi_vsphere as vsphere
|
|
248
240
|
|
|
249
|
-
prod_datacenter = vsphere.Datacenter("
|
|
241
|
+
prod_datacenter = vsphere.Datacenter("prod_datacenter", name="my_prod_datacenter")
|
|
250
242
|
```
|
|
251
|
-
<!--End PulumiCodeChooser -->
|
|
252
243
|
|
|
253
244
|
### Create datacenter on a subfolder
|
|
254
245
|
|
|
255
|
-
<!--Start PulumiCodeChooser -->
|
|
256
246
|
```python
|
|
257
247
|
import pulumi
|
|
258
248
|
import pulumi_vsphere as vsphere
|
|
259
249
|
|
|
260
|
-
research_datacenter = vsphere.Datacenter("
|
|
250
|
+
research_datacenter = vsphere.Datacenter("research_datacenter",
|
|
251
|
+
name="my_research_datacenter",
|
|
252
|
+
folder="/research/")
|
|
261
253
|
```
|
|
262
|
-
|
|
254
|
+
|
|
255
|
+
## Import
|
|
256
|
+
|
|
257
|
+
An existing datacenter can be imported into this resource
|
|
258
|
+
|
|
259
|
+
via supplying the full path to the datacenter. An example is below:
|
|
260
|
+
|
|
261
|
+
[docs-import]: /docs/import/index.html
|
|
262
|
+
|
|
263
|
+
```sh
|
|
264
|
+
$ pulumi import vsphere:index/datacenter:Datacenter dc /dc1
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
The above would import the datacenter named `dc1`.
|
|
263
268
|
|
|
264
269
|
:param str resource_name: The name of the resource.
|
|
265
270
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
266
|
-
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to value
|
|
271
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to value
|
|
267
272
|
strings to set for datacenter resource. See
|
|
268
273
|
[here][docs-setting-custom-attributes] for a reference on how to set values
|
|
269
274
|
for custom attributes.
|
|
@@ -277,9 +282,6 @@ class Datacenter(pulumi.CustomResource):
|
|
|
277
282
|
:param pulumi.Input[str] name: The name of the datacenter. This name needs to be unique
|
|
278
283
|
within the folder. Forces a new resource if changed.
|
|
279
284
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource.
|
|
280
|
-
|
|
281
|
-
> **NOTE:** Tagging support is unsupported on direct ESXi connections and
|
|
282
|
-
requires vCenter 6.0 or higher.
|
|
283
285
|
"""
|
|
284
286
|
...
|
|
285
287
|
@overload
|
|
@@ -295,25 +297,37 @@ class Datacenter(pulumi.CustomResource):
|
|
|
295
297
|
|
|
296
298
|
### Create datacenter on the root folder
|
|
297
299
|
|
|
298
|
-
<!--Start PulumiCodeChooser -->
|
|
299
300
|
```python
|
|
300
301
|
import pulumi
|
|
301
302
|
import pulumi_vsphere as vsphere
|
|
302
303
|
|
|
303
|
-
prod_datacenter = vsphere.Datacenter("
|
|
304
|
+
prod_datacenter = vsphere.Datacenter("prod_datacenter", name="my_prod_datacenter")
|
|
304
305
|
```
|
|
305
|
-
<!--End PulumiCodeChooser -->
|
|
306
306
|
|
|
307
307
|
### Create datacenter on a subfolder
|
|
308
308
|
|
|
309
|
-
<!--Start PulumiCodeChooser -->
|
|
310
309
|
```python
|
|
311
310
|
import pulumi
|
|
312
311
|
import pulumi_vsphere as vsphere
|
|
313
312
|
|
|
314
|
-
research_datacenter = vsphere.Datacenter("
|
|
313
|
+
research_datacenter = vsphere.Datacenter("research_datacenter",
|
|
314
|
+
name="my_research_datacenter",
|
|
315
|
+
folder="/research/")
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
## Import
|
|
319
|
+
|
|
320
|
+
An existing datacenter can be imported into this resource
|
|
321
|
+
|
|
322
|
+
via supplying the full path to the datacenter. An example is below:
|
|
323
|
+
|
|
324
|
+
[docs-import]: /docs/import/index.html
|
|
325
|
+
|
|
326
|
+
```sh
|
|
327
|
+
$ pulumi import vsphere:index/datacenter:Datacenter dc /dc1
|
|
315
328
|
```
|
|
316
|
-
|
|
329
|
+
|
|
330
|
+
The above would import the datacenter named `dc1`.
|
|
317
331
|
|
|
318
332
|
:param str resource_name: The name of the resource.
|
|
319
333
|
:param DatacenterArgs args: The arguments to use to populate this resource's properties.
|
|
@@ -370,7 +384,7 @@ class Datacenter(pulumi.CustomResource):
|
|
|
370
384
|
:param str resource_name: The unique name of the resulting resource.
|
|
371
385
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
372
386
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
373
|
-
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to value
|
|
387
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to value
|
|
374
388
|
strings to set for datacenter resource. See
|
|
375
389
|
[here][docs-setting-custom-attributes] for a reference on how to set values
|
|
376
390
|
for custom attributes.
|
|
@@ -385,9 +399,6 @@ class Datacenter(pulumi.CustomResource):
|
|
|
385
399
|
:param pulumi.Input[str] name: The name of the datacenter. This name needs to be unique
|
|
386
400
|
within the folder. Forces a new resource if changed.
|
|
387
401
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource.
|
|
388
|
-
|
|
389
|
-
> **NOTE:** Tagging support is unsupported on direct ESXi connections and
|
|
390
|
-
requires vCenter 6.0 or higher.
|
|
391
402
|
"""
|
|
392
403
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
393
404
|
|
|
@@ -404,7 +415,7 @@ class Datacenter(pulumi.CustomResource):
|
|
|
404
415
|
@pulumi.getter(name="customAttributes")
|
|
405
416
|
def custom_attributes(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
|
|
406
417
|
"""
|
|
407
|
-
Map of custom attribute ids to value
|
|
418
|
+
Map of custom attribute ids to value
|
|
408
419
|
strings to set for datacenter resource. See
|
|
409
420
|
[here][docs-setting-custom-attributes] for a reference on how to set values
|
|
410
421
|
for custom attributes.
|
|
@@ -447,9 +458,6 @@ class Datacenter(pulumi.CustomResource):
|
|
|
447
458
|
def tags(self) -> pulumi.Output[Optional[Sequence[str]]]:
|
|
448
459
|
"""
|
|
449
460
|
The IDs of any tags to attach to this resource.
|
|
450
|
-
|
|
451
|
-
> **NOTE:** Tagging support is unsupported on direct ESXi connections and
|
|
452
|
-
requires vCenter 6.0 or higher.
|
|
453
461
|
"""
|
|
454
462
|
return pulumi.get(self, "tags")
|
|
455
463
|
|