pulumi-vsphere 4.10.0a1710245029__py3-none-any.whl → 4.13.0a1736836157__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pulumi-vsphere might be problematic. Click here for more details.
- pulumi_vsphere/__init__.py +28 -0
- pulumi_vsphere/_inputs.py +1816 -277
- pulumi_vsphere/_utilities.py +41 -5
- pulumi_vsphere/compute_cluster.py +937 -1488
- pulumi_vsphere/compute_cluster_host_group.py +67 -2
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +69 -34
- pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +41 -2
- pulumi_vsphere/compute_cluster_vm_dependency_rule.py +205 -2
- pulumi_vsphere/compute_cluster_vm_group.py +198 -2
- pulumi_vsphere/compute_cluster_vm_host_rule.py +73 -2
- pulumi_vsphere/config/__init__.pyi +5 -0
- pulumi_vsphere/config/vars.py +5 -0
- pulumi_vsphere/content_library.py +113 -12
- pulumi_vsphere/content_library_item.py +143 -2
- pulumi_vsphere/custom_attribute.py +77 -2
- pulumi_vsphere/datacenter.py +48 -40
- pulumi_vsphere/datastore_cluster.py +217 -366
- pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +159 -2
- pulumi_vsphere/distributed_port_group.py +416 -189
- pulumi_vsphere/distributed_virtual_switch.py +571 -830
- pulumi_vsphere/dpm_host_override.py +63 -2
- pulumi_vsphere/drs_vm_override.py +67 -2
- pulumi_vsphere/entity_permissions.py +64 -38
- pulumi_vsphere/file.py +21 -24
- pulumi_vsphere/folder.py +148 -30
- pulumi_vsphere/get_compute_cluster.py +16 -9
- pulumi_vsphere/get_compute_cluster_host_group.py +36 -25
- pulumi_vsphere/get_content_library.py +23 -15
- pulumi_vsphere/get_content_library_item.py +29 -13
- pulumi_vsphere/get_custom_attribute.py +14 -9
- pulumi_vsphere/get_datacenter.py +30 -12
- pulumi_vsphere/get_datastore.py +29 -21
- pulumi_vsphere/get_datastore_cluster.py +31 -10
- pulumi_vsphere/get_datastore_stats.py +63 -57
- pulumi_vsphere/get_distributed_virtual_switch.py +18 -9
- pulumi_vsphere/get_dynamic.py +35 -25
- pulumi_vsphere/get_folder.py +23 -11
- pulumi_vsphere/get_guest_os_customization.py +26 -52
- pulumi_vsphere/get_host.py +16 -9
- pulumi_vsphere/get_host_base_images.py +104 -0
- pulumi_vsphere/get_host_pci_device.py +28 -19
- pulumi_vsphere/get_host_thumbprint.py +41 -25
- pulumi_vsphere/get_host_vgpu_profile.py +20 -15
- pulumi_vsphere/get_license.py +20 -10
- pulumi_vsphere/get_network.py +80 -24
- pulumi_vsphere/get_ovf_vm_template.py +56 -5
- pulumi_vsphere/get_policy.py +13 -9
- pulumi_vsphere/get_resource_pool.py +29 -23
- pulumi_vsphere/get_role.py +23 -13
- pulumi_vsphere/get_tag.py +16 -9
- pulumi_vsphere/get_tag_category.py +16 -9
- pulumi_vsphere/get_vapp_container.py +15 -9
- pulumi_vsphere/get_virtual_machine.py +205 -48
- pulumi_vsphere/get_vmfs_disks.py +18 -9
- pulumi_vsphere/guest_os_customization.py +60 -5
- pulumi_vsphere/ha_vm_override.py +352 -380
- pulumi_vsphere/host.py +244 -64
- pulumi_vsphere/host_port_group.py +27 -24
- pulumi_vsphere/host_virtual_switch.py +209 -289
- pulumi_vsphere/license.py +5 -32
- pulumi_vsphere/nas_datastore.py +74 -9
- pulumi_vsphere/offline_software_depot.py +185 -0
- pulumi_vsphere/outputs.py +717 -270
- pulumi_vsphere/provider.py +7 -6
- pulumi_vsphere/pulumi-plugin.json +2 -1
- pulumi_vsphere/resource_pool.py +168 -411
- pulumi_vsphere/role.py +33 -2
- pulumi_vsphere/storage_drs_vm_override.py +133 -2
- pulumi_vsphere/supervisor.py +967 -0
- pulumi_vsphere/tag.py +159 -2
- pulumi_vsphere/tag_category.py +83 -2
- pulumi_vsphere/vapp_container.py +163 -2
- pulumi_vsphere/vapp_entity.py +147 -2
- pulumi_vsphere/virtual_disk.py +123 -36
- pulumi_vsphere/virtual_machine.py +698 -829
- pulumi_vsphere/virtual_machine_class.py +447 -0
- pulumi_vsphere/virtual_machine_snapshot.py +13 -12
- pulumi_vsphere/vm_storage_policy.py +120 -127
- pulumi_vsphere/vmfs_datastore.py +271 -2
- pulumi_vsphere/vnic.py +104 -105
- {pulumi_vsphere-4.10.0a1710245029.dist-info → pulumi_vsphere-4.13.0a1736836157.dist-info}/METADATA +7 -6
- pulumi_vsphere-4.13.0a1736836157.dist-info/RECORD +86 -0
- {pulumi_vsphere-4.10.0a1710245029.dist-info → pulumi_vsphere-4.13.0a1736836157.dist-info}/WHEEL +1 -1
- pulumi_vsphere-4.10.0a1710245029.dist-info/RECORD +0 -82
- {pulumi_vsphere-4.10.0a1710245029.dist-info → pulumi_vsphere-4.13.0a1736836157.dist-info}/top_level.txt +0 -0
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
from . import outputs
|
|
12
17
|
from ._inputs import *
|
|
@@ -131,7 +136,7 @@ class VmStoragePolicy(pulumi.CustomResource):
|
|
|
131
136
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
132
137
|
description: Optional[pulumi.Input[str]] = None,
|
|
133
138
|
name: Optional[pulumi.Input[str]] = None,
|
|
134
|
-
tag_rules: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
139
|
+
tag_rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['VmStoragePolicyTagRuleArgs', 'VmStoragePolicyTagRuleArgsDict']]]]] = None,
|
|
135
140
|
__props__=None):
|
|
136
141
|
"""
|
|
137
142
|
The `VmStoragePolicy` resource can be used to create and manage storage
|
|
@@ -144,7 +149,6 @@ class VmStoragePolicy(pulumi.CustomResource):
|
|
|
144
149
|
|
|
145
150
|
In this example, tags are first applied to datastores.
|
|
146
151
|
|
|
147
|
-
<!--Start PulumiCodeChooser -->
|
|
148
152
|
```python
|
|
149
153
|
import pulumi
|
|
150
154
|
import pulumi_vsphere as vsphere
|
|
@@ -152,104 +156,99 @@ class VmStoragePolicy(pulumi.CustomResource):
|
|
|
152
156
|
environment = vsphere.get_tag_category(name="environment")
|
|
153
157
|
service_level = vsphere.get_tag_category(name="service_level")
|
|
154
158
|
replication = vsphere.get_tag_category(name="replication")
|
|
155
|
-
production = vsphere.get_tag(
|
|
156
|
-
|
|
157
|
-
development = vsphere.get_tag(
|
|
158
|
-
|
|
159
|
-
platinum = vsphere.get_tag(
|
|
160
|
-
|
|
161
|
-
gold = vsphere.get_tag(
|
|
162
|
-
|
|
163
|
-
silver = vsphere.get_tag(
|
|
164
|
-
|
|
165
|
-
bronze = vsphere.get_tag(
|
|
166
|
-
|
|
167
|
-
replicated = vsphere.get_tag(
|
|
168
|
-
|
|
169
|
-
non_replicated = vsphere.get_tag(
|
|
170
|
-
|
|
171
|
-
prod_datastore = vsphere.VmfsDatastore("
|
|
159
|
+
production = vsphere.get_tag(name="production",
|
|
160
|
+
category_id="data.vsphere_tag_category.environment.id")
|
|
161
|
+
development = vsphere.get_tag(name="development",
|
|
162
|
+
category_id="data.vsphere_tag_category.environment.id")
|
|
163
|
+
platinum = vsphere.get_tag(name="platinum",
|
|
164
|
+
category_id="data.vsphere_tag_category.service_level.id")
|
|
165
|
+
gold = vsphere.get_tag(name="platinum",
|
|
166
|
+
category_id="data.vsphere_tag_category.service_level.id")
|
|
167
|
+
silver = vsphere.get_tag(name="silver",
|
|
168
|
+
category_id="data.vsphere_tag_category.service_level.id")
|
|
169
|
+
bronze = vsphere.get_tag(name="bronze",
|
|
170
|
+
category_id="data.vsphere_tag_category.service_level.id")
|
|
171
|
+
replicated = vsphere.get_tag(name="replicated",
|
|
172
|
+
category_id="data.vsphere_tag_category.replication.id")
|
|
173
|
+
non_replicated = vsphere.get_tag(name="non_replicated",
|
|
174
|
+
category_id="data.vsphere_tag_category.replication.id")
|
|
175
|
+
prod_datastore = vsphere.VmfsDatastore("prod_datastore", tags=[
|
|
172
176
|
"data.vsphere_tag.production.id",
|
|
173
177
|
"data.vsphere_tag.platinum.id",
|
|
174
178
|
"data.vsphere_tag.replicated.id",
|
|
175
179
|
])
|
|
176
|
-
dev_datastore = vsphere.NasDatastore("
|
|
180
|
+
dev_datastore = vsphere.NasDatastore("dev_datastore", tags=[
|
|
177
181
|
"data.vsphere_tag.development.id",
|
|
178
182
|
"data.vsphere_tag.silver.id",
|
|
179
183
|
"data.vsphere_tag.non_replicated.id",
|
|
180
184
|
])
|
|
181
185
|
```
|
|
182
|
-
<!--End PulumiCodeChooser -->
|
|
183
186
|
|
|
184
187
|
Next, storage policies are created and `tag_rules` are applied.
|
|
185
188
|
|
|
186
|
-
<!--Start PulumiCodeChooser -->
|
|
187
189
|
```python
|
|
188
190
|
import pulumi
|
|
189
191
|
import pulumi_vsphere as vsphere
|
|
190
192
|
|
|
191
|
-
prod_platinum_replicated = vsphere.VmStoragePolicy("
|
|
193
|
+
prod_platinum_replicated = vsphere.VmStoragePolicy("prod_platinum_replicated",
|
|
194
|
+
name="prod_platinum_replicated",
|
|
192
195
|
description="prod_platinum_replicated",
|
|
193
196
|
tag_rules=[
|
|
194
|
-
|
|
195
|
-
tag_category
|
|
196
|
-
tags
|
|
197
|
-
include_datastores_with_tags
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
tag_category
|
|
201
|
-
tags
|
|
202
|
-
include_datastores_with_tags
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
tag_category
|
|
206
|
-
tags
|
|
207
|
-
include_datastores_with_tags
|
|
208
|
-
|
|
197
|
+
{
|
|
198
|
+
"tag_category": environment["name"],
|
|
199
|
+
"tags": [production["name"]],
|
|
200
|
+
"include_datastores_with_tags": True,
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"tag_category": service_level["name"],
|
|
204
|
+
"tags": [platinum["name"]],
|
|
205
|
+
"include_datastores_with_tags": True,
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"tag_category": replication["name"],
|
|
209
|
+
"tags": [replicated["name"]],
|
|
210
|
+
"include_datastores_with_tags": True,
|
|
211
|
+
},
|
|
209
212
|
])
|
|
210
|
-
dev_silver_nonreplicated = vsphere.VmStoragePolicy("
|
|
213
|
+
dev_silver_nonreplicated = vsphere.VmStoragePolicy("dev_silver_nonreplicated",
|
|
214
|
+
name="dev_silver_nonreplicated",
|
|
211
215
|
description="dev_silver_nonreplicated",
|
|
212
216
|
tag_rules=[
|
|
213
|
-
|
|
214
|
-
tag_category
|
|
215
|
-
tags
|
|
216
|
-
include_datastores_with_tags
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
tag_category
|
|
220
|
-
tags
|
|
221
|
-
include_datastores_with_tags
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
tag_category
|
|
225
|
-
tags
|
|
226
|
-
include_datastores_with_tags
|
|
227
|
-
|
|
217
|
+
{
|
|
218
|
+
"tag_category": environment["name"],
|
|
219
|
+
"tags": [development["name"]],
|
|
220
|
+
"include_datastores_with_tags": True,
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"tag_category": service_level["name"],
|
|
224
|
+
"tags": [silver["name"]],
|
|
225
|
+
"include_datastores_with_tags": True,
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"tag_category": replication["name"],
|
|
229
|
+
"tags": [non_replicated["name"]],
|
|
230
|
+
"include_datastores_with_tags": True,
|
|
231
|
+
},
|
|
228
232
|
])
|
|
229
233
|
```
|
|
230
|
-
<!--End PulumiCodeChooser -->
|
|
231
234
|
|
|
232
|
-
|
|
235
|
+
Lastly, when creating a virtual machine resource, a storage policy can be specified to direct virtual machine placement to a datastore which matches the policy's `tags_rules`.
|
|
233
236
|
|
|
234
|
-
<!--Start PulumiCodeChooser -->
|
|
235
237
|
```python
|
|
236
238
|
import pulumi
|
|
237
239
|
import pulumi_vsphere as vsphere
|
|
238
240
|
|
|
239
241
|
prod_platinum_replicated = vsphere.get_policy(name="prod_platinum_replicated")
|
|
240
242
|
dev_silver_nonreplicated = vsphere.get_policy(name="dev_silver_nonreplicated")
|
|
241
|
-
prod_vm = vsphere.VirtualMachine("
|
|
242
|
-
|
|
243
|
-
dev_vm = vsphere.VirtualMachine("devVm", storage_policy_id=data["vsphere_storage_policy"]["storage_policy"]["dev_silver_nonreplicated"]["id"])
|
|
244
|
-
# ... other configuration ...
|
|
243
|
+
prod_vm = vsphere.VirtualMachine("prod_vm", storage_policy_id=storage_policy["prodPlatinumReplicated"]["id"])
|
|
244
|
+
dev_vm = vsphere.VirtualMachine("dev_vm", storage_policy_id=storage_policy["devSilverNonreplicated"]["id"])
|
|
245
245
|
```
|
|
246
|
-
<!--End PulumiCodeChooser -->
|
|
247
246
|
|
|
248
247
|
:param str resource_name: The name of the resource.
|
|
249
248
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
250
249
|
:param pulumi.Input[str] description: Description of the storage policy.
|
|
251
250
|
:param pulumi.Input[str] name: The name of the storage policy.
|
|
252
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
|
251
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['VmStoragePolicyTagRuleArgs', 'VmStoragePolicyTagRuleArgsDict']]]] tag_rules: List of tag rules. The tag category and tags to be associated to this storage policy.
|
|
253
252
|
"""
|
|
254
253
|
...
|
|
255
254
|
@overload
|
|
@@ -268,7 +267,6 @@ class VmStoragePolicy(pulumi.CustomResource):
|
|
|
268
267
|
|
|
269
268
|
In this example, tags are first applied to datastores.
|
|
270
269
|
|
|
271
|
-
<!--Start PulumiCodeChooser -->
|
|
272
270
|
```python
|
|
273
271
|
import pulumi
|
|
274
272
|
import pulumi_vsphere as vsphere
|
|
@@ -276,98 +274,93 @@ class VmStoragePolicy(pulumi.CustomResource):
|
|
|
276
274
|
environment = vsphere.get_tag_category(name="environment")
|
|
277
275
|
service_level = vsphere.get_tag_category(name="service_level")
|
|
278
276
|
replication = vsphere.get_tag_category(name="replication")
|
|
279
|
-
production = vsphere.get_tag(
|
|
280
|
-
|
|
281
|
-
development = vsphere.get_tag(
|
|
282
|
-
|
|
283
|
-
platinum = vsphere.get_tag(
|
|
284
|
-
|
|
285
|
-
gold = vsphere.get_tag(
|
|
286
|
-
|
|
287
|
-
silver = vsphere.get_tag(
|
|
288
|
-
|
|
289
|
-
bronze = vsphere.get_tag(
|
|
290
|
-
|
|
291
|
-
replicated = vsphere.get_tag(
|
|
292
|
-
|
|
293
|
-
non_replicated = vsphere.get_tag(
|
|
294
|
-
|
|
295
|
-
prod_datastore = vsphere.VmfsDatastore("
|
|
277
|
+
production = vsphere.get_tag(name="production",
|
|
278
|
+
category_id="data.vsphere_tag_category.environment.id")
|
|
279
|
+
development = vsphere.get_tag(name="development",
|
|
280
|
+
category_id="data.vsphere_tag_category.environment.id")
|
|
281
|
+
platinum = vsphere.get_tag(name="platinum",
|
|
282
|
+
category_id="data.vsphere_tag_category.service_level.id")
|
|
283
|
+
gold = vsphere.get_tag(name="platinum",
|
|
284
|
+
category_id="data.vsphere_tag_category.service_level.id")
|
|
285
|
+
silver = vsphere.get_tag(name="silver",
|
|
286
|
+
category_id="data.vsphere_tag_category.service_level.id")
|
|
287
|
+
bronze = vsphere.get_tag(name="bronze",
|
|
288
|
+
category_id="data.vsphere_tag_category.service_level.id")
|
|
289
|
+
replicated = vsphere.get_tag(name="replicated",
|
|
290
|
+
category_id="data.vsphere_tag_category.replication.id")
|
|
291
|
+
non_replicated = vsphere.get_tag(name="non_replicated",
|
|
292
|
+
category_id="data.vsphere_tag_category.replication.id")
|
|
293
|
+
prod_datastore = vsphere.VmfsDatastore("prod_datastore", tags=[
|
|
296
294
|
"data.vsphere_tag.production.id",
|
|
297
295
|
"data.vsphere_tag.platinum.id",
|
|
298
296
|
"data.vsphere_tag.replicated.id",
|
|
299
297
|
])
|
|
300
|
-
dev_datastore = vsphere.NasDatastore("
|
|
298
|
+
dev_datastore = vsphere.NasDatastore("dev_datastore", tags=[
|
|
301
299
|
"data.vsphere_tag.development.id",
|
|
302
300
|
"data.vsphere_tag.silver.id",
|
|
303
301
|
"data.vsphere_tag.non_replicated.id",
|
|
304
302
|
])
|
|
305
303
|
```
|
|
306
|
-
<!--End PulumiCodeChooser -->
|
|
307
304
|
|
|
308
305
|
Next, storage policies are created and `tag_rules` are applied.
|
|
309
306
|
|
|
310
|
-
<!--Start PulumiCodeChooser -->
|
|
311
307
|
```python
|
|
312
308
|
import pulumi
|
|
313
309
|
import pulumi_vsphere as vsphere
|
|
314
310
|
|
|
315
|
-
prod_platinum_replicated = vsphere.VmStoragePolicy("
|
|
311
|
+
prod_platinum_replicated = vsphere.VmStoragePolicy("prod_platinum_replicated",
|
|
312
|
+
name="prod_platinum_replicated",
|
|
316
313
|
description="prod_platinum_replicated",
|
|
317
314
|
tag_rules=[
|
|
318
|
-
|
|
319
|
-
tag_category
|
|
320
|
-
tags
|
|
321
|
-
include_datastores_with_tags
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
tag_category
|
|
325
|
-
tags
|
|
326
|
-
include_datastores_with_tags
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
tag_category
|
|
330
|
-
tags
|
|
331
|
-
include_datastores_with_tags
|
|
332
|
-
|
|
315
|
+
{
|
|
316
|
+
"tag_category": environment["name"],
|
|
317
|
+
"tags": [production["name"]],
|
|
318
|
+
"include_datastores_with_tags": True,
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"tag_category": service_level["name"],
|
|
322
|
+
"tags": [platinum["name"]],
|
|
323
|
+
"include_datastores_with_tags": True,
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"tag_category": replication["name"],
|
|
327
|
+
"tags": [replicated["name"]],
|
|
328
|
+
"include_datastores_with_tags": True,
|
|
329
|
+
},
|
|
333
330
|
])
|
|
334
|
-
dev_silver_nonreplicated = vsphere.VmStoragePolicy("
|
|
331
|
+
dev_silver_nonreplicated = vsphere.VmStoragePolicy("dev_silver_nonreplicated",
|
|
332
|
+
name="dev_silver_nonreplicated",
|
|
335
333
|
description="dev_silver_nonreplicated",
|
|
336
334
|
tag_rules=[
|
|
337
|
-
|
|
338
|
-
tag_category
|
|
339
|
-
tags
|
|
340
|
-
include_datastores_with_tags
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
tag_category
|
|
344
|
-
tags
|
|
345
|
-
include_datastores_with_tags
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
tag_category
|
|
349
|
-
tags
|
|
350
|
-
include_datastores_with_tags
|
|
351
|
-
|
|
335
|
+
{
|
|
336
|
+
"tag_category": environment["name"],
|
|
337
|
+
"tags": [development["name"]],
|
|
338
|
+
"include_datastores_with_tags": True,
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"tag_category": service_level["name"],
|
|
342
|
+
"tags": [silver["name"]],
|
|
343
|
+
"include_datastores_with_tags": True,
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"tag_category": replication["name"],
|
|
347
|
+
"tags": [non_replicated["name"]],
|
|
348
|
+
"include_datastores_with_tags": True,
|
|
349
|
+
},
|
|
352
350
|
])
|
|
353
351
|
```
|
|
354
|
-
<!--End PulumiCodeChooser -->
|
|
355
352
|
|
|
356
|
-
|
|
353
|
+
Lastly, when creating a virtual machine resource, a storage policy can be specified to direct virtual machine placement to a datastore which matches the policy's `tags_rules`.
|
|
357
354
|
|
|
358
|
-
<!--Start PulumiCodeChooser -->
|
|
359
355
|
```python
|
|
360
356
|
import pulumi
|
|
361
357
|
import pulumi_vsphere as vsphere
|
|
362
358
|
|
|
363
359
|
prod_platinum_replicated = vsphere.get_policy(name="prod_platinum_replicated")
|
|
364
360
|
dev_silver_nonreplicated = vsphere.get_policy(name="dev_silver_nonreplicated")
|
|
365
|
-
prod_vm = vsphere.VirtualMachine("
|
|
366
|
-
|
|
367
|
-
dev_vm = vsphere.VirtualMachine("devVm", storage_policy_id=data["vsphere_storage_policy"]["storage_policy"]["dev_silver_nonreplicated"]["id"])
|
|
368
|
-
# ... other configuration ...
|
|
361
|
+
prod_vm = vsphere.VirtualMachine("prod_vm", storage_policy_id=storage_policy["prodPlatinumReplicated"]["id"])
|
|
362
|
+
dev_vm = vsphere.VirtualMachine("dev_vm", storage_policy_id=storage_policy["devSilverNonreplicated"]["id"])
|
|
369
363
|
```
|
|
370
|
-
<!--End PulumiCodeChooser -->
|
|
371
364
|
|
|
372
365
|
:param str resource_name: The name of the resource.
|
|
373
366
|
:param VmStoragePolicyArgs args: The arguments to use to populate this resource's properties.
|
|
@@ -386,7 +379,7 @@ class VmStoragePolicy(pulumi.CustomResource):
|
|
|
386
379
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
387
380
|
description: Optional[pulumi.Input[str]] = None,
|
|
388
381
|
name: Optional[pulumi.Input[str]] = None,
|
|
389
|
-
tag_rules: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
382
|
+
tag_rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['VmStoragePolicyTagRuleArgs', 'VmStoragePolicyTagRuleArgsDict']]]]] = None,
|
|
390
383
|
__props__=None):
|
|
391
384
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
392
385
|
if not isinstance(opts, pulumi.ResourceOptions):
|
|
@@ -413,7 +406,7 @@ class VmStoragePolicy(pulumi.CustomResource):
|
|
|
413
406
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
414
407
|
description: Optional[pulumi.Input[str]] = None,
|
|
415
408
|
name: Optional[pulumi.Input[str]] = None,
|
|
416
|
-
tag_rules: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
409
|
+
tag_rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['VmStoragePolicyTagRuleArgs', 'VmStoragePolicyTagRuleArgsDict']]]]] = None) -> 'VmStoragePolicy':
|
|
417
410
|
"""
|
|
418
411
|
Get an existing VmStoragePolicy resource's state with the given name, id, and optional extra
|
|
419
412
|
properties used to qualify the lookup.
|
|
@@ -423,7 +416,7 @@ class VmStoragePolicy(pulumi.CustomResource):
|
|
|
423
416
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
424
417
|
:param pulumi.Input[str] description: Description of the storage policy.
|
|
425
418
|
:param pulumi.Input[str] name: The name of the storage policy.
|
|
426
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
|
419
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['VmStoragePolicyTagRuleArgs', 'VmStoragePolicyTagRuleArgsDict']]]] tag_rules: List of tag rules. The tag category and tags to be associated to this storage policy.
|
|
427
420
|
"""
|
|
428
421
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
429
422
|
|