pulumi-vsphere 4.12.0a1727221820__py3-none-any.whl → 4.12.0a1727889180__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 +176 -2
- pulumi_vsphere/compute_cluster_host_group.py +62 -2
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +24 -2
- pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +36 -2
- pulumi_vsphere/compute_cluster_vm_dependency_rule.py +200 -2
- pulumi_vsphere/compute_cluster_vm_group.py +158 -2
- pulumi_vsphere/compute_cluster_vm_host_rule.py +68 -2
- pulumi_vsphere/content_library.py +98 -2
- pulumi_vsphere/content_library_item.py +138 -2
- pulumi_vsphere/custom_attribute.py +72 -2
- pulumi_vsphere/datacenter.py +14 -4
- pulumi_vsphere/datastore_cluster.py +58 -2
- pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +154 -2
- pulumi_vsphere/distributed_port_group.py +280 -2
- pulumi_vsphere/distributed_virtual_switch.py +256 -2
- pulumi_vsphere/dpm_host_override.py +58 -2
- pulumi_vsphere/drs_vm_override.py +62 -2
- pulumi_vsphere/folder.py +136 -2
- pulumi_vsphere/get_compute_cluster_host_group.py +2 -2
- pulumi_vsphere/ha_vm_override.py +158 -2
- pulumi_vsphere/host.py +250 -2
- pulumi_vsphere/host_port_group.py +12 -2
- pulumi_vsphere/host_virtual_switch.py +64 -2
- pulumi_vsphere/nas_datastore.py +62 -2
- pulumi_vsphere/pulumi-plugin.json +1 -1
- pulumi_vsphere/resource_pool.py +4 -16
- pulumi_vsphere/role.py +28 -2
- pulumi_vsphere/storage_drs_vm_override.py +128 -2
- pulumi_vsphere/tag.py +154 -2
- pulumi_vsphere/tag_category.py +78 -2
- pulumi_vsphere/vapp_container.py +158 -2
- pulumi_vsphere/vapp_entity.py +142 -2
- pulumi_vsphere/virtual_disk.py +76 -2
- pulumi_vsphere/virtual_machine.py +48 -2
- pulumi_vsphere/vmfs_datastore.py +266 -2
- pulumi_vsphere/vnic.py +14 -4
- {pulumi_vsphere-4.12.0a1727221820.dist-info → pulumi_vsphere-4.12.0a1727889180.dist-info}/METADATA +1 -1
- {pulumi_vsphere-4.12.0a1727221820.dist-info → pulumi_vsphere-4.12.0a1727889180.dist-info}/RECORD +40 -40
- {pulumi_vsphere-4.12.0a1727221820.dist-info → pulumi_vsphere-4.12.0a1727889180.dist-info}/WHEEL +0 -0
- {pulumi_vsphere-4.12.0a1727221820.dist-info → pulumi_vsphere-4.12.0a1727889180.dist-info}/top_level.txt +0 -0
|
@@ -188,7 +188,85 @@ class ComputeClusterVmGroup(pulumi.CustomResource):
|
|
|
188
188
|
virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
189
189
|
__props__=None):
|
|
190
190
|
"""
|
|
191
|
-
|
|
191
|
+
The `ComputeClusterVmGroup` resource can be used to manage groups of
|
|
192
|
+
virtual machines in a cluster, either created by the
|
|
193
|
+
[`ComputeCluster`][tf-vsphere-cluster-resource] resource or looked up
|
|
194
|
+
by the [`ComputeCluster`][tf-vsphere-cluster-data-source] data source.
|
|
195
|
+
|
|
196
|
+
[tf-vsphere-cluster-resource]: /docs/providers/vsphere/r/compute_cluster.html
|
|
197
|
+
[tf-vsphere-cluster-data-source]: /docs/providers/vsphere/d/compute_cluster.html
|
|
198
|
+
|
|
199
|
+
This resource mainly serves as an input to the
|
|
200
|
+
[`ComputeClusterVmDependencyRule`][tf-vsphere-cluster-vm-dependency-rule-resource]
|
|
201
|
+
and
|
|
202
|
+
[`ComputeClusterVmHostRule`][tf-vsphere-cluster-vm-host-rule-resource]
|
|
203
|
+
resources. See the individual resource documentation pages for more information.
|
|
204
|
+
|
|
205
|
+
[tf-vsphere-cluster-vm-dependency-rule-resource]: /docs/providers/vsphere/r/compute_cluster_vm_dependency_rule.html
|
|
206
|
+
[tf-vsphere-cluster-vm-host-rule-resource]: /docs/providers/vsphere/r/compute_cluster_vm_host_rule.html
|
|
207
|
+
|
|
208
|
+
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
209
|
+
connections.
|
|
210
|
+
|
|
211
|
+
## Example Usage
|
|
212
|
+
|
|
213
|
+
The example below creates two virtual machines in a cluster using the
|
|
214
|
+
`VirtualMachine` resource, creating the
|
|
215
|
+
virtual machine in the cluster looked up by the
|
|
216
|
+
`ComputeCluster` data source. It
|
|
217
|
+
then creates a group from these two virtual machines.
|
|
218
|
+
|
|
219
|
+
```python
|
|
220
|
+
import pulumi
|
|
221
|
+
import pulumi_vsphere as vsphere
|
|
222
|
+
|
|
223
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
224
|
+
datastore = vsphere.get_datastore(name="datastore1",
|
|
225
|
+
datacenter_id=datacenter.id)
|
|
226
|
+
cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
227
|
+
datacenter_id=datacenter.id)
|
|
228
|
+
network = vsphere.get_network(name="network1",
|
|
229
|
+
datacenter_id=datacenter.id)
|
|
230
|
+
vm = []
|
|
231
|
+
for range in [{"value": i} for i in range(0, 2)]:
|
|
232
|
+
vm.append(vsphere.VirtualMachine(f"vm-{range['value']}",
|
|
233
|
+
name=f"test-{range['value']}",
|
|
234
|
+
resource_pool_id=cluster.resource_pool_id,
|
|
235
|
+
datastore_id=datastore.id,
|
|
236
|
+
num_cpus=2,
|
|
237
|
+
memory=2048,
|
|
238
|
+
guest_id="otherLinux64Guest",
|
|
239
|
+
network_interfaces=[{
|
|
240
|
+
"network_id": network.id,
|
|
241
|
+
}],
|
|
242
|
+
disks=[{
|
|
243
|
+
"label": "disk0",
|
|
244
|
+
"size": 20,
|
|
245
|
+
}]))
|
|
246
|
+
cluster_vm_group = vsphere.ComputeClusterVmGroup("cluster_vm_group",
|
|
247
|
+
name="test-cluster-vm-group",
|
|
248
|
+
compute_cluster_id=cluster.id,
|
|
249
|
+
virtual_machine_ids=[[__item.id for __item in vm]])
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
## Import
|
|
253
|
+
|
|
254
|
+
An existing group can be imported into this resource by
|
|
255
|
+
|
|
256
|
+
supplying both the path to the cluster, and the name of the VM group. If the
|
|
257
|
+
|
|
258
|
+
name or cluster is not found, or if the group is of a different type, an error
|
|
259
|
+
|
|
260
|
+
will be returned. An example is below:
|
|
261
|
+
|
|
262
|
+
```sh
|
|
263
|
+
$ pulumi import vsphere:index/computeClusterVmGroup:ComputeClusterVmGroup cluster_vm_group \\
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
'{"compute_cluster_path": "/dc1/host/cluster1", \\
|
|
267
|
+
|
|
268
|
+
"name": "pulumi-test-cluster-vm-group"}'
|
|
269
|
+
|
|
192
270
|
:param str resource_name: The name of the resource.
|
|
193
271
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
194
272
|
:param pulumi.Input[str] compute_cluster_id: The managed object reference
|
|
@@ -216,7 +294,85 @@ class ComputeClusterVmGroup(pulumi.CustomResource):
|
|
|
216
294
|
args: ComputeClusterVmGroupArgs,
|
|
217
295
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
218
296
|
"""
|
|
219
|
-
|
|
297
|
+
The `ComputeClusterVmGroup` resource can be used to manage groups of
|
|
298
|
+
virtual machines in a cluster, either created by the
|
|
299
|
+
[`ComputeCluster`][tf-vsphere-cluster-resource] resource or looked up
|
|
300
|
+
by the [`ComputeCluster`][tf-vsphere-cluster-data-source] data source.
|
|
301
|
+
|
|
302
|
+
[tf-vsphere-cluster-resource]: /docs/providers/vsphere/r/compute_cluster.html
|
|
303
|
+
[tf-vsphere-cluster-data-source]: /docs/providers/vsphere/d/compute_cluster.html
|
|
304
|
+
|
|
305
|
+
This resource mainly serves as an input to the
|
|
306
|
+
[`ComputeClusterVmDependencyRule`][tf-vsphere-cluster-vm-dependency-rule-resource]
|
|
307
|
+
and
|
|
308
|
+
[`ComputeClusterVmHostRule`][tf-vsphere-cluster-vm-host-rule-resource]
|
|
309
|
+
resources. See the individual resource documentation pages for more information.
|
|
310
|
+
|
|
311
|
+
[tf-vsphere-cluster-vm-dependency-rule-resource]: /docs/providers/vsphere/r/compute_cluster_vm_dependency_rule.html
|
|
312
|
+
[tf-vsphere-cluster-vm-host-rule-resource]: /docs/providers/vsphere/r/compute_cluster_vm_host_rule.html
|
|
313
|
+
|
|
314
|
+
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
315
|
+
connections.
|
|
316
|
+
|
|
317
|
+
## Example Usage
|
|
318
|
+
|
|
319
|
+
The example below creates two virtual machines in a cluster using the
|
|
320
|
+
`VirtualMachine` resource, creating the
|
|
321
|
+
virtual machine in the cluster looked up by the
|
|
322
|
+
`ComputeCluster` data source. It
|
|
323
|
+
then creates a group from these two virtual machines.
|
|
324
|
+
|
|
325
|
+
```python
|
|
326
|
+
import pulumi
|
|
327
|
+
import pulumi_vsphere as vsphere
|
|
328
|
+
|
|
329
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
330
|
+
datastore = vsphere.get_datastore(name="datastore1",
|
|
331
|
+
datacenter_id=datacenter.id)
|
|
332
|
+
cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
333
|
+
datacenter_id=datacenter.id)
|
|
334
|
+
network = vsphere.get_network(name="network1",
|
|
335
|
+
datacenter_id=datacenter.id)
|
|
336
|
+
vm = []
|
|
337
|
+
for range in [{"value": i} for i in range(0, 2)]:
|
|
338
|
+
vm.append(vsphere.VirtualMachine(f"vm-{range['value']}",
|
|
339
|
+
name=f"test-{range['value']}",
|
|
340
|
+
resource_pool_id=cluster.resource_pool_id,
|
|
341
|
+
datastore_id=datastore.id,
|
|
342
|
+
num_cpus=2,
|
|
343
|
+
memory=2048,
|
|
344
|
+
guest_id="otherLinux64Guest",
|
|
345
|
+
network_interfaces=[{
|
|
346
|
+
"network_id": network.id,
|
|
347
|
+
}],
|
|
348
|
+
disks=[{
|
|
349
|
+
"label": "disk0",
|
|
350
|
+
"size": 20,
|
|
351
|
+
}]))
|
|
352
|
+
cluster_vm_group = vsphere.ComputeClusterVmGroup("cluster_vm_group",
|
|
353
|
+
name="test-cluster-vm-group",
|
|
354
|
+
compute_cluster_id=cluster.id,
|
|
355
|
+
virtual_machine_ids=[[__item.id for __item in vm]])
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
## Import
|
|
359
|
+
|
|
360
|
+
An existing group can be imported into this resource by
|
|
361
|
+
|
|
362
|
+
supplying both the path to the cluster, and the name of the VM group. If the
|
|
363
|
+
|
|
364
|
+
name or cluster is not found, or if the group is of a different type, an error
|
|
365
|
+
|
|
366
|
+
will be returned. An example is below:
|
|
367
|
+
|
|
368
|
+
```sh
|
|
369
|
+
$ pulumi import vsphere:index/computeClusterVmGroup:ComputeClusterVmGroup cluster_vm_group \\
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
'{"compute_cluster_path": "/dc1/host/cluster1", \\
|
|
373
|
+
|
|
374
|
+
"name": "pulumi-test-cluster-vm-group"}'
|
|
375
|
+
|
|
220
376
|
:param str resource_name: The name of the resource.
|
|
221
377
|
:param ComputeClusterVmGroupArgs args: The arguments to use to populate this resource's properties.
|
|
222
378
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -331,7 +331,40 @@ class ComputeClusterVmHostRule(pulumi.CustomResource):
|
|
|
331
331
|
vm_group_name: Optional[pulumi.Input[str]] = None,
|
|
332
332
|
__props__=None):
|
|
333
333
|
"""
|
|
334
|
-
|
|
334
|
+
The `ComputeClusterVmHostRule` resource can be used to manage
|
|
335
|
+
VM-to-host rules in a cluster, either created by the
|
|
336
|
+
`ComputeCluster` resource or looked up
|
|
337
|
+
by the `ComputeCluster` data source.
|
|
338
|
+
|
|
339
|
+
This resource can create both _affinity rules_, where virtual machines run on
|
|
340
|
+
specified hosts, or _anti-affinity_ rules, where virtual machines run on hosts
|
|
341
|
+
outside of the ones specified in the rule. Virtual machines and hosts are
|
|
342
|
+
supplied via groups, which can be managed via the
|
|
343
|
+
`ComputeClusterVmGroup` and
|
|
344
|
+
`ComputeClusterHostGroup`
|
|
345
|
+
resources.
|
|
346
|
+
|
|
347
|
+
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
348
|
+
connections.
|
|
349
|
+
|
|
350
|
+
## Import
|
|
351
|
+
|
|
352
|
+
An existing rule can be imported into this resource by supplying
|
|
353
|
+
|
|
354
|
+
both the path to the cluster, and the name the rule. If the name or cluster is
|
|
355
|
+
|
|
356
|
+
not found, or if the rule is of a different type, an error will be returned. An
|
|
357
|
+
|
|
358
|
+
example is below:
|
|
359
|
+
|
|
360
|
+
```sh
|
|
361
|
+
$ pulumi import vsphere:index/computeClusterVmHostRule:ComputeClusterVmHostRule cluster_vm_host_rule \\
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
'{"compute_cluster_path": "/dc1/host/cluster1", \\
|
|
365
|
+
|
|
366
|
+
"name": "pulumi-test-cluster-vm-host-rule"}'
|
|
367
|
+
|
|
335
368
|
:param str resource_name: The name of the resource.
|
|
336
369
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
337
370
|
:param pulumi.Input[str] affinity_host_group_name: When this field is used, the virtual
|
|
@@ -366,7 +399,40 @@ class ComputeClusterVmHostRule(pulumi.CustomResource):
|
|
|
366
399
|
args: ComputeClusterVmHostRuleArgs,
|
|
367
400
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
368
401
|
"""
|
|
369
|
-
|
|
402
|
+
The `ComputeClusterVmHostRule` resource can be used to manage
|
|
403
|
+
VM-to-host rules in a cluster, either created by the
|
|
404
|
+
`ComputeCluster` resource or looked up
|
|
405
|
+
by the `ComputeCluster` data source.
|
|
406
|
+
|
|
407
|
+
This resource can create both _affinity rules_, where virtual machines run on
|
|
408
|
+
specified hosts, or _anti-affinity_ rules, where virtual machines run on hosts
|
|
409
|
+
outside of the ones specified in the rule. Virtual machines and hosts are
|
|
410
|
+
supplied via groups, which can be managed via the
|
|
411
|
+
`ComputeClusterVmGroup` and
|
|
412
|
+
`ComputeClusterHostGroup`
|
|
413
|
+
resources.
|
|
414
|
+
|
|
415
|
+
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
416
|
+
connections.
|
|
417
|
+
|
|
418
|
+
## Import
|
|
419
|
+
|
|
420
|
+
An existing rule can be imported into this resource by supplying
|
|
421
|
+
|
|
422
|
+
both the path to the cluster, and the name the rule. If the name or cluster is
|
|
423
|
+
|
|
424
|
+
not found, or if the rule is of a different type, an error will be returned. An
|
|
425
|
+
|
|
426
|
+
example is below:
|
|
427
|
+
|
|
428
|
+
```sh
|
|
429
|
+
$ pulumi import vsphere:index/computeClusterVmHostRule:ComputeClusterVmHostRule cluster_vm_host_rule \\
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
'{"compute_cluster_path": "/dc1/host/cluster1", \\
|
|
433
|
+
|
|
434
|
+
"name": "pulumi-test-cluster-vm-host-rule"}'
|
|
435
|
+
|
|
370
436
|
:param str resource_name: The name of the resource.
|
|
371
437
|
:param ComputeClusterVmHostRuleArgs args: The arguments to use to populate this resource's properties.
|
|
372
438
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -200,7 +200,55 @@ class ContentLibrary(pulumi.CustomResource):
|
|
|
200
200
|
subscription: Optional[pulumi.Input[Union['ContentLibrarySubscriptionArgs', 'ContentLibrarySubscriptionArgsDict']]] = None,
|
|
201
201
|
__props__=None):
|
|
202
202
|
"""
|
|
203
|
-
|
|
203
|
+
The `ContentLibrary` resource can be used to manage content libraries.
|
|
204
|
+
|
|
205
|
+
> **NOTE:** This resource requires a vCenter Server instance and is not available on direct ESXi host connections.
|
|
206
|
+
|
|
207
|
+
## Example Usage
|
|
208
|
+
|
|
209
|
+
The following example creates a publishing content library using the datastore named `publisher-datastore` as the storage backing.
|
|
210
|
+
|
|
211
|
+
```python
|
|
212
|
+
import pulumi
|
|
213
|
+
import pulumi_vsphere as vsphere
|
|
214
|
+
|
|
215
|
+
datacenter_a = vsphere.get_datacenter(name="dc-01-a")
|
|
216
|
+
publisher_datastore = vsphere.get_datastore(name="publisher-datastore",
|
|
217
|
+
datacenter_id=datacenter_a.id)
|
|
218
|
+
publisher_content_library = vsphere.ContentLibrary("publisher_content_library",
|
|
219
|
+
name="Publisher Content Library",
|
|
220
|
+
description="A publishing content library.",
|
|
221
|
+
storage_backings=[publisher_datastore.id])
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
The next example creates a subscribed content library using the URL of the publisher content library as the source and the datastore named `subscriber-datastore` as the storage backing.
|
|
225
|
+
|
|
226
|
+
```python
|
|
227
|
+
import pulumi
|
|
228
|
+
import pulumi_vsphere as vsphere
|
|
229
|
+
|
|
230
|
+
datacenter_b = vsphere.get_datacenter(name="dc-01-b")
|
|
231
|
+
subscriber_datastore = vsphere.get_datastore(name="subscriber-datastore",
|
|
232
|
+
datacenter_id=datacenter_b.id)
|
|
233
|
+
subscriber_content_library = vsphere.ContentLibrary("subscriber_content_library",
|
|
234
|
+
name="Subscriber Content Library",
|
|
235
|
+
description="A subscribing content library.",
|
|
236
|
+
storage_backings=[subscriber_datastore.id],
|
|
237
|
+
subscription={
|
|
238
|
+
"subscription_url": "https://vc-01-a.example.com:443/cls/vcsp/lib/f42a4b25-844a-44ec-9063-a3a5e9cc88c7/lib.json",
|
|
239
|
+
"automatic_sync": True,
|
|
240
|
+
"on_demand": False,
|
|
241
|
+
})
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## Import
|
|
245
|
+
|
|
246
|
+
An existing content library can be imported into this resource by supplying the content library ID. For example:
|
|
247
|
+
|
|
248
|
+
```sh
|
|
249
|
+
$ pulumi import vsphere:index/contentLibrary:ContentLibrary vsphere_content_library publisher_content_library f42a4b25-844a-44ec-9063-a3a5e9cc88c7
|
|
250
|
+
```
|
|
251
|
+
|
|
204
252
|
:param str resource_name: The name of the resource.
|
|
205
253
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
206
254
|
:param pulumi.Input[str] description: A description for the content library.
|
|
@@ -216,7 +264,55 @@ class ContentLibrary(pulumi.CustomResource):
|
|
|
216
264
|
args: ContentLibraryArgs,
|
|
217
265
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
218
266
|
"""
|
|
219
|
-
|
|
267
|
+
The `ContentLibrary` resource can be used to manage content libraries.
|
|
268
|
+
|
|
269
|
+
> **NOTE:** This resource requires a vCenter Server instance and is not available on direct ESXi host connections.
|
|
270
|
+
|
|
271
|
+
## Example Usage
|
|
272
|
+
|
|
273
|
+
The following example creates a publishing content library using the datastore named `publisher-datastore` as the storage backing.
|
|
274
|
+
|
|
275
|
+
```python
|
|
276
|
+
import pulumi
|
|
277
|
+
import pulumi_vsphere as vsphere
|
|
278
|
+
|
|
279
|
+
datacenter_a = vsphere.get_datacenter(name="dc-01-a")
|
|
280
|
+
publisher_datastore = vsphere.get_datastore(name="publisher-datastore",
|
|
281
|
+
datacenter_id=datacenter_a.id)
|
|
282
|
+
publisher_content_library = vsphere.ContentLibrary("publisher_content_library",
|
|
283
|
+
name="Publisher Content Library",
|
|
284
|
+
description="A publishing content library.",
|
|
285
|
+
storage_backings=[publisher_datastore.id])
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
The next example creates a subscribed content library using the URL of the publisher content library as the source and the datastore named `subscriber-datastore` as the storage backing.
|
|
289
|
+
|
|
290
|
+
```python
|
|
291
|
+
import pulumi
|
|
292
|
+
import pulumi_vsphere as vsphere
|
|
293
|
+
|
|
294
|
+
datacenter_b = vsphere.get_datacenter(name="dc-01-b")
|
|
295
|
+
subscriber_datastore = vsphere.get_datastore(name="subscriber-datastore",
|
|
296
|
+
datacenter_id=datacenter_b.id)
|
|
297
|
+
subscriber_content_library = vsphere.ContentLibrary("subscriber_content_library",
|
|
298
|
+
name="Subscriber Content Library",
|
|
299
|
+
description="A subscribing content library.",
|
|
300
|
+
storage_backings=[subscriber_datastore.id],
|
|
301
|
+
subscription={
|
|
302
|
+
"subscription_url": "https://vc-01-a.example.com:443/cls/vcsp/lib/f42a4b25-844a-44ec-9063-a3a5e9cc88c7/lib.json",
|
|
303
|
+
"automatic_sync": True,
|
|
304
|
+
"on_demand": False,
|
|
305
|
+
})
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
## Import
|
|
309
|
+
|
|
310
|
+
An existing content library can be imported into this resource by supplying the content library ID. For example:
|
|
311
|
+
|
|
312
|
+
```sh
|
|
313
|
+
$ pulumi import vsphere:index/contentLibrary:ContentLibrary vsphere_content_library publisher_content_library f42a4b25-844a-44ec-9063-a3a5e9cc88c7
|
|
314
|
+
```
|
|
315
|
+
|
|
220
316
|
:param str resource_name: The name of the resource.
|
|
221
317
|
:param ContentLibraryArgs args: The arguments to use to populate this resource's properties.
|
|
222
318
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -235,7 +235,75 @@ class ContentLibraryItem(pulumi.CustomResource):
|
|
|
235
235
|
type: Optional[pulumi.Input[str]] = None,
|
|
236
236
|
__props__=None):
|
|
237
237
|
"""
|
|
238
|
-
|
|
238
|
+
The `ContentLibraryItem` resource can be used to create items in a
|
|
239
|
+
vSphere content library. The `file_url` must be accessible from the vSphere
|
|
240
|
+
environment as it will be downloaded from the specified location and stored
|
|
241
|
+
on the content library's storage backing.
|
|
242
|
+
|
|
243
|
+
## Example Usage
|
|
244
|
+
|
|
245
|
+
The first example below imports an OVF Template to a content
|
|
246
|
+
library.
|
|
247
|
+
|
|
248
|
+
```python
|
|
249
|
+
import pulumi
|
|
250
|
+
import pulumi_vsphere as vsphere
|
|
251
|
+
|
|
252
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
253
|
+
content_library = vsphere.get_content_library(name="clb-01")
|
|
254
|
+
content_library_item = vsphere.ContentLibraryItem("content_library_item",
|
|
255
|
+
name="ovf-linux-ubuntu-server-lts",
|
|
256
|
+
description="Ubuntu Server LTS OVF Template",
|
|
257
|
+
file_url="https://releases.example.com/ubuntu/ubuntu/ubuntu-live-server-amd64.ovf",
|
|
258
|
+
library_id=content_library.id)
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
The next example imports an .iso image to a content library.
|
|
262
|
+
|
|
263
|
+
[tf-vsphere-vm-resource]: /docs/providers/vsphere/r/virtual_machine.html
|
|
264
|
+
|
|
265
|
+
```python
|
|
266
|
+
import pulumi
|
|
267
|
+
import pulumi_vsphere as vsphere
|
|
268
|
+
|
|
269
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
270
|
+
content_library = vsphere.get_content_library(name="clb-01")
|
|
271
|
+
content_library_item = vsphere.ContentLibraryItem("content_library_item",
|
|
272
|
+
name="iso-linux-ubuntu-server-lts",
|
|
273
|
+
description="Ubuntu Server LTS .iso",
|
|
274
|
+
type="iso",
|
|
275
|
+
file_url="https://releases.example.com/ubuntu/ubuntu-live-server-amd64.iso",
|
|
276
|
+
library_id=content_library.id)
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
The last example imports a virtual machine image to a content library from an
|
|
280
|
+
existing virtual machine.
|
|
281
|
+
|
|
282
|
+
[tf-vsphere-vm-resource]: /docs/providers/vsphere/r/virtual_machine.html
|
|
283
|
+
|
|
284
|
+
```python
|
|
285
|
+
import pulumi
|
|
286
|
+
import pulumi_vsphere as vsphere
|
|
287
|
+
|
|
288
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
289
|
+
content_library = vsphere.get_content_library(name="clb-01")
|
|
290
|
+
content_library_item = vsphere.ContentLibraryItem("content_library_item",
|
|
291
|
+
name="tpl-linux-ubuntu-server-lts",
|
|
292
|
+
description="Ubuntu Server LTS",
|
|
293
|
+
source_uuid="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
|
294
|
+
library_id=content_library.id)
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
## Import
|
|
298
|
+
|
|
299
|
+
An existing content library item can be imported into this resource by
|
|
300
|
+
|
|
301
|
+
supplying the content library ID. An example is below:
|
|
302
|
+
|
|
303
|
+
```sh
|
|
304
|
+
$ pulumi import vsphere:index/contentLibraryItem:ContentLibraryItem vsphere_content_library_item iso-linux-ubuntu-server-lts xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
|
305
|
+
```
|
|
306
|
+
|
|
239
307
|
:param str resource_name: The name of the resource.
|
|
240
308
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
241
309
|
:param pulumi.Input[str] description: A description for the content library item.
|
|
@@ -253,7 +321,75 @@ class ContentLibraryItem(pulumi.CustomResource):
|
|
|
253
321
|
args: ContentLibraryItemArgs,
|
|
254
322
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
255
323
|
"""
|
|
256
|
-
|
|
324
|
+
The `ContentLibraryItem` resource can be used to create items in a
|
|
325
|
+
vSphere content library. The `file_url` must be accessible from the vSphere
|
|
326
|
+
environment as it will be downloaded from the specified location and stored
|
|
327
|
+
on the content library's storage backing.
|
|
328
|
+
|
|
329
|
+
## Example Usage
|
|
330
|
+
|
|
331
|
+
The first example below imports an OVF Template to a content
|
|
332
|
+
library.
|
|
333
|
+
|
|
334
|
+
```python
|
|
335
|
+
import pulumi
|
|
336
|
+
import pulumi_vsphere as vsphere
|
|
337
|
+
|
|
338
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
339
|
+
content_library = vsphere.get_content_library(name="clb-01")
|
|
340
|
+
content_library_item = vsphere.ContentLibraryItem("content_library_item",
|
|
341
|
+
name="ovf-linux-ubuntu-server-lts",
|
|
342
|
+
description="Ubuntu Server LTS OVF Template",
|
|
343
|
+
file_url="https://releases.example.com/ubuntu/ubuntu/ubuntu-live-server-amd64.ovf",
|
|
344
|
+
library_id=content_library.id)
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
The next example imports an .iso image to a content library.
|
|
348
|
+
|
|
349
|
+
[tf-vsphere-vm-resource]: /docs/providers/vsphere/r/virtual_machine.html
|
|
350
|
+
|
|
351
|
+
```python
|
|
352
|
+
import pulumi
|
|
353
|
+
import pulumi_vsphere as vsphere
|
|
354
|
+
|
|
355
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
356
|
+
content_library = vsphere.get_content_library(name="clb-01")
|
|
357
|
+
content_library_item = vsphere.ContentLibraryItem("content_library_item",
|
|
358
|
+
name="iso-linux-ubuntu-server-lts",
|
|
359
|
+
description="Ubuntu Server LTS .iso",
|
|
360
|
+
type="iso",
|
|
361
|
+
file_url="https://releases.example.com/ubuntu/ubuntu-live-server-amd64.iso",
|
|
362
|
+
library_id=content_library.id)
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
The last example imports a virtual machine image to a content library from an
|
|
366
|
+
existing virtual machine.
|
|
367
|
+
|
|
368
|
+
[tf-vsphere-vm-resource]: /docs/providers/vsphere/r/virtual_machine.html
|
|
369
|
+
|
|
370
|
+
```python
|
|
371
|
+
import pulumi
|
|
372
|
+
import pulumi_vsphere as vsphere
|
|
373
|
+
|
|
374
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
375
|
+
content_library = vsphere.get_content_library(name="clb-01")
|
|
376
|
+
content_library_item = vsphere.ContentLibraryItem("content_library_item",
|
|
377
|
+
name="tpl-linux-ubuntu-server-lts",
|
|
378
|
+
description="Ubuntu Server LTS",
|
|
379
|
+
source_uuid="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
|
380
|
+
library_id=content_library.id)
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
## Import
|
|
384
|
+
|
|
385
|
+
An existing content library item can be imported into this resource by
|
|
386
|
+
|
|
387
|
+
supplying the content library ID. An example is below:
|
|
388
|
+
|
|
389
|
+
```sh
|
|
390
|
+
$ pulumi import vsphere:index/contentLibraryItem:ContentLibraryItem vsphere_content_library_item iso-linux-ubuntu-server-lts xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
|
391
|
+
```
|
|
392
|
+
|
|
257
393
|
:param str resource_name: The name of the resource.
|
|
258
394
|
:param ContentLibraryItemArgs args: The arguments to use to populate this resource's properties.
|
|
259
395
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -108,7 +108,42 @@ class CustomAttribute(pulumi.CustomResource):
|
|
|
108
108
|
name: Optional[pulumi.Input[str]] = None,
|
|
109
109
|
__props__=None):
|
|
110
110
|
"""
|
|
111
|
-
|
|
111
|
+
The `CustomAttribute` resource can be used to create and manage custom
|
|
112
|
+
attributes, which allow users to associate user-specific meta-information with
|
|
113
|
+
vSphere managed objects. Custom attribute values must be strings and are stored
|
|
114
|
+
on the vCenter Server and not the managed object.
|
|
115
|
+
|
|
116
|
+
For more information about custom attributes, click [here][ext-custom-attributes].
|
|
117
|
+
|
|
118
|
+
[ext-custom-attributes]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-73606C4C-763C-4E27-A1DA-032E4C46219D.html
|
|
119
|
+
|
|
120
|
+
> **NOTE:** Custom attributes are unsupported on direct ESXi host connections
|
|
121
|
+
and require vCenter Server.
|
|
122
|
+
|
|
123
|
+
## Example Usage
|
|
124
|
+
|
|
125
|
+
This example creates a custom attribute named `test-attribute`. The
|
|
126
|
+
resulting custom attribute can be assigned to VMs only.
|
|
127
|
+
|
|
128
|
+
```python
|
|
129
|
+
import pulumi
|
|
130
|
+
import pulumi_vsphere as vsphere
|
|
131
|
+
|
|
132
|
+
attribute = vsphere.CustomAttribute("attribute",
|
|
133
|
+
name="test-attribute",
|
|
134
|
+
managed_object_type="VirtualMachine")
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Import
|
|
138
|
+
|
|
139
|
+
An existing custom attribute can be imported into this resource
|
|
140
|
+
|
|
141
|
+
via its name, using the following command:
|
|
142
|
+
|
|
143
|
+
```sh
|
|
144
|
+
$ pulumi import vsphere:index/customAttribute:CustomAttribute attribute terraform-test-attribute
|
|
145
|
+
```
|
|
146
|
+
|
|
112
147
|
:param str resource_name: The name of the resource.
|
|
113
148
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
114
149
|
:param pulumi.Input[str] managed_object_type: The object type that this attribute may be
|
|
@@ -123,7 +158,42 @@ class CustomAttribute(pulumi.CustomResource):
|
|
|
123
158
|
args: Optional[CustomAttributeArgs] = None,
|
|
124
159
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
125
160
|
"""
|
|
126
|
-
|
|
161
|
+
The `CustomAttribute` resource can be used to create and manage custom
|
|
162
|
+
attributes, which allow users to associate user-specific meta-information with
|
|
163
|
+
vSphere managed objects. Custom attribute values must be strings and are stored
|
|
164
|
+
on the vCenter Server and not the managed object.
|
|
165
|
+
|
|
166
|
+
For more information about custom attributes, click [here][ext-custom-attributes].
|
|
167
|
+
|
|
168
|
+
[ext-custom-attributes]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-73606C4C-763C-4E27-A1DA-032E4C46219D.html
|
|
169
|
+
|
|
170
|
+
> **NOTE:** Custom attributes are unsupported on direct ESXi host connections
|
|
171
|
+
and require vCenter Server.
|
|
172
|
+
|
|
173
|
+
## Example Usage
|
|
174
|
+
|
|
175
|
+
This example creates a custom attribute named `test-attribute`. The
|
|
176
|
+
resulting custom attribute can be assigned to VMs only.
|
|
177
|
+
|
|
178
|
+
```python
|
|
179
|
+
import pulumi
|
|
180
|
+
import pulumi_vsphere as vsphere
|
|
181
|
+
|
|
182
|
+
attribute = vsphere.CustomAttribute("attribute",
|
|
183
|
+
name="test-attribute",
|
|
184
|
+
managed_object_type="VirtualMachine")
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Import
|
|
188
|
+
|
|
189
|
+
An existing custom attribute can be imported into this resource
|
|
190
|
+
|
|
191
|
+
via its name, using the following command:
|
|
192
|
+
|
|
193
|
+
```sh
|
|
194
|
+
$ pulumi import vsphere:index/customAttribute:CustomAttribute attribute terraform-test-attribute
|
|
195
|
+
```
|
|
196
|
+
|
|
127
197
|
:param str resource_name: The name of the resource.
|
|
128
198
|
:param CustomAttributeArgs args: The arguments to use to populate this resource's properties.
|
|
129
199
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
pulumi_vsphere/datacenter.py
CHANGED
|
@@ -247,13 +247,18 @@ class Datacenter(pulumi.CustomResource):
|
|
|
247
247
|
folder="/research/")
|
|
248
248
|
```
|
|
249
249
|
|
|
250
|
-
##
|
|
250
|
+
## Import
|
|
251
|
+
|
|
252
|
+
An existing datacenter can be imported into this resource
|
|
251
253
|
|
|
252
|
-
An existing datacenter can be [imported][docs-import] into this resource
|
|
253
254
|
via supplying the full path to the datacenter. An example is below:
|
|
254
255
|
|
|
255
256
|
[docs-import]: /docs/import/index.html
|
|
256
257
|
|
|
258
|
+
```sh
|
|
259
|
+
$ pulumi import vsphere:index/datacenter:Datacenter dc /dc1
|
|
260
|
+
```
|
|
261
|
+
|
|
257
262
|
The above would import the datacenter named `dc1`.
|
|
258
263
|
|
|
259
264
|
:param str resource_name: The name of the resource.
|
|
@@ -305,13 +310,18 @@ class Datacenter(pulumi.CustomResource):
|
|
|
305
310
|
folder="/research/")
|
|
306
311
|
```
|
|
307
312
|
|
|
308
|
-
##
|
|
313
|
+
## Import
|
|
314
|
+
|
|
315
|
+
An existing datacenter can be imported into this resource
|
|
309
316
|
|
|
310
|
-
An existing datacenter can be [imported][docs-import] into this resource
|
|
311
317
|
via supplying the full path to the datacenter. An example is below:
|
|
312
318
|
|
|
313
319
|
[docs-import]: /docs/import/index.html
|
|
314
320
|
|
|
321
|
+
```sh
|
|
322
|
+
$ pulumi import vsphere:index/datacenter:Datacenter dc /dc1
|
|
323
|
+
```
|
|
324
|
+
|
|
315
325
|
The above would import the datacenter named `dc1`.
|
|
316
326
|
|
|
317
327
|
:param str resource_name: The name of the resource.
|