pulumi-vsphere 4.13.2__py3-none-any.whl → 4.14.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pulumi-vsphere might be problematic. Click here for more details.
- pulumi_vsphere/compute_cluster.py +11 -10
- pulumi_vsphere/compute_cluster_host_group.py +71 -0
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +1 -0
- pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +5 -0
- pulumi_vsphere/compute_cluster_vm_dependency_rule.py +5 -0
- pulumi_vsphere/compute_cluster_vm_group.py +5 -0
- pulumi_vsphere/compute_cluster_vm_host_rule.py +5 -0
- pulumi_vsphere/content_library.py +5 -0
- pulumi_vsphere/content_library_item.py +5 -0
- pulumi_vsphere/custom_attribute.py +5 -0
- pulumi_vsphere/datacenter.py +1 -0
- pulumi_vsphere/datastore_cluster.py +89 -0
- pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +5 -0
- pulumi_vsphere/distributed_port_group.py +5 -0
- pulumi_vsphere/distributed_virtual_switch.py +5 -0
- pulumi_vsphere/distributed_virtual_switch_pvlan_mapping.py +1 -0
- pulumi_vsphere/dpm_host_override.py +89 -0
- pulumi_vsphere/drs_vm_override.py +5 -0
- pulumi_vsphere/entity_permissions.py +1 -0
- pulumi_vsphere/file.py +35 -49
- pulumi_vsphere/folder.py +17 -12
- pulumi_vsphere/get_compute_cluster_host_group.py +0 -4
- pulumi_vsphere/get_datastore_cluster.py +1 -1
- pulumi_vsphere/get_datastore_stats.py +0 -4
- pulumi_vsphere/get_dynamic.py +0 -4
- pulumi_vsphere/get_folder.py +130 -8
- pulumi_vsphere/get_guest_os_customization.py +21 -2
- pulumi_vsphere/get_license.py +8 -6
- pulumi_vsphere/get_network.py +35 -1
- pulumi_vsphere/get_ovf_vm_template.py +4 -4
- pulumi_vsphere/guest_os_customization.py +1 -0
- pulumi_vsphere/ha_vm_override.py +5 -0
- pulumi_vsphere/host.py +61 -6
- pulumi_vsphere/host_port_group.py +1 -0
- pulumi_vsphere/host_virtual_switch.py +5 -0
- pulumi_vsphere/license.py +67 -26
- pulumi_vsphere/nas_datastore.py +63 -0
- pulumi_vsphere/offline_software_depot.py +5 -0
- pulumi_vsphere/outputs.py +33 -0
- pulumi_vsphere/provider.py +21 -0
- pulumi_vsphere/pulumi-plugin.json +1 -1
- pulumi_vsphere/resource_pool.py +490 -163
- pulumi_vsphere/role.py +1 -0
- pulumi_vsphere/storage_drs_vm_override.py +5 -0
- pulumi_vsphere/supervisor.py +3 -2
- pulumi_vsphere/tag.py +5 -0
- pulumi_vsphere/tag_category.py +5 -0
- pulumi_vsphere/vapp_container.py +5 -0
- pulumi_vsphere/vapp_entity.py +5 -0
- pulumi_vsphere/virtual_disk.py +5 -0
- pulumi_vsphere/virtual_machine.py +5 -4
- pulumi_vsphere/virtual_machine_class.py +5 -4
- pulumi_vsphere/virtual_machine_snapshot.py +1 -0
- pulumi_vsphere/vm_storage_policy.py +1 -0
- pulumi_vsphere/vmfs_datastore.py +5 -0
- pulumi_vsphere/vnic.py +1 -0
- {pulumi_vsphere-4.13.2.dist-info → pulumi_vsphere-4.14.0.dist-info}/METADATA +3 -3
- pulumi_vsphere-4.14.0.dist-info/RECORD +87 -0
- {pulumi_vsphere-4.13.2.dist-info → pulumi_vsphere-4.14.0.dist-info}/WHEEL +1 -1
- pulumi_vsphere-4.13.2.dist-info/RECORD +0 -87
- {pulumi_vsphere-4.13.2.dist-info → pulumi_vsphere-4.14.0.dist-info}/top_level.txt +0 -0
|
@@ -195,6 +195,7 @@ class _DpmHostOverrideState:
|
|
|
195
195
|
pulumi.set(self, "host_system_id", value)
|
|
196
196
|
|
|
197
197
|
|
|
198
|
+
@pulumi.type_token("vsphere:index/dpmHostOverride:DpmHostOverride")
|
|
198
199
|
class DpmHostOverride(pulumi.CustomResource):
|
|
199
200
|
@overload
|
|
200
201
|
def __init__(__self__,
|
|
@@ -219,6 +220,48 @@ class DpmHostOverride(pulumi.CustomResource):
|
|
|
219
220
|
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
220
221
|
connections.
|
|
221
222
|
|
|
223
|
+
## Example Usage
|
|
224
|
+
|
|
225
|
+
The following example creates a compute cluster comprised of three hosts,
|
|
226
|
+
making use of the
|
|
227
|
+
`ComputeCluster` resource. DPM
|
|
228
|
+
will be disabled in the cluster as it is the default setting, but we override
|
|
229
|
+
the setting of the first host referenced by the
|
|
230
|
+
`Host` data source (`esxi1`) by using
|
|
231
|
+
the `DpmHostOverride` resource so it will be powered off when the
|
|
232
|
+
cluster does not need it to service virtual machines.
|
|
233
|
+
|
|
234
|
+
```python
|
|
235
|
+
import pulumi
|
|
236
|
+
import pulumi_vsphere as vsphere
|
|
237
|
+
|
|
238
|
+
config = pulumi.Config()
|
|
239
|
+
datacenter = config.get("datacenter")
|
|
240
|
+
if datacenter is None:
|
|
241
|
+
datacenter = "dc-01"
|
|
242
|
+
hosts = config.get_object("hosts")
|
|
243
|
+
if hosts is None:
|
|
244
|
+
hosts = [
|
|
245
|
+
"esxi-01.example.com",
|
|
246
|
+
"esxi-02.example.com",
|
|
247
|
+
"esxi-03.example.com",
|
|
248
|
+
]
|
|
249
|
+
datacenter_get_datacenter = vsphere.get_datacenter(name=datacenter)
|
|
250
|
+
hosts_get_host = [vsphere.get_host(name=hosts[__index],
|
|
251
|
+
datacenter_id=datacenter_get_datacenter.id) for __index in range(len(hosts))]
|
|
252
|
+
compute_cluster = vsphere.ComputeCluster("compute_cluster",
|
|
253
|
+
name="compute-cluster-test",
|
|
254
|
+
datacenter_id=dc["id"],
|
|
255
|
+
host_system_ids=[[__item.id for __item in hosts_get_host]],
|
|
256
|
+
drs_enabled=True,
|
|
257
|
+
drs_automation_level="fullyAutomated")
|
|
258
|
+
dpm_host_override = vsphere.DpmHostOverride("dpm_host_override",
|
|
259
|
+
compute_cluster_id=compute_cluster.id,
|
|
260
|
+
host_system_id=hosts_get_host[0].id,
|
|
261
|
+
dpm_enabled=True,
|
|
262
|
+
dpm_automation_level="automated")
|
|
263
|
+
```
|
|
264
|
+
|
|
222
265
|
## Import
|
|
223
266
|
|
|
224
267
|
An existing override can be imported into this resource by
|
|
@@ -227,6 +270,8 @@ class DpmHostOverride(pulumi.CustomResource):
|
|
|
227
270
|
|
|
228
271
|
import`. If no override exists, an error will be given. An example is below:
|
|
229
272
|
|
|
273
|
+
[docs-import]: https://developer.hashicorp.com/terraform/cli/import
|
|
274
|
+
|
|
230
275
|
```sh
|
|
231
276
|
$ pulumi import vsphere:index/dpmHostOverride:DpmHostOverride dpm_host_override \\
|
|
232
277
|
```
|
|
@@ -271,6 +316,48 @@ class DpmHostOverride(pulumi.CustomResource):
|
|
|
271
316
|
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
272
317
|
connections.
|
|
273
318
|
|
|
319
|
+
## Example Usage
|
|
320
|
+
|
|
321
|
+
The following example creates a compute cluster comprised of three hosts,
|
|
322
|
+
making use of the
|
|
323
|
+
`ComputeCluster` resource. DPM
|
|
324
|
+
will be disabled in the cluster as it is the default setting, but we override
|
|
325
|
+
the setting of the first host referenced by the
|
|
326
|
+
`Host` data source (`esxi1`) by using
|
|
327
|
+
the `DpmHostOverride` resource so it will be powered off when the
|
|
328
|
+
cluster does not need it to service virtual machines.
|
|
329
|
+
|
|
330
|
+
```python
|
|
331
|
+
import pulumi
|
|
332
|
+
import pulumi_vsphere as vsphere
|
|
333
|
+
|
|
334
|
+
config = pulumi.Config()
|
|
335
|
+
datacenter = config.get("datacenter")
|
|
336
|
+
if datacenter is None:
|
|
337
|
+
datacenter = "dc-01"
|
|
338
|
+
hosts = config.get_object("hosts")
|
|
339
|
+
if hosts is None:
|
|
340
|
+
hosts = [
|
|
341
|
+
"esxi-01.example.com",
|
|
342
|
+
"esxi-02.example.com",
|
|
343
|
+
"esxi-03.example.com",
|
|
344
|
+
]
|
|
345
|
+
datacenter_get_datacenter = vsphere.get_datacenter(name=datacenter)
|
|
346
|
+
hosts_get_host = [vsphere.get_host(name=hosts[__index],
|
|
347
|
+
datacenter_id=datacenter_get_datacenter.id) for __index in range(len(hosts))]
|
|
348
|
+
compute_cluster = vsphere.ComputeCluster("compute_cluster",
|
|
349
|
+
name="compute-cluster-test",
|
|
350
|
+
datacenter_id=dc["id"],
|
|
351
|
+
host_system_ids=[[__item.id for __item in hosts_get_host]],
|
|
352
|
+
drs_enabled=True,
|
|
353
|
+
drs_automation_level="fullyAutomated")
|
|
354
|
+
dpm_host_override = vsphere.DpmHostOverride("dpm_host_override",
|
|
355
|
+
compute_cluster_id=compute_cluster.id,
|
|
356
|
+
host_system_id=hosts_get_host[0].id,
|
|
357
|
+
dpm_enabled=True,
|
|
358
|
+
dpm_automation_level="automated")
|
|
359
|
+
```
|
|
360
|
+
|
|
274
361
|
## Import
|
|
275
362
|
|
|
276
363
|
An existing override can be imported into this resource by
|
|
@@ -279,6 +366,8 @@ class DpmHostOverride(pulumi.CustomResource):
|
|
|
279
366
|
|
|
280
367
|
import`. If no override exists, an error will be given. An example is below:
|
|
281
368
|
|
|
369
|
+
[docs-import]: https://developer.hashicorp.com/terraform/cli/import
|
|
370
|
+
|
|
282
371
|
```sh
|
|
283
372
|
$ pulumi import vsphere:index/dpmHostOverride:DpmHostOverride dpm_host_override \\
|
|
284
373
|
```
|
|
@@ -199,6 +199,7 @@ class _DrsVmOverrideState:
|
|
|
199
199
|
pulumi.set(self, "virtual_machine_id", value)
|
|
200
200
|
|
|
201
201
|
|
|
202
|
+
@pulumi.type_token("vsphere:index/drsVmOverride:DrsVmOverride")
|
|
202
203
|
class DrsVmOverride(pulumi.CustomResource):
|
|
203
204
|
@overload
|
|
204
205
|
def __init__(__self__,
|
|
@@ -280,6 +281,8 @@ class DrsVmOverride(pulumi.CustomResource):
|
|
|
280
281
|
|
|
281
282
|
is below:
|
|
282
283
|
|
|
284
|
+
[docs-import]: https://developer.hashicorp.com/terraform/cli/import
|
|
285
|
+
|
|
283
286
|
```sh
|
|
284
287
|
$ pulumi import vsphere:index/drsVmOverride:DrsVmOverride drs_vm_override \\
|
|
285
288
|
```
|
|
@@ -382,6 +385,8 @@ class DrsVmOverride(pulumi.CustomResource):
|
|
|
382
385
|
|
|
383
386
|
is below:
|
|
384
387
|
|
|
388
|
+
[docs-import]: https://developer.hashicorp.com/terraform/cli/import
|
|
389
|
+
|
|
385
390
|
```sh
|
|
386
391
|
$ pulumi import vsphere:index/drsVmOverride:DrsVmOverride drs_vm_override \\
|
|
387
392
|
```
|
pulumi_vsphere/file.py
CHANGED
|
@@ -32,13 +32,10 @@ class FileArgs:
|
|
|
32
32
|
:param pulumi.Input[builtins.str] datastore: The name of the datastore to which to upload the
|
|
33
33
|
file.
|
|
34
34
|
:param pulumi.Input[builtins.str] destination_file: The path to where the file should be uploaded
|
|
35
|
-
or copied to on the destination
|
|
36
|
-
:param pulumi.Input[builtins.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
> **NOTE:** Any directory created as part of the `create_directories` argument
|
|
40
|
-
will not be deleted when the resource is destroyed. New directories are not
|
|
41
|
-
created if the `destination_file` path is changed in subsequent applies.
|
|
35
|
+
or copied to on the destination datastore.
|
|
36
|
+
:param pulumi.Input[builtins.str] source_file: The path to the file being uploaded from or copied.
|
|
37
|
+
Forces a new resource if changed.
|
|
38
|
+
:param pulumi.Input[builtins.bool] create_directories: Specifies whether to create the parent directories of the destination file if they do not exist.
|
|
42
39
|
:param pulumi.Input[builtins.str] datacenter: The name of a datacenter to which the file will be
|
|
43
40
|
uploaded.
|
|
44
41
|
:param pulumi.Input[builtins.str] source_datacenter: The name of a datacenter from which the file
|
|
@@ -76,7 +73,7 @@ class FileArgs:
|
|
|
76
73
|
def destination_file(self) -> pulumi.Input[builtins.str]:
|
|
77
74
|
"""
|
|
78
75
|
The path to where the file should be uploaded
|
|
79
|
-
or copied to on the destination
|
|
76
|
+
or copied to on the destination datastore.
|
|
80
77
|
"""
|
|
81
78
|
return pulumi.get(self, "destination_file")
|
|
82
79
|
|
|
@@ -87,6 +84,10 @@ class FileArgs:
|
|
|
87
84
|
@property
|
|
88
85
|
@pulumi.getter(name="sourceFile")
|
|
89
86
|
def source_file(self) -> pulumi.Input[builtins.str]:
|
|
87
|
+
"""
|
|
88
|
+
The path to the file being uploaded from or copied.
|
|
89
|
+
Forces a new resource if changed.
|
|
90
|
+
"""
|
|
90
91
|
return pulumi.get(self, "source_file")
|
|
91
92
|
|
|
92
93
|
@source_file.setter
|
|
@@ -97,12 +98,7 @@ class FileArgs:
|
|
|
97
98
|
@pulumi.getter(name="createDirectories")
|
|
98
99
|
def create_directories(self) -> Optional[pulumi.Input[builtins.bool]]:
|
|
99
100
|
"""
|
|
100
|
-
|
|
101
|
-
path parameter on first apply if any are missing for copy operation.
|
|
102
|
-
|
|
103
|
-
> **NOTE:** Any directory created as part of the `create_directories` argument
|
|
104
|
-
will not be deleted when the resource is destroyed. New directories are not
|
|
105
|
-
created if the `destination_file` path is changed in subsequent applies.
|
|
101
|
+
Specifies whether to create the parent directories of the destination file if they do not exist.
|
|
106
102
|
"""
|
|
107
103
|
return pulumi.get(self, "create_directories")
|
|
108
104
|
|
|
@@ -162,22 +158,19 @@ class _FileState:
|
|
|
162
158
|
source_file: Optional[pulumi.Input[builtins.str]] = None):
|
|
163
159
|
"""
|
|
164
160
|
Input properties used for looking up and filtering File resources.
|
|
165
|
-
:param pulumi.Input[builtins.bool] create_directories:
|
|
166
|
-
path parameter on first apply if any are missing for copy operation.
|
|
167
|
-
|
|
168
|
-
> **NOTE:** Any directory created as part of the `create_directories` argument
|
|
169
|
-
will not be deleted when the resource is destroyed. New directories are not
|
|
170
|
-
created if the `destination_file` path is changed in subsequent applies.
|
|
161
|
+
:param pulumi.Input[builtins.bool] create_directories: Specifies whether to create the parent directories of the destination file if they do not exist.
|
|
171
162
|
:param pulumi.Input[builtins.str] datacenter: The name of a datacenter to which the file will be
|
|
172
163
|
uploaded.
|
|
173
164
|
:param pulumi.Input[builtins.str] datastore: The name of the datastore to which to upload the
|
|
174
165
|
file.
|
|
175
166
|
:param pulumi.Input[builtins.str] destination_file: The path to where the file should be uploaded
|
|
176
|
-
or copied to on the destination
|
|
167
|
+
or copied to on the destination datastore.
|
|
177
168
|
:param pulumi.Input[builtins.str] source_datacenter: The name of a datacenter from which the file
|
|
178
169
|
will be copied. Forces a new resource if changed.
|
|
179
170
|
:param pulumi.Input[builtins.str] source_datastore: The name of the datastore from which file will
|
|
180
171
|
be copied. Forces a new resource if changed.
|
|
172
|
+
:param pulumi.Input[builtins.str] source_file: The path to the file being uploaded from or copied.
|
|
173
|
+
Forces a new resource if changed.
|
|
181
174
|
"""
|
|
182
175
|
if create_directories is not None:
|
|
183
176
|
pulumi.set(__self__, "create_directories", create_directories)
|
|
@@ -198,12 +191,7 @@ class _FileState:
|
|
|
198
191
|
@pulumi.getter(name="createDirectories")
|
|
199
192
|
def create_directories(self) -> Optional[pulumi.Input[builtins.bool]]:
|
|
200
193
|
"""
|
|
201
|
-
|
|
202
|
-
path parameter on first apply if any are missing for copy operation.
|
|
203
|
-
|
|
204
|
-
> **NOTE:** Any directory created as part of the `create_directories` argument
|
|
205
|
-
will not be deleted when the resource is destroyed. New directories are not
|
|
206
|
-
created if the `destination_file` path is changed in subsequent applies.
|
|
194
|
+
Specifies whether to create the parent directories of the destination file if they do not exist.
|
|
207
195
|
"""
|
|
208
196
|
return pulumi.get(self, "create_directories")
|
|
209
197
|
|
|
@@ -242,7 +230,7 @@ class _FileState:
|
|
|
242
230
|
def destination_file(self) -> Optional[pulumi.Input[builtins.str]]:
|
|
243
231
|
"""
|
|
244
232
|
The path to where the file should be uploaded
|
|
245
|
-
or copied to on the destination
|
|
233
|
+
or copied to on the destination datastore.
|
|
246
234
|
"""
|
|
247
235
|
return pulumi.get(self, "destination_file")
|
|
248
236
|
|
|
@@ -279,6 +267,10 @@ class _FileState:
|
|
|
279
267
|
@property
|
|
280
268
|
@pulumi.getter(name="sourceFile")
|
|
281
269
|
def source_file(self) -> Optional[pulumi.Input[builtins.str]]:
|
|
270
|
+
"""
|
|
271
|
+
The path to the file being uploaded from or copied.
|
|
272
|
+
Forces a new resource if changed.
|
|
273
|
+
"""
|
|
282
274
|
return pulumi.get(self, "source_file")
|
|
283
275
|
|
|
284
276
|
@source_file.setter
|
|
@@ -286,6 +278,7 @@ class _FileState:
|
|
|
286
278
|
pulumi.set(self, "source_file", value)
|
|
287
279
|
|
|
288
280
|
|
|
281
|
+
@pulumi.type_token("vsphere:index/file:File")
|
|
289
282
|
class File(pulumi.CustomResource):
|
|
290
283
|
@overload
|
|
291
284
|
def __init__(__self__,
|
|
@@ -334,22 +327,19 @@ class File(pulumi.CustomResource):
|
|
|
334
327
|
|
|
335
328
|
:param str resource_name: The name of the resource.
|
|
336
329
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
337
|
-
:param pulumi.Input[builtins.bool] create_directories:
|
|
338
|
-
path parameter on first apply if any are missing for copy operation.
|
|
339
|
-
|
|
340
|
-
> **NOTE:** Any directory created as part of the `create_directories` argument
|
|
341
|
-
will not be deleted when the resource is destroyed. New directories are not
|
|
342
|
-
created if the `destination_file` path is changed in subsequent applies.
|
|
330
|
+
:param pulumi.Input[builtins.bool] create_directories: Specifies whether to create the parent directories of the destination file if they do not exist.
|
|
343
331
|
:param pulumi.Input[builtins.str] datacenter: The name of a datacenter to which the file will be
|
|
344
332
|
uploaded.
|
|
345
333
|
:param pulumi.Input[builtins.str] datastore: The name of the datastore to which to upload the
|
|
346
334
|
file.
|
|
347
335
|
:param pulumi.Input[builtins.str] destination_file: The path to where the file should be uploaded
|
|
348
|
-
or copied to on the destination
|
|
336
|
+
or copied to on the destination datastore.
|
|
349
337
|
:param pulumi.Input[builtins.str] source_datacenter: The name of a datacenter from which the file
|
|
350
338
|
will be copied. Forces a new resource if changed.
|
|
351
339
|
:param pulumi.Input[builtins.str] source_datastore: The name of the datastore from which file will
|
|
352
340
|
be copied. Forces a new resource if changed.
|
|
341
|
+
:param pulumi.Input[builtins.str] source_file: The path to the file being uploaded from or copied.
|
|
342
|
+
Forces a new resource if changed.
|
|
353
343
|
"""
|
|
354
344
|
...
|
|
355
345
|
@overload
|
|
@@ -458,22 +448,19 @@ class File(pulumi.CustomResource):
|
|
|
458
448
|
:param str resource_name: The unique name of the resulting resource.
|
|
459
449
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
460
450
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
461
|
-
:param pulumi.Input[builtins.bool] create_directories:
|
|
462
|
-
path parameter on first apply if any are missing for copy operation.
|
|
463
|
-
|
|
464
|
-
> **NOTE:** Any directory created as part of the `create_directories` argument
|
|
465
|
-
will not be deleted when the resource is destroyed. New directories are not
|
|
466
|
-
created if the `destination_file` path is changed in subsequent applies.
|
|
451
|
+
:param pulumi.Input[builtins.bool] create_directories: Specifies whether to create the parent directories of the destination file if they do not exist.
|
|
467
452
|
:param pulumi.Input[builtins.str] datacenter: The name of a datacenter to which the file will be
|
|
468
453
|
uploaded.
|
|
469
454
|
:param pulumi.Input[builtins.str] datastore: The name of the datastore to which to upload the
|
|
470
455
|
file.
|
|
471
456
|
:param pulumi.Input[builtins.str] destination_file: The path to where the file should be uploaded
|
|
472
|
-
or copied to on the destination
|
|
457
|
+
or copied to on the destination datastore.
|
|
473
458
|
:param pulumi.Input[builtins.str] source_datacenter: The name of a datacenter from which the file
|
|
474
459
|
will be copied. Forces a new resource if changed.
|
|
475
460
|
:param pulumi.Input[builtins.str] source_datastore: The name of the datastore from which file will
|
|
476
461
|
be copied. Forces a new resource if changed.
|
|
462
|
+
:param pulumi.Input[builtins.str] source_file: The path to the file being uploaded from or copied.
|
|
463
|
+
Forces a new resource if changed.
|
|
477
464
|
"""
|
|
478
465
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
479
466
|
|
|
@@ -492,12 +479,7 @@ class File(pulumi.CustomResource):
|
|
|
492
479
|
@pulumi.getter(name="createDirectories")
|
|
493
480
|
def create_directories(self) -> pulumi.Output[Optional[builtins.bool]]:
|
|
494
481
|
"""
|
|
495
|
-
|
|
496
|
-
path parameter on first apply if any are missing for copy operation.
|
|
497
|
-
|
|
498
|
-
> **NOTE:** Any directory created as part of the `create_directories` argument
|
|
499
|
-
will not be deleted when the resource is destroyed. New directories are not
|
|
500
|
-
created if the `destination_file` path is changed in subsequent applies.
|
|
482
|
+
Specifies whether to create the parent directories of the destination file if they do not exist.
|
|
501
483
|
"""
|
|
502
484
|
return pulumi.get(self, "create_directories")
|
|
503
485
|
|
|
@@ -524,7 +506,7 @@ class File(pulumi.CustomResource):
|
|
|
524
506
|
def destination_file(self) -> pulumi.Output[builtins.str]:
|
|
525
507
|
"""
|
|
526
508
|
The path to where the file should be uploaded
|
|
527
|
-
or copied to on the destination
|
|
509
|
+
or copied to on the destination datastore.
|
|
528
510
|
"""
|
|
529
511
|
return pulumi.get(self, "destination_file")
|
|
530
512
|
|
|
@@ -549,5 +531,9 @@ class File(pulumi.CustomResource):
|
|
|
549
531
|
@property
|
|
550
532
|
@pulumi.getter(name="sourceFile")
|
|
551
533
|
def source_file(self) -> pulumi.Output[builtins.str]:
|
|
534
|
+
"""
|
|
535
|
+
The path to the file being uploaded from or copied.
|
|
536
|
+
Forces a new resource if changed.
|
|
537
|
+
"""
|
|
552
538
|
return pulumi.get(self, "source_file")
|
|
553
539
|
|
pulumi_vsphere/folder.py
CHANGED
|
@@ -279,6 +279,7 @@ class _FolderState:
|
|
|
279
279
|
pulumi.set(self, "type", value)
|
|
280
280
|
|
|
281
281
|
|
|
282
|
+
@pulumi.type_token("vsphere:index/folder:Folder")
|
|
282
283
|
class Folder(pulumi.CustomResource):
|
|
283
284
|
@overload
|
|
284
285
|
def __init__(__self__,
|
|
@@ -299,7 +300,7 @@ class Folder(pulumi.CustomResource):
|
|
|
299
300
|
Paths are always relative to the specific type of folder you are creating.
|
|
300
301
|
A subfolder is discovered by parsing the relative path specified in `path`, so
|
|
301
302
|
`foo/bar` will create a folder named `bar` in the parent folder `foo`, as long
|
|
302
|
-
as
|
|
303
|
+
as the folder `foo` exists.
|
|
303
304
|
|
|
304
305
|
## Example Usage
|
|
305
306
|
|
|
@@ -310,14 +311,14 @@ class Folder(pulumi.CustomResource):
|
|
|
310
311
|
import pulumi
|
|
311
312
|
import pulumi_vsphere as vsphere
|
|
312
313
|
|
|
313
|
-
datacenter = vsphere.get_datacenter()
|
|
314
|
+
datacenter = vsphere.get_datacenter(name=vsphere_datacenter)
|
|
314
315
|
folder = vsphere.Folder("folder",
|
|
315
316
|
path="test-folder",
|
|
316
317
|
type="vm",
|
|
317
318
|
datacenter_id=datacenter.id)
|
|
318
319
|
```
|
|
319
320
|
|
|
320
|
-
### Example with
|
|
321
|
+
### Example with Sub-folders
|
|
321
322
|
|
|
322
323
|
The below example builds off of the above by first creating a folder named
|
|
323
324
|
`test-parent`, and then locating `test-folder` in that
|
|
@@ -332,7 +333,7 @@ class Folder(pulumi.CustomResource):
|
|
|
332
333
|
import pulumi
|
|
333
334
|
import pulumi_vsphere as vsphere
|
|
334
335
|
|
|
335
|
-
datacenter = vsphere.get_datacenter()
|
|
336
|
+
datacenter = vsphere.get_datacenter(name=vsphere_datacenter)
|
|
336
337
|
parent = vsphere.Folder("parent",
|
|
337
338
|
path="test-parent",
|
|
338
339
|
type="vm",
|
|
@@ -349,13 +350,15 @@ class Folder(pulumi.CustomResource):
|
|
|
349
350
|
|
|
350
351
|
its full path, via the following command:
|
|
351
352
|
|
|
353
|
+
[docs-import]: https://developer.hashicorp.com/terraform/cli/import
|
|
354
|
+
|
|
352
355
|
```sh
|
|
353
|
-
$ pulumi import vsphere:index/folder:Folder folder /default-dc/vm/
|
|
356
|
+
$ pulumi import vsphere:index/folder:Folder folder /default-dc/vm/example-vm-folder
|
|
354
357
|
```
|
|
355
358
|
|
|
356
359
|
The above command would import the folder from our examples above, the VM
|
|
357
360
|
|
|
358
|
-
folder named `
|
|
361
|
+
folder named `example-vm-folder` located in the datacenter named
|
|
359
362
|
|
|
360
363
|
`default-dc`.
|
|
361
364
|
|
|
@@ -404,7 +407,7 @@ class Folder(pulumi.CustomResource):
|
|
|
404
407
|
Paths are always relative to the specific type of folder you are creating.
|
|
405
408
|
A subfolder is discovered by parsing the relative path specified in `path`, so
|
|
406
409
|
`foo/bar` will create a folder named `bar` in the parent folder `foo`, as long
|
|
407
|
-
as
|
|
410
|
+
as the folder `foo` exists.
|
|
408
411
|
|
|
409
412
|
## Example Usage
|
|
410
413
|
|
|
@@ -415,14 +418,14 @@ class Folder(pulumi.CustomResource):
|
|
|
415
418
|
import pulumi
|
|
416
419
|
import pulumi_vsphere as vsphere
|
|
417
420
|
|
|
418
|
-
datacenter = vsphere.get_datacenter()
|
|
421
|
+
datacenter = vsphere.get_datacenter(name=vsphere_datacenter)
|
|
419
422
|
folder = vsphere.Folder("folder",
|
|
420
423
|
path="test-folder",
|
|
421
424
|
type="vm",
|
|
422
425
|
datacenter_id=datacenter.id)
|
|
423
426
|
```
|
|
424
427
|
|
|
425
|
-
### Example with
|
|
428
|
+
### Example with Sub-folders
|
|
426
429
|
|
|
427
430
|
The below example builds off of the above by first creating a folder named
|
|
428
431
|
`test-parent`, and then locating `test-folder` in that
|
|
@@ -437,7 +440,7 @@ class Folder(pulumi.CustomResource):
|
|
|
437
440
|
import pulumi
|
|
438
441
|
import pulumi_vsphere as vsphere
|
|
439
442
|
|
|
440
|
-
datacenter = vsphere.get_datacenter()
|
|
443
|
+
datacenter = vsphere.get_datacenter(name=vsphere_datacenter)
|
|
441
444
|
parent = vsphere.Folder("parent",
|
|
442
445
|
path="test-parent",
|
|
443
446
|
type="vm",
|
|
@@ -454,13 +457,15 @@ class Folder(pulumi.CustomResource):
|
|
|
454
457
|
|
|
455
458
|
its full path, via the following command:
|
|
456
459
|
|
|
460
|
+
[docs-import]: https://developer.hashicorp.com/terraform/cli/import
|
|
461
|
+
|
|
457
462
|
```sh
|
|
458
|
-
$ pulumi import vsphere:index/folder:Folder folder /default-dc/vm/
|
|
463
|
+
$ pulumi import vsphere:index/folder:Folder folder /default-dc/vm/example-vm-folder
|
|
459
464
|
```
|
|
460
465
|
|
|
461
466
|
The above command would import the folder from our examples above, the VM
|
|
462
467
|
|
|
463
|
-
folder named `
|
|
468
|
+
folder named `example-vm-folder` located in the datacenter named
|
|
464
469
|
|
|
465
470
|
`default-dc`.
|
|
466
471
|
|
|
@@ -111,8 +111,6 @@ def get_compute_cluster_host_group(compute_cluster_id: Optional[builtins.str] =
|
|
|
111
111
|
:param builtins.str compute_cluster_id: The
|
|
112
112
|
[managed object reference ID][docs-about-morefs] of the compute cluster for
|
|
113
113
|
the host group.
|
|
114
|
-
|
|
115
|
-
[docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
|
|
116
114
|
:param builtins.str name: The name of the host group.
|
|
117
115
|
"""
|
|
118
116
|
__args__ = dict()
|
|
@@ -156,8 +154,6 @@ def get_compute_cluster_host_group_output(compute_cluster_id: Optional[pulumi.In
|
|
|
156
154
|
:param builtins.str compute_cluster_id: The
|
|
157
155
|
[managed object reference ID][docs-about-morefs] of the compute cluster for
|
|
158
156
|
the host group.
|
|
159
|
-
|
|
160
|
-
[docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
|
|
161
157
|
:param builtins.str name: The name of the host group.
|
|
162
158
|
"""
|
|
163
159
|
__args__ = dict()
|
|
@@ -50,7 +50,7 @@ class GetDatastoreClusterResult:
|
|
|
50
50
|
@pulumi.getter
|
|
51
51
|
def datastores(self) -> Sequence[builtins.str]:
|
|
52
52
|
"""
|
|
53
|
-
(Optional) The names of the datastores included in the specific
|
|
53
|
+
(Optional) The names of the datastores included in the specific
|
|
54
54
|
cluster.
|
|
55
55
|
"""
|
|
56
56
|
return pulumi.get(self, "datastores")
|
|
@@ -131,8 +131,6 @@ def get_datastore_stats(capacity: Optional[Mapping[str, builtins.str]] = None,
|
|
|
131
131
|
[managed object reference ID][docs-about-morefs] of the datacenter the
|
|
132
132
|
datastores are located in. For default datacenters, use the `id` attribute
|
|
133
133
|
from an empty `Datacenter` data source.
|
|
134
|
-
|
|
135
|
-
[docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
|
|
136
134
|
:param Mapping[str, builtins.str] free_space: A mapping of the free space for each datastore in the
|
|
137
135
|
datacenter, where the name of the datastore is used as key and the free space
|
|
138
136
|
as value.
|
|
@@ -190,8 +188,6 @@ def get_datastore_stats_output(capacity: Optional[pulumi.Input[Optional[Mapping[
|
|
|
190
188
|
[managed object reference ID][docs-about-morefs] of the datacenter the
|
|
191
189
|
datastores are located in. For default datacenters, use the `id` attribute
|
|
192
190
|
from an empty `Datacenter` data source.
|
|
193
|
-
|
|
194
|
-
[docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
|
|
195
191
|
:param Mapping[str, builtins.str] free_space: A mapping of the free space for each datastore in the
|
|
196
192
|
datacenter, where the name of the datastore is used as key and the free space
|
|
197
193
|
as value.
|
pulumi_vsphere/get_dynamic.py
CHANGED
|
@@ -82,8 +82,6 @@ def get_dynamic(filters: Optional[Sequence[builtins.str]] = None,
|
|
|
82
82
|
type: Optional[builtins.str] = None,
|
|
83
83
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDynamicResult:
|
|
84
84
|
"""
|
|
85
|
-
[docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
|
|
86
|
-
|
|
87
85
|
The `get_dynamic` data source can be used to get the
|
|
88
86
|
[managed object reference ID][docs-about-morefs] of any tagged managed object in
|
|
89
87
|
vCenter Server by providing a list of tag IDs and an optional regular expression
|
|
@@ -134,8 +132,6 @@ def get_dynamic_output(filters: Optional[pulumi.Input[Sequence[builtins.str]]] =
|
|
|
134
132
|
type: Optional[pulumi.Input[Optional[builtins.str]]] = None,
|
|
135
133
|
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetDynamicResult]:
|
|
136
134
|
"""
|
|
137
|
-
[docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
|
|
138
|
-
|
|
139
135
|
The `get_dynamic` data source can be used to get the
|
|
140
136
|
[managed object reference ID][docs-about-morefs] of any tagged managed object in
|
|
141
137
|
vCenter Server by providing a list of tag IDs and an optional regular expression
|