pulumi-vsphere 4.12.0a1726827470__py3-none-any.whl → 4.12.0a1727848995__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.0a1726827470.dist-info → pulumi_vsphere-4.12.0a1727848995.dist-info}/METADATA +1 -1
- {pulumi_vsphere-4.12.0a1726827470.dist-info → pulumi_vsphere-4.12.0a1727848995.dist-info}/RECORD +40 -40
- {pulumi_vsphere-4.12.0a1726827470.dist-info → pulumi_vsphere-4.12.0a1727848995.dist-info}/WHEEL +0 -0
- {pulumi_vsphere-4.12.0a1726827470.dist-info → pulumi_vsphere-4.12.0a1727848995.dist-info}/top_level.txt +0 -0
pulumi_vsphere/role.py
CHANGED
|
@@ -116,7 +116,20 @@ class Role(pulumi.CustomResource):
|
|
|
116
116
|
role_privileges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
117
117
|
__props__=None):
|
|
118
118
|
"""
|
|
119
|
-
|
|
119
|
+
## Import
|
|
120
|
+
|
|
121
|
+
An existing role can be imported into this resource by supplying the role id. An example is below:
|
|
122
|
+
|
|
123
|
+
```sh
|
|
124
|
+
$ pulumi import vsphere:index/role:Role role1 -709298051
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Use [`vsphere_role` data source][ref-vsphere-role-data-source]
|
|
128
|
+
|
|
129
|
+
to read information about system roles.
|
|
130
|
+
|
|
131
|
+
[ref-vsphere-role-data-source]: /docs/providers/vsphere/d/vsphere_role.html
|
|
132
|
+
|
|
120
133
|
:param str resource_name: The name of the resource.
|
|
121
134
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
122
135
|
:param pulumi.Input[str] name: The name of the role.
|
|
@@ -129,7 +142,20 @@ class Role(pulumi.CustomResource):
|
|
|
129
142
|
args: Optional[RoleArgs] = None,
|
|
130
143
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
131
144
|
"""
|
|
132
|
-
|
|
145
|
+
## Import
|
|
146
|
+
|
|
147
|
+
An existing role can be imported into this resource by supplying the role id. An example is below:
|
|
148
|
+
|
|
149
|
+
```sh
|
|
150
|
+
$ pulumi import vsphere:index/role:Role role1 -709298051
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Use [`vsphere_role` data source][ref-vsphere-role-data-source]
|
|
154
|
+
|
|
155
|
+
to read information about system roles.
|
|
156
|
+
|
|
157
|
+
[ref-vsphere-role-data-source]: /docs/providers/vsphere/d/vsphere_role.html
|
|
158
|
+
|
|
133
159
|
:param str resource_name: The name of the resource.
|
|
134
160
|
:param RoleArgs args: The arguments to use to populate this resource's properties.
|
|
135
161
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -245,7 +245,70 @@ class StorageDrsVmOverride(pulumi.CustomResource):
|
|
|
245
245
|
virtual_machine_id: Optional[pulumi.Input[str]] = None,
|
|
246
246
|
__props__=None):
|
|
247
247
|
"""
|
|
248
|
-
|
|
248
|
+
The `StorageDrsVmOverride` resource can be used to add a Storage DRS
|
|
249
|
+
override to a datastore cluster for a specific virtual machine. With this
|
|
250
|
+
resource, one can enable or disable Storage DRS, and control the automation
|
|
251
|
+
level and disk affinity for a single virtual machine without affecting the rest
|
|
252
|
+
of the datastore cluster.
|
|
253
|
+
|
|
254
|
+
For more information on vSphere datastore clusters and Storage DRS, see [this
|
|
255
|
+
page][ref-vsphere-datastore-clusters].
|
|
256
|
+
|
|
257
|
+
[ref-vsphere-datastore-clusters]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-598DF695-107E-406B-9C95-0AF961FC227A.html
|
|
258
|
+
|
|
259
|
+
## Example Usage
|
|
260
|
+
|
|
261
|
+
```python
|
|
262
|
+
import pulumi
|
|
263
|
+
import pulumi_vsphere as vsphere
|
|
264
|
+
|
|
265
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
266
|
+
datastore_cluster = vsphere.get_datastore_cluster(name="datastore-cluster1",
|
|
267
|
+
datacenter_id=datacenter.id)
|
|
268
|
+
member_datastore = vsphere.get_datastore(name="datastore-cluster1-member1",
|
|
269
|
+
datacenter_id=datacenter.id)
|
|
270
|
+
pool = vsphere.get_resource_pool(name="cluster1/Resources",
|
|
271
|
+
datacenter_id=datacenter.id)
|
|
272
|
+
network = vsphere.get_network(name="public",
|
|
273
|
+
datacenter_id=datacenter.id)
|
|
274
|
+
vm = vsphere.VirtualMachine("vm",
|
|
275
|
+
name="test",
|
|
276
|
+
resource_pool_id=pool.id,
|
|
277
|
+
datastore_id=member_datastore.id,
|
|
278
|
+
num_cpus=2,
|
|
279
|
+
memory=1024,
|
|
280
|
+
guest_id="otherLinux64Guest",
|
|
281
|
+
network_interfaces=[{
|
|
282
|
+
"network_id": network.id,
|
|
283
|
+
}],
|
|
284
|
+
disks=[{
|
|
285
|
+
"label": "disk0",
|
|
286
|
+
"size": 20,
|
|
287
|
+
}])
|
|
288
|
+
drs_vm_override = vsphere.StorageDrsVmOverride("drs_vm_override",
|
|
289
|
+
datastore_cluster_id=datastore_cluster.id,
|
|
290
|
+
virtual_machine_id=vm.id,
|
|
291
|
+
sdrs_enabled="false")
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
## Import
|
|
295
|
+
|
|
296
|
+
An existing override can be imported into this resource by
|
|
297
|
+
|
|
298
|
+
supplying both the path to the datastore cluster and the path to the virtual
|
|
299
|
+
|
|
300
|
+
machine to `pulumi import`. If no override exists, an error will be given.
|
|
301
|
+
|
|
302
|
+
An example is below:
|
|
303
|
+
|
|
304
|
+
```sh
|
|
305
|
+
$ pulumi import vsphere:index/storageDrsVmOverride:StorageDrsVmOverride drs_vm_override \\
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
'{"datastore_cluster_path": "/dc1/datastore/ds-cluster", \\
|
|
309
|
+
|
|
310
|
+
"virtual_machine_path": "/dc1/vm/srv1"}'
|
|
311
|
+
|
|
249
312
|
:param str resource_name: The name of the resource.
|
|
250
313
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
251
314
|
:param pulumi.Input[str] datastore_cluster_id: The managed object reference
|
|
@@ -273,7 +336,70 @@ class StorageDrsVmOverride(pulumi.CustomResource):
|
|
|
273
336
|
args: StorageDrsVmOverrideArgs,
|
|
274
337
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
275
338
|
"""
|
|
276
|
-
|
|
339
|
+
The `StorageDrsVmOverride` resource can be used to add a Storage DRS
|
|
340
|
+
override to a datastore cluster for a specific virtual machine. With this
|
|
341
|
+
resource, one can enable or disable Storage DRS, and control the automation
|
|
342
|
+
level and disk affinity for a single virtual machine without affecting the rest
|
|
343
|
+
of the datastore cluster.
|
|
344
|
+
|
|
345
|
+
For more information on vSphere datastore clusters and Storage DRS, see [this
|
|
346
|
+
page][ref-vsphere-datastore-clusters].
|
|
347
|
+
|
|
348
|
+
[ref-vsphere-datastore-clusters]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-598DF695-107E-406B-9C95-0AF961FC227A.html
|
|
349
|
+
|
|
350
|
+
## Example Usage
|
|
351
|
+
|
|
352
|
+
```python
|
|
353
|
+
import pulumi
|
|
354
|
+
import pulumi_vsphere as vsphere
|
|
355
|
+
|
|
356
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
357
|
+
datastore_cluster = vsphere.get_datastore_cluster(name="datastore-cluster1",
|
|
358
|
+
datacenter_id=datacenter.id)
|
|
359
|
+
member_datastore = vsphere.get_datastore(name="datastore-cluster1-member1",
|
|
360
|
+
datacenter_id=datacenter.id)
|
|
361
|
+
pool = vsphere.get_resource_pool(name="cluster1/Resources",
|
|
362
|
+
datacenter_id=datacenter.id)
|
|
363
|
+
network = vsphere.get_network(name="public",
|
|
364
|
+
datacenter_id=datacenter.id)
|
|
365
|
+
vm = vsphere.VirtualMachine("vm",
|
|
366
|
+
name="test",
|
|
367
|
+
resource_pool_id=pool.id,
|
|
368
|
+
datastore_id=member_datastore.id,
|
|
369
|
+
num_cpus=2,
|
|
370
|
+
memory=1024,
|
|
371
|
+
guest_id="otherLinux64Guest",
|
|
372
|
+
network_interfaces=[{
|
|
373
|
+
"network_id": network.id,
|
|
374
|
+
}],
|
|
375
|
+
disks=[{
|
|
376
|
+
"label": "disk0",
|
|
377
|
+
"size": 20,
|
|
378
|
+
}])
|
|
379
|
+
drs_vm_override = vsphere.StorageDrsVmOverride("drs_vm_override",
|
|
380
|
+
datastore_cluster_id=datastore_cluster.id,
|
|
381
|
+
virtual_machine_id=vm.id,
|
|
382
|
+
sdrs_enabled="false")
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
## Import
|
|
386
|
+
|
|
387
|
+
An existing override can be imported into this resource by
|
|
388
|
+
|
|
389
|
+
supplying both the path to the datastore cluster and the path to the virtual
|
|
390
|
+
|
|
391
|
+
machine to `pulumi import`. If no override exists, an error will be given.
|
|
392
|
+
|
|
393
|
+
An example is below:
|
|
394
|
+
|
|
395
|
+
```sh
|
|
396
|
+
$ pulumi import vsphere:index/storageDrsVmOverride:StorageDrsVmOverride drs_vm_override \\
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
'{"datastore_cluster_path": "/dc1/datastore/ds-cluster", \\
|
|
400
|
+
|
|
401
|
+
"virtual_machine_path": "/dc1/vm/srv1"}'
|
|
402
|
+
|
|
277
403
|
:param str resource_name: The name of the resource.
|
|
278
404
|
:param StorageDrsVmOverrideArgs args: The arguments to use to populate this resource's properties.
|
|
279
405
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
pulumi_vsphere/tag.py
CHANGED
|
@@ -140,7 +140,83 @@ class Tag(pulumi.CustomResource):
|
|
|
140
140
|
name: Optional[pulumi.Input[str]] = None,
|
|
141
141
|
__props__=None):
|
|
142
142
|
"""
|
|
143
|
-
|
|
143
|
+
The `Tag` resource can be used to create and manage tags, which allow
|
|
144
|
+
you to attach metadata to objects in the vSphere inventory to make these
|
|
145
|
+
objects more sortable and searchable.
|
|
146
|
+
|
|
147
|
+
For more information about tags, click [here][ext-tags-general].
|
|
148
|
+
|
|
149
|
+
[ext-tags-general]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-E8E854DD-AA97-4E0C-8419-CE84F93C4058.html
|
|
150
|
+
|
|
151
|
+
## Example Usage
|
|
152
|
+
|
|
153
|
+
This example creates a tag named `test-tag`. This tag is assigned the
|
|
154
|
+
`test-category` category, which was created by the
|
|
155
|
+
`TagCategory` resource. The resulting
|
|
156
|
+
tag can be assigned to VMs and datastores only, and can be the only value in
|
|
157
|
+
the category that can be assigned, as per the restrictions defined by the
|
|
158
|
+
category.
|
|
159
|
+
|
|
160
|
+
```python
|
|
161
|
+
import pulumi
|
|
162
|
+
import pulumi_vsphere as vsphere
|
|
163
|
+
|
|
164
|
+
category = vsphere.TagCategory("category",
|
|
165
|
+
name="test-category",
|
|
166
|
+
cardinality="SINGLE",
|
|
167
|
+
description="Managed by Pulumi",
|
|
168
|
+
associable_types=[
|
|
169
|
+
"VirtualMachine",
|
|
170
|
+
"Datastore",
|
|
171
|
+
])
|
|
172
|
+
tag = vsphere.Tag("tag",
|
|
173
|
+
name="test-tag",
|
|
174
|
+
category_id=category.id,
|
|
175
|
+
description="Managed by Pulumi")
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Using Tags in a Supported Resource
|
|
179
|
+
|
|
180
|
+
Tags can be applied to vSphere resources via the `tags` argument
|
|
181
|
+
in any supported resource.
|
|
182
|
+
|
|
183
|
+
The following example builds on the above example by creating a
|
|
184
|
+
`VirtualMachine` and applying the
|
|
185
|
+
created tag to it:
|
|
186
|
+
|
|
187
|
+
```python
|
|
188
|
+
import pulumi
|
|
189
|
+
import pulumi_vsphere as vsphere
|
|
190
|
+
|
|
191
|
+
category = vsphere.TagCategory("category",
|
|
192
|
+
name="test-category",
|
|
193
|
+
cardinality="SINGLE",
|
|
194
|
+
description="Managed by Pulumi",
|
|
195
|
+
associable_types=[
|
|
196
|
+
"VirtualMachine",
|
|
197
|
+
"Datastore",
|
|
198
|
+
])
|
|
199
|
+
tag = vsphere.Tag("tag",
|
|
200
|
+
name="test-tag",
|
|
201
|
+
category_id=category.id,
|
|
202
|
+
description="Managed by Pulumi")
|
|
203
|
+
web = vsphere.VirtualMachine("web", tags=[tag.id])
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Import
|
|
207
|
+
|
|
208
|
+
An existing tag can be imported into this resource by supplying
|
|
209
|
+
|
|
210
|
+
both the tag's category name and the name of the tag as a JSON string to
|
|
211
|
+
|
|
212
|
+
`pulumi import`, as per the example below:
|
|
213
|
+
|
|
214
|
+
```sh
|
|
215
|
+
$ pulumi import vsphere:index/tag:Tag tag \\
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
'{"category_name": "pulumi-test-category", "tag_name": "pulumi-test-tag"}'
|
|
219
|
+
|
|
144
220
|
:param str resource_name: The name of the resource.
|
|
145
221
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
146
222
|
:param pulumi.Input[str] category_id: The unique identifier of the parent category in
|
|
@@ -156,7 +232,83 @@ class Tag(pulumi.CustomResource):
|
|
|
156
232
|
args: TagArgs,
|
|
157
233
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
158
234
|
"""
|
|
159
|
-
|
|
235
|
+
The `Tag` resource can be used to create and manage tags, which allow
|
|
236
|
+
you to attach metadata to objects in the vSphere inventory to make these
|
|
237
|
+
objects more sortable and searchable.
|
|
238
|
+
|
|
239
|
+
For more information about tags, click [here][ext-tags-general].
|
|
240
|
+
|
|
241
|
+
[ext-tags-general]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-E8E854DD-AA97-4E0C-8419-CE84F93C4058.html
|
|
242
|
+
|
|
243
|
+
## Example Usage
|
|
244
|
+
|
|
245
|
+
This example creates a tag named `test-tag`. This tag is assigned the
|
|
246
|
+
`test-category` category, which was created by the
|
|
247
|
+
`TagCategory` resource. The resulting
|
|
248
|
+
tag can be assigned to VMs and datastores only, and can be the only value in
|
|
249
|
+
the category that can be assigned, as per the restrictions defined by the
|
|
250
|
+
category.
|
|
251
|
+
|
|
252
|
+
```python
|
|
253
|
+
import pulumi
|
|
254
|
+
import pulumi_vsphere as vsphere
|
|
255
|
+
|
|
256
|
+
category = vsphere.TagCategory("category",
|
|
257
|
+
name="test-category",
|
|
258
|
+
cardinality="SINGLE",
|
|
259
|
+
description="Managed by Pulumi",
|
|
260
|
+
associable_types=[
|
|
261
|
+
"VirtualMachine",
|
|
262
|
+
"Datastore",
|
|
263
|
+
])
|
|
264
|
+
tag = vsphere.Tag("tag",
|
|
265
|
+
name="test-tag",
|
|
266
|
+
category_id=category.id,
|
|
267
|
+
description="Managed by Pulumi")
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### Using Tags in a Supported Resource
|
|
271
|
+
|
|
272
|
+
Tags can be applied to vSphere resources via the `tags` argument
|
|
273
|
+
in any supported resource.
|
|
274
|
+
|
|
275
|
+
The following example builds on the above example by creating a
|
|
276
|
+
`VirtualMachine` and applying the
|
|
277
|
+
created tag to it:
|
|
278
|
+
|
|
279
|
+
```python
|
|
280
|
+
import pulumi
|
|
281
|
+
import pulumi_vsphere as vsphere
|
|
282
|
+
|
|
283
|
+
category = vsphere.TagCategory("category",
|
|
284
|
+
name="test-category",
|
|
285
|
+
cardinality="SINGLE",
|
|
286
|
+
description="Managed by Pulumi",
|
|
287
|
+
associable_types=[
|
|
288
|
+
"VirtualMachine",
|
|
289
|
+
"Datastore",
|
|
290
|
+
])
|
|
291
|
+
tag = vsphere.Tag("tag",
|
|
292
|
+
name="test-tag",
|
|
293
|
+
category_id=category.id,
|
|
294
|
+
description="Managed by Pulumi")
|
|
295
|
+
web = vsphere.VirtualMachine("web", tags=[tag.id])
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
## Import
|
|
299
|
+
|
|
300
|
+
An existing tag can be imported into this resource by supplying
|
|
301
|
+
|
|
302
|
+
both the tag's category name and the name of the tag as a JSON string to
|
|
303
|
+
|
|
304
|
+
`pulumi import`, as per the example below:
|
|
305
|
+
|
|
306
|
+
```sh
|
|
307
|
+
$ pulumi import vsphere:index/tag:Tag tag \\
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
'{"category_name": "pulumi-test-category", "tag_name": "pulumi-test-tag"}'
|
|
311
|
+
|
|
160
312
|
:param str resource_name: The name of the resource.
|
|
161
313
|
:param TagArgs args: The arguments to use to populate this resource's properties.
|
|
162
314
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
pulumi_vsphere/tag_category.py
CHANGED
|
@@ -196,7 +196,45 @@ class TagCategory(pulumi.CustomResource):
|
|
|
196
196
|
name: Optional[pulumi.Input[str]] = None,
|
|
197
197
|
__props__=None):
|
|
198
198
|
"""
|
|
199
|
-
|
|
199
|
+
The `TagCategory` resource can be used to create and manage tag
|
|
200
|
+
categories, which determine how tags are grouped together and applied to
|
|
201
|
+
specific objects.
|
|
202
|
+
|
|
203
|
+
For more information about tags, click [here][ext-tags-general].
|
|
204
|
+
|
|
205
|
+
[ext-tags-general]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-E8E854DD-AA97-4E0C-8419-CE84F93C4058.html
|
|
206
|
+
|
|
207
|
+
## Example Usage
|
|
208
|
+
|
|
209
|
+
This example creates a tag category named `test-category`, with
|
|
210
|
+
single cardinality (meaning that only one tag in this category can be assigned
|
|
211
|
+
to an object at any given time). Tags in this category can only be assigned to
|
|
212
|
+
VMs and datastores.
|
|
213
|
+
|
|
214
|
+
```python
|
|
215
|
+
import pulumi
|
|
216
|
+
import pulumi_vsphere as vsphere
|
|
217
|
+
|
|
218
|
+
category = vsphere.TagCategory("category",
|
|
219
|
+
name="test-category",
|
|
220
|
+
description="Managed by Pulumi",
|
|
221
|
+
cardinality="SINGLE",
|
|
222
|
+
associable_types=[
|
|
223
|
+
"VirtualMachine",
|
|
224
|
+
"Datastore",
|
|
225
|
+
])
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Import
|
|
229
|
+
|
|
230
|
+
An existing tag category can be imported into this resource via
|
|
231
|
+
|
|
232
|
+
its name, using the following command:
|
|
233
|
+
|
|
234
|
+
```sh
|
|
235
|
+
$ pulumi import vsphere:index/tagCategory:TagCategory category terraform-test-category
|
|
236
|
+
```
|
|
237
|
+
|
|
200
238
|
:param str resource_name: The name of the resource.
|
|
201
239
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
202
240
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] associable_types: A list object types that this category is
|
|
@@ -219,7 +257,45 @@ class TagCategory(pulumi.CustomResource):
|
|
|
219
257
|
args: TagCategoryArgs,
|
|
220
258
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
221
259
|
"""
|
|
222
|
-
|
|
260
|
+
The `TagCategory` resource can be used to create and manage tag
|
|
261
|
+
categories, which determine how tags are grouped together and applied to
|
|
262
|
+
specific objects.
|
|
263
|
+
|
|
264
|
+
For more information about tags, click [here][ext-tags-general].
|
|
265
|
+
|
|
266
|
+
[ext-tags-general]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-E8E854DD-AA97-4E0C-8419-CE84F93C4058.html
|
|
267
|
+
|
|
268
|
+
## Example Usage
|
|
269
|
+
|
|
270
|
+
This example creates a tag category named `test-category`, with
|
|
271
|
+
single cardinality (meaning that only one tag in this category can be assigned
|
|
272
|
+
to an object at any given time). Tags in this category can only be assigned to
|
|
273
|
+
VMs and datastores.
|
|
274
|
+
|
|
275
|
+
```python
|
|
276
|
+
import pulumi
|
|
277
|
+
import pulumi_vsphere as vsphere
|
|
278
|
+
|
|
279
|
+
category = vsphere.TagCategory("category",
|
|
280
|
+
name="test-category",
|
|
281
|
+
description="Managed by Pulumi",
|
|
282
|
+
cardinality="SINGLE",
|
|
283
|
+
associable_types=[
|
|
284
|
+
"VirtualMachine",
|
|
285
|
+
"Datastore",
|
|
286
|
+
])
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
## Import
|
|
290
|
+
|
|
291
|
+
An existing tag category can be imported into this resource via
|
|
292
|
+
|
|
293
|
+
its name, using the following command:
|
|
294
|
+
|
|
295
|
+
```sh
|
|
296
|
+
$ pulumi import vsphere:index/tagCategory:TagCategory category terraform-test-category
|
|
297
|
+
```
|
|
298
|
+
|
|
223
299
|
:param str resource_name: The name of the resource.
|
|
224
300
|
:param TagCategoryArgs args: The arguments to use to populate this resource's properties.
|
|
225
301
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
pulumi_vsphere/vapp_container.py
CHANGED
|
@@ -640,7 +640,85 @@ class VappContainer(pulumi.CustomResource):
|
|
|
640
640
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
641
641
|
__props__=None):
|
|
642
642
|
"""
|
|
643
|
-
|
|
643
|
+
The `VappContainer` resource can be used to create and manage
|
|
644
|
+
vApps.
|
|
645
|
+
|
|
646
|
+
For more information on vSphere vApps, see the VMware vSphere [product documentation][ref-vsphere-vapp].
|
|
647
|
+
|
|
648
|
+
[ref-vsphere-vapp]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-E6E9D2A9-D358-4996-9BC7-F8D9D9645290.html
|
|
649
|
+
|
|
650
|
+
## Basic Example
|
|
651
|
+
|
|
652
|
+
The example below sets up a vSphere vApp container in a compute cluster which uses
|
|
653
|
+
the default settings for CPU and memory reservations, shares, and limits. The compute cluster
|
|
654
|
+
needs to already exist in vSphere.
|
|
655
|
+
|
|
656
|
+
```python
|
|
657
|
+
import pulumi
|
|
658
|
+
import pulumi_vsphere as vsphere
|
|
659
|
+
|
|
660
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
661
|
+
compute_cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
662
|
+
datacenter_id=datacenter.id)
|
|
663
|
+
vapp_container = vsphere.VappContainer("vapp_container",
|
|
664
|
+
name="vapp-01",
|
|
665
|
+
parent_resource_pool_id=compute_cluster.resource_pool_id)
|
|
666
|
+
```
|
|
667
|
+
|
|
668
|
+
### Example with a Virtual Machine
|
|
669
|
+
|
|
670
|
+
The example below builds off the basic example, but includes a virtual machine
|
|
671
|
+
in the new vApp container. To accomplish this, the `resource_pool_id` of the
|
|
672
|
+
virtual machine is set to the `id` of the vApp container.
|
|
673
|
+
|
|
674
|
+
```python
|
|
675
|
+
import pulumi
|
|
676
|
+
import pulumi_vsphere as vsphere
|
|
677
|
+
|
|
678
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
679
|
+
compute_cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
680
|
+
datacenter_id=datacenter.id)
|
|
681
|
+
datastore = vsphere.get_datastore(name="datastore-01",
|
|
682
|
+
datacenter_id=datacenter.id)
|
|
683
|
+
network = vsphere.get_network(name="VM Network",
|
|
684
|
+
datacenter_id=datacenter.id)
|
|
685
|
+
vapp_container = vsphere.VappContainer("vapp_container",
|
|
686
|
+
name="vapp-01",
|
|
687
|
+
parent_resource_pool_id=compute_cluster.resource_pool_id)
|
|
688
|
+
vm = vsphere.VirtualMachine("vm",
|
|
689
|
+
name="foo",
|
|
690
|
+
resource_pool_id=vapp_container_vsphere_vapp_container["id"],
|
|
691
|
+
datastore_id=datastore.id,
|
|
692
|
+
num_cpus=1,
|
|
693
|
+
memory=1024,
|
|
694
|
+
guest_id="ubuntu64Guest",
|
|
695
|
+
network_interfaces=[{
|
|
696
|
+
"network_id": network.id,
|
|
697
|
+
}],
|
|
698
|
+
disks=[{
|
|
699
|
+
"label": "disk0",
|
|
700
|
+
"size": 20,
|
|
701
|
+
}])
|
|
702
|
+
```
|
|
703
|
+
|
|
704
|
+
## Import
|
|
705
|
+
|
|
706
|
+
An existing vApp container can be imported into this resource via
|
|
707
|
+
|
|
708
|
+
the path to the vApp container, using the following command:
|
|
709
|
+
|
|
710
|
+
Example:
|
|
711
|
+
|
|
712
|
+
```sh
|
|
713
|
+
$ pulumi import vsphere:index/vappContainer:VappContainer vapp_container /dc-01/host/cluster-01/Resources/resource-pool-01/vapp-01
|
|
714
|
+
```
|
|
715
|
+
|
|
716
|
+
The example above would import the vApp container named `vapp-01` that is
|
|
717
|
+
|
|
718
|
+
located in the resource pool `resource-pool-01` that is part of the host cluster
|
|
719
|
+
|
|
720
|
+
`cluster-01` in the `dc-01` datacenter.
|
|
721
|
+
|
|
644
722
|
:param str resource_name: The name of the resource.
|
|
645
723
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
646
724
|
:param pulumi.Input[bool] cpu_expandable: Determines if the reservation on a vApp
|
|
@@ -694,7 +772,85 @@ class VappContainer(pulumi.CustomResource):
|
|
|
694
772
|
args: VappContainerArgs,
|
|
695
773
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
696
774
|
"""
|
|
697
|
-
|
|
775
|
+
The `VappContainer` resource can be used to create and manage
|
|
776
|
+
vApps.
|
|
777
|
+
|
|
778
|
+
For more information on vSphere vApps, see the VMware vSphere [product documentation][ref-vsphere-vapp].
|
|
779
|
+
|
|
780
|
+
[ref-vsphere-vapp]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-E6E9D2A9-D358-4996-9BC7-F8D9D9645290.html
|
|
781
|
+
|
|
782
|
+
## Basic Example
|
|
783
|
+
|
|
784
|
+
The example below sets up a vSphere vApp container in a compute cluster which uses
|
|
785
|
+
the default settings for CPU and memory reservations, shares, and limits. The compute cluster
|
|
786
|
+
needs to already exist in vSphere.
|
|
787
|
+
|
|
788
|
+
```python
|
|
789
|
+
import pulumi
|
|
790
|
+
import pulumi_vsphere as vsphere
|
|
791
|
+
|
|
792
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
793
|
+
compute_cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
794
|
+
datacenter_id=datacenter.id)
|
|
795
|
+
vapp_container = vsphere.VappContainer("vapp_container",
|
|
796
|
+
name="vapp-01",
|
|
797
|
+
parent_resource_pool_id=compute_cluster.resource_pool_id)
|
|
798
|
+
```
|
|
799
|
+
|
|
800
|
+
### Example with a Virtual Machine
|
|
801
|
+
|
|
802
|
+
The example below builds off the basic example, but includes a virtual machine
|
|
803
|
+
in the new vApp container. To accomplish this, the `resource_pool_id` of the
|
|
804
|
+
virtual machine is set to the `id` of the vApp container.
|
|
805
|
+
|
|
806
|
+
```python
|
|
807
|
+
import pulumi
|
|
808
|
+
import pulumi_vsphere as vsphere
|
|
809
|
+
|
|
810
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
811
|
+
compute_cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
812
|
+
datacenter_id=datacenter.id)
|
|
813
|
+
datastore = vsphere.get_datastore(name="datastore-01",
|
|
814
|
+
datacenter_id=datacenter.id)
|
|
815
|
+
network = vsphere.get_network(name="VM Network",
|
|
816
|
+
datacenter_id=datacenter.id)
|
|
817
|
+
vapp_container = vsphere.VappContainer("vapp_container",
|
|
818
|
+
name="vapp-01",
|
|
819
|
+
parent_resource_pool_id=compute_cluster.resource_pool_id)
|
|
820
|
+
vm = vsphere.VirtualMachine("vm",
|
|
821
|
+
name="foo",
|
|
822
|
+
resource_pool_id=vapp_container_vsphere_vapp_container["id"],
|
|
823
|
+
datastore_id=datastore.id,
|
|
824
|
+
num_cpus=1,
|
|
825
|
+
memory=1024,
|
|
826
|
+
guest_id="ubuntu64Guest",
|
|
827
|
+
network_interfaces=[{
|
|
828
|
+
"network_id": network.id,
|
|
829
|
+
}],
|
|
830
|
+
disks=[{
|
|
831
|
+
"label": "disk0",
|
|
832
|
+
"size": 20,
|
|
833
|
+
}])
|
|
834
|
+
```
|
|
835
|
+
|
|
836
|
+
## Import
|
|
837
|
+
|
|
838
|
+
An existing vApp container can be imported into this resource via
|
|
839
|
+
|
|
840
|
+
the path to the vApp container, using the following command:
|
|
841
|
+
|
|
842
|
+
Example:
|
|
843
|
+
|
|
844
|
+
```sh
|
|
845
|
+
$ pulumi import vsphere:index/vappContainer:VappContainer vapp_container /dc-01/host/cluster-01/Resources/resource-pool-01/vapp-01
|
|
846
|
+
```
|
|
847
|
+
|
|
848
|
+
The example above would import the vApp container named `vapp-01` that is
|
|
849
|
+
|
|
850
|
+
located in the resource pool `resource-pool-01` that is part of the host cluster
|
|
851
|
+
|
|
852
|
+
`cluster-01` in the `dc-01` datacenter.
|
|
853
|
+
|
|
698
854
|
:param str resource_name: The name of the resource.
|
|
699
855
|
:param VappContainerArgs args: The arguments to use to populate this resource's properties.
|
|
700
856
|
:param pulumi.ResourceOptions opts: Options for the resource.
|