pulumi-vsphere 4.11.0__py3-none-any.whl → 4.11.0a1710920591__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 +0 -28
- pulumi_vsphere/_inputs.py +236 -646
- pulumi_vsphere/_utilities.py +4 -40
- pulumi_vsphere/compute_cluster.py +1486 -756
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +34 -42
- pulumi_vsphere/content_library.py +10 -10
- pulumi_vsphere/datacenter.py +40 -33
- pulumi_vsphere/datastore_cluster.py +364 -154
- pulumi_vsphere/distributed_port_group.py +187 -131
- pulumi_vsphere/distributed_virtual_switch.py +828 -310
- pulumi_vsphere/entity_permissions.py +38 -59
- pulumi_vsphere/file.py +24 -16
- pulumi_vsphere/folder.py +28 -7
- pulumi_vsphere/get_compute_cluster.py +4 -0
- pulumi_vsphere/get_compute_cluster_host_group.py +20 -20
- pulumi_vsphere/get_content_library.py +10 -10
- pulumi_vsphere/get_content_library_item.py +8 -12
- pulumi_vsphere/get_custom_attribute.py +4 -0
- pulumi_vsphere/get_datacenter.py +4 -0
- pulumi_vsphere/get_datastore.py +16 -12
- pulumi_vsphere/get_datastore_cluster.py +4 -0
- pulumi_vsphere/get_datastore_stats.py +52 -46
- pulumi_vsphere/get_distributed_virtual_switch.py +4 -2
- pulumi_vsphere/get_dynamic.py +20 -18
- pulumi_vsphere/get_folder.py +6 -10
- pulumi_vsphere/get_guest_os_customization.py +47 -8
- pulumi_vsphere/get_host.py +4 -0
- pulumi_vsphere/get_host_pci_device.py +14 -8
- pulumi_vsphere/get_host_thumbprint.py +16 -12
- pulumi_vsphere/get_host_vgpu_profile.py +10 -4
- pulumi_vsphere/get_license.py +5 -2
- pulumi_vsphere/get_network.py +18 -14
- pulumi_vsphere/get_policy.py +4 -0
- pulumi_vsphere/get_resource_pool.py +18 -14
- pulumi_vsphere/get_role.py +8 -4
- pulumi_vsphere/get_tag.py +4 -0
- pulumi_vsphere/get_tag_category.py +4 -0
- pulumi_vsphere/get_vapp_container.py +4 -0
- pulumi_vsphere/get_virtual_machine.py +43 -60
- pulumi_vsphere/get_vmfs_disks.py +4 -0
- pulumi_vsphere/guest_os_customization.py +5 -55
- pulumi_vsphere/ha_vm_override.py +378 -189
- pulumi_vsphere/host.py +60 -49
- pulumi_vsphere/host_port_group.py +26 -14
- pulumi_vsphere/host_virtual_switch.py +287 -140
- pulumi_vsphere/license.py +32 -0
- pulumi_vsphere/nas_datastore.py +7 -7
- pulumi_vsphere/outputs.py +270 -672
- pulumi_vsphere/provider.py +6 -2
- pulumi_vsphere/pulumi-plugin.json +1 -2
- pulumi_vsphere/resource_pool.py +24 -50
- pulumi_vsphere/virtual_disk.py +34 -42
- pulumi_vsphere/virtual_machine.py +827 -598
- pulumi_vsphere/virtual_machine_snapshot.py +12 -8
- pulumi_vsphere/vm_storage_policy.py +127 -115
- pulumi_vsphere/vnic.py +105 -89
- {pulumi_vsphere-4.11.0.dist-info → pulumi_vsphere-4.11.0a1710920591.dist-info}/METADATA +1 -1
- pulumi_vsphere-4.11.0a1710920591.dist-info/RECORD +82 -0
- {pulumi_vsphere-4.11.0.dist-info → pulumi_vsphere-4.11.0a1710920591.dist-info}/WHEEL +1 -1
- pulumi_vsphere/get_host_base_images.py +0 -97
- pulumi_vsphere/offline_software_depot.py +0 -180
- pulumi_vsphere/supervisor.py +0 -962
- pulumi_vsphere/virtual_machine_class.py +0 -442
- pulumi_vsphere-4.11.0.dist-info/RECORD +0 -86
- {pulumi_vsphere-4.11.0.dist-info → pulumi_vsphere-4.11.0a1710920591.dist-info}/top_level.txt +0 -0
|
@@ -249,6 +249,8 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
|
|
|
249
249
|
> **NOTE:** This resource requires vCenter Server and is not available on
|
|
250
250
|
direct ESXi host connections.
|
|
251
251
|
|
|
252
|
+
> **NOTE:** vSphere DRS requires a vSphere Enterprise Plus license.
|
|
253
|
+
|
|
252
254
|
## Example Usage
|
|
253
255
|
|
|
254
256
|
The following example creates two virtual machines in a cluster using the
|
|
@@ -258,6 +260,7 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
|
|
|
258
260
|
then creates an affinity rule for these two virtual machines, ensuring they
|
|
259
261
|
will run on the same host whenever possible.
|
|
260
262
|
|
|
263
|
+
<!--Start PulumiCodeChooser -->
|
|
261
264
|
```python
|
|
262
265
|
import pulumi
|
|
263
266
|
import pulumi_vsphere as vsphere
|
|
@@ -272,29 +275,29 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
|
|
|
272
275
|
vm = []
|
|
273
276
|
for range in [{"value": i} for i in range(0, 2)]:
|
|
274
277
|
vm.append(vsphere.VirtualMachine(f"vm-{range['value']}",
|
|
275
|
-
name=f"foo-{range['value']}",
|
|
276
278
|
resource_pool_id=cluster.resource_pool_id,
|
|
277
279
|
datastore_id=datastore.id,
|
|
278
280
|
num_cpus=1,
|
|
279
281
|
memory=1024,
|
|
280
282
|
guest_id="otherLinux64Guest",
|
|
281
|
-
network_interfaces=[
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
disks=[
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("
|
|
289
|
-
name="vm-affinity-rule",
|
|
283
|
+
network_interfaces=[vsphere.VirtualMachineNetworkInterfaceArgs(
|
|
284
|
+
network_id=network.id,
|
|
285
|
+
)],
|
|
286
|
+
disks=[vsphere.VirtualMachineDiskArgs(
|
|
287
|
+
label="disk0",
|
|
288
|
+
size=20,
|
|
289
|
+
)]))
|
|
290
|
+
vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vmAffinityRule",
|
|
290
291
|
compute_cluster_id=cluster.id,
|
|
291
292
|
virtual_machine_ids=[v.id for k, v in vm])
|
|
292
293
|
```
|
|
294
|
+
<!--End PulumiCodeChooser -->
|
|
293
295
|
|
|
294
296
|
The following example creates an affinity rule for a set of virtual machines
|
|
295
297
|
in the cluster by looking up the virtual machine UUIDs from the
|
|
296
298
|
`VirtualMachine` data source.
|
|
297
299
|
|
|
300
|
+
<!--Start PulumiCodeChooser -->
|
|
298
301
|
```python
|
|
299
302
|
import pulumi
|
|
300
303
|
import pulumi_vsphere as vsphere
|
|
@@ -306,21 +309,14 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
|
|
|
306
309
|
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
307
310
|
cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
308
311
|
datacenter_id=datacenter.id)
|
|
309
|
-
|
|
312
|
+
vms_virtual_machine = [vsphere.get_virtual_machine(name=vms[__index],
|
|
310
313
|
datacenter_id=datacenter.id) for __index in range(len(vms))]
|
|
311
|
-
vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("
|
|
312
|
-
name="vm-affinity-rule",
|
|
314
|
+
vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vmAffinityRule",
|
|
313
315
|
enabled=True,
|
|
314
316
|
compute_cluster_id=cluster.id,
|
|
315
|
-
virtual_machine_ids=[__item.id for __item in
|
|
317
|
+
virtual_machine_ids=[__item.id for __item in vms_virtual_machine])
|
|
316
318
|
```
|
|
317
|
-
|
|
318
|
-
## Importing
|
|
319
|
-
|
|
320
|
-
An existing rule can be imported into this resource by supplying
|
|
321
|
-
both the path to the cluster, and the name the rule. If the name or cluster is
|
|
322
|
-
not found, or if the rule is of a different type, an error will be returned. An
|
|
323
|
-
example is below:
|
|
319
|
+
<!--End PulumiCodeChooser -->
|
|
324
320
|
|
|
325
321
|
:param str resource_name: The name of the resource.
|
|
326
322
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -365,6 +361,8 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
|
|
|
365
361
|
> **NOTE:** This resource requires vCenter Server and is not available on
|
|
366
362
|
direct ESXi host connections.
|
|
367
363
|
|
|
364
|
+
> **NOTE:** vSphere DRS requires a vSphere Enterprise Plus license.
|
|
365
|
+
|
|
368
366
|
## Example Usage
|
|
369
367
|
|
|
370
368
|
The following example creates two virtual machines in a cluster using the
|
|
@@ -374,6 +372,7 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
|
|
|
374
372
|
then creates an affinity rule for these two virtual machines, ensuring they
|
|
375
373
|
will run on the same host whenever possible.
|
|
376
374
|
|
|
375
|
+
<!--Start PulumiCodeChooser -->
|
|
377
376
|
```python
|
|
378
377
|
import pulumi
|
|
379
378
|
import pulumi_vsphere as vsphere
|
|
@@ -388,29 +387,29 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
|
|
|
388
387
|
vm = []
|
|
389
388
|
for range in [{"value": i} for i in range(0, 2)]:
|
|
390
389
|
vm.append(vsphere.VirtualMachine(f"vm-{range['value']}",
|
|
391
|
-
name=f"foo-{range['value']}",
|
|
392
390
|
resource_pool_id=cluster.resource_pool_id,
|
|
393
391
|
datastore_id=datastore.id,
|
|
394
392
|
num_cpus=1,
|
|
395
393
|
memory=1024,
|
|
396
394
|
guest_id="otherLinux64Guest",
|
|
397
|
-
network_interfaces=[
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
disks=[
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("
|
|
405
|
-
name="vm-affinity-rule",
|
|
395
|
+
network_interfaces=[vsphere.VirtualMachineNetworkInterfaceArgs(
|
|
396
|
+
network_id=network.id,
|
|
397
|
+
)],
|
|
398
|
+
disks=[vsphere.VirtualMachineDiskArgs(
|
|
399
|
+
label="disk0",
|
|
400
|
+
size=20,
|
|
401
|
+
)]))
|
|
402
|
+
vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vmAffinityRule",
|
|
406
403
|
compute_cluster_id=cluster.id,
|
|
407
404
|
virtual_machine_ids=[v.id for k, v in vm])
|
|
408
405
|
```
|
|
406
|
+
<!--End PulumiCodeChooser -->
|
|
409
407
|
|
|
410
408
|
The following example creates an affinity rule for a set of virtual machines
|
|
411
409
|
in the cluster by looking up the virtual machine UUIDs from the
|
|
412
410
|
`VirtualMachine` data source.
|
|
413
411
|
|
|
412
|
+
<!--Start PulumiCodeChooser -->
|
|
414
413
|
```python
|
|
415
414
|
import pulumi
|
|
416
415
|
import pulumi_vsphere as vsphere
|
|
@@ -422,21 +421,14 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
|
|
|
422
421
|
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
423
422
|
cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
424
423
|
datacenter_id=datacenter.id)
|
|
425
|
-
|
|
424
|
+
vms_virtual_machine = [vsphere.get_virtual_machine(name=vms[__index],
|
|
426
425
|
datacenter_id=datacenter.id) for __index in range(len(vms))]
|
|
427
|
-
vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("
|
|
428
|
-
name="vm-affinity-rule",
|
|
426
|
+
vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vmAffinityRule",
|
|
429
427
|
enabled=True,
|
|
430
428
|
compute_cluster_id=cluster.id,
|
|
431
|
-
virtual_machine_ids=[__item.id for __item in
|
|
429
|
+
virtual_machine_ids=[__item.id for __item in vms_virtual_machine])
|
|
432
430
|
```
|
|
433
|
-
|
|
434
|
-
## Importing
|
|
435
|
-
|
|
436
|
-
An existing rule can be imported into this resource by supplying
|
|
437
|
-
both the path to the cluster, and the name the rule. If the name or cluster is
|
|
438
|
-
not found, or if the rule is of a different type, an error will be returned. An
|
|
439
|
-
example is below:
|
|
431
|
+
<!--End PulumiCodeChooser -->
|
|
440
432
|
|
|
441
433
|
:param str resource_name: The name of the resource.
|
|
442
434
|
:param ComputeClusterVmAffinityRuleArgs args: The arguments to use to populate this resource's properties.
|
|
@@ -195,9 +195,9 @@ class ContentLibrary(pulumi.CustomResource):
|
|
|
195
195
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
196
196
|
description: Optional[pulumi.Input[str]] = None,
|
|
197
197
|
name: Optional[pulumi.Input[str]] = None,
|
|
198
|
-
publication: Optional[pulumi.Input[
|
|
198
|
+
publication: Optional[pulumi.Input[pulumi.InputType['ContentLibraryPublicationArgs']]] = None,
|
|
199
199
|
storage_backings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
200
|
-
subscription: Optional[pulumi.Input[
|
|
200
|
+
subscription: Optional[pulumi.Input[pulumi.InputType['ContentLibrarySubscriptionArgs']]] = None,
|
|
201
201
|
__props__=None):
|
|
202
202
|
"""
|
|
203
203
|
Create a ContentLibrary resource with the given unique name, props, and options.
|
|
@@ -205,9 +205,9 @@ class ContentLibrary(pulumi.CustomResource):
|
|
|
205
205
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
206
206
|
:param pulumi.Input[str] description: A description for the content library.
|
|
207
207
|
:param pulumi.Input[str] name: The name of the content library.
|
|
208
|
-
:param pulumi.Input[
|
|
208
|
+
:param pulumi.Input[pulumi.InputType['ContentLibraryPublicationArgs']] publication: Options to publish a local content library.
|
|
209
209
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] storage_backings: The managed object reference ID of the datastore on which to store the content library items.
|
|
210
|
-
:param pulumi.Input[
|
|
210
|
+
:param pulumi.Input[pulumi.InputType['ContentLibrarySubscriptionArgs']] subscription: Options subscribe to a published content library.
|
|
211
211
|
"""
|
|
212
212
|
...
|
|
213
213
|
@overload
|
|
@@ -234,9 +234,9 @@ class ContentLibrary(pulumi.CustomResource):
|
|
|
234
234
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
235
235
|
description: Optional[pulumi.Input[str]] = None,
|
|
236
236
|
name: Optional[pulumi.Input[str]] = None,
|
|
237
|
-
publication: Optional[pulumi.Input[
|
|
237
|
+
publication: Optional[pulumi.Input[pulumi.InputType['ContentLibraryPublicationArgs']]] = None,
|
|
238
238
|
storage_backings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
239
|
-
subscription: Optional[pulumi.Input[
|
|
239
|
+
subscription: Optional[pulumi.Input[pulumi.InputType['ContentLibrarySubscriptionArgs']]] = None,
|
|
240
240
|
__props__=None):
|
|
241
241
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
242
242
|
if not isinstance(opts, pulumi.ResourceOptions):
|
|
@@ -265,9 +265,9 @@ class ContentLibrary(pulumi.CustomResource):
|
|
|
265
265
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
266
266
|
description: Optional[pulumi.Input[str]] = None,
|
|
267
267
|
name: Optional[pulumi.Input[str]] = None,
|
|
268
|
-
publication: Optional[pulumi.Input[
|
|
268
|
+
publication: Optional[pulumi.Input[pulumi.InputType['ContentLibraryPublicationArgs']]] = None,
|
|
269
269
|
storage_backings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
270
|
-
subscription: Optional[pulumi.Input[
|
|
270
|
+
subscription: Optional[pulumi.Input[pulumi.InputType['ContentLibrarySubscriptionArgs']]] = None) -> 'ContentLibrary':
|
|
271
271
|
"""
|
|
272
272
|
Get an existing ContentLibrary resource's state with the given name, id, and optional extra
|
|
273
273
|
properties used to qualify the lookup.
|
|
@@ -277,9 +277,9 @@ class ContentLibrary(pulumi.CustomResource):
|
|
|
277
277
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
278
278
|
:param pulumi.Input[str] description: A description for the content library.
|
|
279
279
|
:param pulumi.Input[str] name: The name of the content library.
|
|
280
|
-
:param pulumi.Input[
|
|
280
|
+
:param pulumi.Input[pulumi.InputType['ContentLibraryPublicationArgs']] publication: Options to publish a local content library.
|
|
281
281
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] storage_backings: The managed object reference ID of the datastore on which to store the content library items.
|
|
282
|
-
:param pulumi.Input[
|
|
282
|
+
:param pulumi.Input[pulumi.InputType['ContentLibrarySubscriptionArgs']] subscription: Options subscribe to a published content library.
|
|
283
283
|
"""
|
|
284
284
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
285
285
|
|
pulumi_vsphere/datacenter.py
CHANGED
|
@@ -20,7 +20,7 @@ class DatacenterArgs:
|
|
|
20
20
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
|
|
21
21
|
"""
|
|
22
22
|
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
|
|
23
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to value
|
|
24
24
|
strings to set for datacenter resource. See
|
|
25
25
|
[here][docs-setting-custom-attributes] for a reference on how to set values
|
|
26
26
|
for custom attributes.
|
|
@@ -34,6 +34,9 @@ class DatacenterArgs:
|
|
|
34
34
|
:param pulumi.Input[str] name: The name of the datacenter. This name needs to be unique
|
|
35
35
|
within the folder. Forces a new resource if changed.
|
|
36
36
|
: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.
|
|
37
40
|
"""
|
|
38
41
|
if custom_attributes is not None:
|
|
39
42
|
pulumi.set(__self__, "custom_attributes", custom_attributes)
|
|
@@ -48,7 +51,7 @@ class DatacenterArgs:
|
|
|
48
51
|
@pulumi.getter(name="customAttributes")
|
|
49
52
|
def custom_attributes(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
|
50
53
|
"""
|
|
51
|
-
Map of custom attribute ids to value
|
|
54
|
+
Map of custom attribute ids to value
|
|
52
55
|
strings to set for datacenter resource. See
|
|
53
56
|
[here][docs-setting-custom-attributes] for a reference on how to set values
|
|
54
57
|
for custom attributes.
|
|
@@ -95,6 +98,9 @@ class DatacenterArgs:
|
|
|
95
98
|
def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
|
96
99
|
"""
|
|
97
100
|
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.
|
|
98
104
|
"""
|
|
99
105
|
return pulumi.get(self, "tags")
|
|
100
106
|
|
|
@@ -113,7 +119,7 @@ class _DatacenterState:
|
|
|
113
119
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
|
|
114
120
|
"""
|
|
115
121
|
Input properties used for looking up and filtering Datacenter resources.
|
|
116
|
-
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to value
|
|
122
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to value
|
|
117
123
|
strings to set for datacenter resource. See
|
|
118
124
|
[here][docs-setting-custom-attributes] for a reference on how to set values
|
|
119
125
|
for custom attributes.
|
|
@@ -128,6 +134,9 @@ class _DatacenterState:
|
|
|
128
134
|
:param pulumi.Input[str] name: The name of the datacenter. This name needs to be unique
|
|
129
135
|
within the folder. Forces a new resource if changed.
|
|
130
136
|
: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.
|
|
131
140
|
"""
|
|
132
141
|
if custom_attributes is not None:
|
|
133
142
|
pulumi.set(__self__, "custom_attributes", custom_attributes)
|
|
@@ -144,7 +153,7 @@ class _DatacenterState:
|
|
|
144
153
|
@pulumi.getter(name="customAttributes")
|
|
145
154
|
def custom_attributes(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
|
146
155
|
"""
|
|
147
|
-
Map of custom attribute ids to value
|
|
156
|
+
Map of custom attribute ids to value
|
|
148
157
|
strings to set for datacenter resource. See
|
|
149
158
|
[here][docs-setting-custom-attributes] for a reference on how to set values
|
|
150
159
|
for custom attributes.
|
|
@@ -203,6 +212,9 @@ class _DatacenterState:
|
|
|
203
212
|
def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
|
204
213
|
"""
|
|
205
214
|
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.
|
|
206
218
|
"""
|
|
207
219
|
return pulumi.get(self, "tags")
|
|
208
220
|
|
|
@@ -229,36 +241,29 @@ class Datacenter(pulumi.CustomResource):
|
|
|
229
241
|
|
|
230
242
|
### Create datacenter on the root folder
|
|
231
243
|
|
|
244
|
+
<!--Start PulumiCodeChooser -->
|
|
232
245
|
```python
|
|
233
246
|
import pulumi
|
|
234
247
|
import pulumi_vsphere as vsphere
|
|
235
248
|
|
|
236
|
-
prod_datacenter = vsphere.Datacenter("
|
|
249
|
+
prod_datacenter = vsphere.Datacenter("prodDatacenter")
|
|
237
250
|
```
|
|
251
|
+
<!--End PulumiCodeChooser -->
|
|
238
252
|
|
|
239
253
|
### Create datacenter on a subfolder
|
|
240
254
|
|
|
255
|
+
<!--Start PulumiCodeChooser -->
|
|
241
256
|
```python
|
|
242
257
|
import pulumi
|
|
243
258
|
import pulumi_vsphere as vsphere
|
|
244
259
|
|
|
245
|
-
research_datacenter = vsphere.Datacenter("
|
|
246
|
-
name="my_research_datacenter",
|
|
247
|
-
folder="/research/")
|
|
260
|
+
research_datacenter = vsphere.Datacenter("researchDatacenter", folder="/research/")
|
|
248
261
|
```
|
|
249
|
-
|
|
250
|
-
## Importing
|
|
251
|
-
|
|
252
|
-
An existing datacenter can be [imported][docs-import] into this resource
|
|
253
|
-
via supplying the full path to the datacenter. An example is below:
|
|
254
|
-
|
|
255
|
-
[docs-import]: /docs/import/index.html
|
|
256
|
-
|
|
257
|
-
The above would import the datacenter named `dc1`.
|
|
262
|
+
<!--End PulumiCodeChooser -->
|
|
258
263
|
|
|
259
264
|
:param str resource_name: The name of the resource.
|
|
260
265
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
261
|
-
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to value
|
|
266
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to value
|
|
262
267
|
strings to set for datacenter resource. See
|
|
263
268
|
[here][docs-setting-custom-attributes] for a reference on how to set values
|
|
264
269
|
for custom attributes.
|
|
@@ -272,6 +277,9 @@ class Datacenter(pulumi.CustomResource):
|
|
|
272
277
|
:param pulumi.Input[str] name: The name of the datacenter. This name needs to be unique
|
|
273
278
|
within the folder. Forces a new resource if changed.
|
|
274
279
|
: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.
|
|
275
283
|
"""
|
|
276
284
|
...
|
|
277
285
|
@overload
|
|
@@ -287,32 +295,25 @@ class Datacenter(pulumi.CustomResource):
|
|
|
287
295
|
|
|
288
296
|
### Create datacenter on the root folder
|
|
289
297
|
|
|
298
|
+
<!--Start PulumiCodeChooser -->
|
|
290
299
|
```python
|
|
291
300
|
import pulumi
|
|
292
301
|
import pulumi_vsphere as vsphere
|
|
293
302
|
|
|
294
|
-
prod_datacenter = vsphere.Datacenter("
|
|
303
|
+
prod_datacenter = vsphere.Datacenter("prodDatacenter")
|
|
295
304
|
```
|
|
305
|
+
<!--End PulumiCodeChooser -->
|
|
296
306
|
|
|
297
307
|
### Create datacenter on a subfolder
|
|
298
308
|
|
|
309
|
+
<!--Start PulumiCodeChooser -->
|
|
299
310
|
```python
|
|
300
311
|
import pulumi
|
|
301
312
|
import pulumi_vsphere as vsphere
|
|
302
313
|
|
|
303
|
-
research_datacenter = vsphere.Datacenter("
|
|
304
|
-
name="my_research_datacenter",
|
|
305
|
-
folder="/research/")
|
|
314
|
+
research_datacenter = vsphere.Datacenter("researchDatacenter", folder="/research/")
|
|
306
315
|
```
|
|
307
|
-
|
|
308
|
-
## Importing
|
|
309
|
-
|
|
310
|
-
An existing datacenter can be [imported][docs-import] into this resource
|
|
311
|
-
via supplying the full path to the datacenter. An example is below:
|
|
312
|
-
|
|
313
|
-
[docs-import]: /docs/import/index.html
|
|
314
|
-
|
|
315
|
-
The above would import the datacenter named `dc1`.
|
|
316
|
+
<!--End PulumiCodeChooser -->
|
|
316
317
|
|
|
317
318
|
:param str resource_name: The name of the resource.
|
|
318
319
|
:param DatacenterArgs args: The arguments to use to populate this resource's properties.
|
|
@@ -369,7 +370,7 @@ class Datacenter(pulumi.CustomResource):
|
|
|
369
370
|
:param str resource_name: The unique name of the resulting resource.
|
|
370
371
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
371
372
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
372
|
-
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to value
|
|
373
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to value
|
|
373
374
|
strings to set for datacenter resource. See
|
|
374
375
|
[here][docs-setting-custom-attributes] for a reference on how to set values
|
|
375
376
|
for custom attributes.
|
|
@@ -384,6 +385,9 @@ class Datacenter(pulumi.CustomResource):
|
|
|
384
385
|
:param pulumi.Input[str] name: The name of the datacenter. This name needs to be unique
|
|
385
386
|
within the folder. Forces a new resource if changed.
|
|
386
387
|
: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.
|
|
387
391
|
"""
|
|
388
392
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
389
393
|
|
|
@@ -400,7 +404,7 @@ class Datacenter(pulumi.CustomResource):
|
|
|
400
404
|
@pulumi.getter(name="customAttributes")
|
|
401
405
|
def custom_attributes(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
|
|
402
406
|
"""
|
|
403
|
-
Map of custom attribute ids to value
|
|
407
|
+
Map of custom attribute ids to value
|
|
404
408
|
strings to set for datacenter resource. See
|
|
405
409
|
[here][docs-setting-custom-attributes] for a reference on how to set values
|
|
406
410
|
for custom attributes.
|
|
@@ -443,6 +447,9 @@ class Datacenter(pulumi.CustomResource):
|
|
|
443
447
|
def tags(self) -> pulumi.Output[Optional[Sequence[str]]]:
|
|
444
448
|
"""
|
|
445
449
|
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.
|
|
446
453
|
"""
|
|
447
454
|
return pulumi.get(self, "tags")
|
|
448
455
|
|