pulumi-vsphere 4.10.0a1710160860__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.

Files changed (85) hide show
  1. pulumi_vsphere/__init__.py +30 -0
  2. pulumi_vsphere/_inputs.py +1816 -277
  3. pulumi_vsphere/_utilities.py +41 -5
  4. pulumi_vsphere/compute_cluster.py +937 -1488
  5. pulumi_vsphere/compute_cluster_host_group.py +67 -2
  6. pulumi_vsphere/compute_cluster_vm_affinity_rule.py +69 -34
  7. pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +41 -2
  8. pulumi_vsphere/compute_cluster_vm_dependency_rule.py +205 -2
  9. pulumi_vsphere/compute_cluster_vm_group.py +198 -2
  10. pulumi_vsphere/compute_cluster_vm_host_rule.py +73 -2
  11. pulumi_vsphere/config/__init__.pyi +5 -0
  12. pulumi_vsphere/config/vars.py +5 -0
  13. pulumi_vsphere/content_library.py +113 -12
  14. pulumi_vsphere/content_library_item.py +143 -2
  15. pulumi_vsphere/custom_attribute.py +77 -2
  16. pulumi_vsphere/datacenter.py +48 -40
  17. pulumi_vsphere/datastore_cluster.py +217 -366
  18. pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +159 -2
  19. pulumi_vsphere/distributed_port_group.py +416 -189
  20. pulumi_vsphere/distributed_virtual_switch.py +571 -830
  21. pulumi_vsphere/dpm_host_override.py +63 -2
  22. pulumi_vsphere/drs_vm_override.py +67 -2
  23. pulumi_vsphere/entity_permissions.py +64 -38
  24. pulumi_vsphere/file.py +21 -24
  25. pulumi_vsphere/folder.py +148 -30
  26. pulumi_vsphere/get_compute_cluster.py +16 -9
  27. pulumi_vsphere/get_compute_cluster_host_group.py +36 -25
  28. pulumi_vsphere/get_content_library.py +23 -15
  29. pulumi_vsphere/get_content_library_item.py +29 -13
  30. pulumi_vsphere/get_custom_attribute.py +14 -9
  31. pulumi_vsphere/get_datacenter.py +30 -12
  32. pulumi_vsphere/get_datastore.py +44 -12
  33. pulumi_vsphere/get_datastore_cluster.py +31 -10
  34. pulumi_vsphere/get_datastore_stats.py +208 -0
  35. pulumi_vsphere/get_distributed_virtual_switch.py +18 -9
  36. pulumi_vsphere/get_dynamic.py +35 -25
  37. pulumi_vsphere/get_folder.py +23 -11
  38. pulumi_vsphere/get_guest_os_customization.py +26 -52
  39. pulumi_vsphere/get_host.py +16 -9
  40. pulumi_vsphere/get_host_base_images.py +104 -0
  41. pulumi_vsphere/get_host_pci_device.py +28 -19
  42. pulumi_vsphere/get_host_thumbprint.py +41 -25
  43. pulumi_vsphere/get_host_vgpu_profile.py +195 -0
  44. pulumi_vsphere/get_license.py +20 -10
  45. pulumi_vsphere/get_network.py +80 -24
  46. pulumi_vsphere/get_ovf_vm_template.py +56 -5
  47. pulumi_vsphere/get_policy.py +13 -9
  48. pulumi_vsphere/get_resource_pool.py +29 -23
  49. pulumi_vsphere/get_role.py +23 -13
  50. pulumi_vsphere/get_tag.py +16 -9
  51. pulumi_vsphere/get_tag_category.py +16 -9
  52. pulumi_vsphere/get_vapp_container.py +15 -9
  53. pulumi_vsphere/get_virtual_machine.py +233 -48
  54. pulumi_vsphere/get_vmfs_disks.py +18 -9
  55. pulumi_vsphere/guest_os_customization.py +60 -5
  56. pulumi_vsphere/ha_vm_override.py +352 -380
  57. pulumi_vsphere/host.py +244 -64
  58. pulumi_vsphere/host_port_group.py +27 -24
  59. pulumi_vsphere/host_virtual_switch.py +209 -289
  60. pulumi_vsphere/license.py +5 -32
  61. pulumi_vsphere/nas_datastore.py +74 -9
  62. pulumi_vsphere/offline_software_depot.py +185 -0
  63. pulumi_vsphere/outputs.py +774 -256
  64. pulumi_vsphere/provider.py +7 -6
  65. pulumi_vsphere/pulumi-plugin.json +2 -1
  66. pulumi_vsphere/resource_pool.py +168 -411
  67. pulumi_vsphere/role.py +33 -2
  68. pulumi_vsphere/storage_drs_vm_override.py +133 -2
  69. pulumi_vsphere/supervisor.py +967 -0
  70. pulumi_vsphere/tag.py +159 -2
  71. pulumi_vsphere/tag_category.py +83 -2
  72. pulumi_vsphere/vapp_container.py +163 -2
  73. pulumi_vsphere/vapp_entity.py +147 -2
  74. pulumi_vsphere/virtual_disk.py +123 -36
  75. pulumi_vsphere/virtual_machine.py +759 -829
  76. pulumi_vsphere/virtual_machine_class.py +447 -0
  77. pulumi_vsphere/virtual_machine_snapshot.py +13 -12
  78. pulumi_vsphere/vm_storage_policy.py +120 -127
  79. pulumi_vsphere/vmfs_datastore.py +271 -2
  80. pulumi_vsphere/vnic.py +104 -105
  81. {pulumi_vsphere-4.10.0a1710160860.dist-info → pulumi_vsphere-4.13.0a1736836157.dist-info}/METADATA +7 -6
  82. pulumi_vsphere-4.13.0a1736836157.dist-info/RECORD +86 -0
  83. {pulumi_vsphere-4.10.0a1710160860.dist-info → pulumi_vsphere-4.13.0a1736836157.dist-info}/WHEEL +1 -1
  84. pulumi_vsphere-4.10.0a1710160860.dist-info/RECORD +0 -80
  85. {pulumi_vsphere-4.10.0a1710160860.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[pulumi.InputType['VmStoragePolicyTagRuleArgs']]]]] = None,
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(category_id="data.vsphere_tag_category.environment.id",
156
- name="production")
157
- development = vsphere.get_tag(category_id="data.vsphere_tag_category.environment.id",
158
- name="development")
159
- platinum = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id",
160
- name="platinum")
161
- gold = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id",
162
- name="platinum")
163
- silver = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id",
164
- name="silver")
165
- bronze = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id",
166
- name="bronze")
167
- replicated = vsphere.get_tag(category_id="data.vsphere_tag_category.replication.id",
168
- name="replicated")
169
- non_replicated = vsphere.get_tag(category_id="data.vsphere_tag_category.replication.id",
170
- name="non_replicated")
171
- prod_datastore = vsphere.VmfsDatastore("prodDatastore", tags=[
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("devDatastore", tags=[
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("prodPlatinumReplicated",
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
- vsphere.VmStoragePolicyTagRuleArgs(
195
- tag_category=data["vsphere_tag_category"]["environment"]["name"],
196
- tags=[data["vsphere_tag"]["production"]["name"]],
197
- include_datastores_with_tags=True,
198
- ),
199
- vsphere.VmStoragePolicyTagRuleArgs(
200
- tag_category=data["vsphere_tag_category"]["service_level"]["name"],
201
- tags=[data["vsphere_tag"]["platinum"]["name"]],
202
- include_datastores_with_tags=True,
203
- ),
204
- vsphere.VmStoragePolicyTagRuleArgs(
205
- tag_category=data["vsphere_tag_category"]["replication"]["name"],
206
- tags=[data["vsphere_tag"]["replicated"]["name"]],
207
- include_datastores_with_tags=True,
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("devSilverNonreplicated",
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
- vsphere.VmStoragePolicyTagRuleArgs(
214
- tag_category=data["vsphere_tag_category"]["environment"]["name"],
215
- tags=[data["vsphere_tag"]["development"]["name"]],
216
- include_datastores_with_tags=True,
217
- ),
218
- vsphere.VmStoragePolicyTagRuleArgs(
219
- tag_category=data["vsphere_tag_category"]["service_level"]["name"],
220
- tags=[data["vsphere_tag"]["silver"]["name"]],
221
- include_datastores_with_tags=True,
222
- ),
223
- vsphere.VmStoragePolicyTagRuleArgs(
224
- tag_category=data["vsphere_tag_category"]["replication"]["name"],
225
- tags=[data["vsphere_tag"]["non_replicated"]["name"]],
226
- include_datastores_with_tags=True,
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
- Lasttly, when creating a virtual machine resource, a storage policy can be specificed to direct virtual machine placement to a datastore which matches the policy's `tags_rules`.
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("prodVm", storage_policy_id=data["vsphere_storage_policy"]["storage_policy"]["prod_platinum_replicated"]["id"])
242
- # ... other configuration ...
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[pulumi.InputType['VmStoragePolicyTagRuleArgs']]]] tag_rules: List of tag rules. The tag category and tags to be associated to this storage policy.
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(category_id="data.vsphere_tag_category.environment.id",
280
- name="production")
281
- development = vsphere.get_tag(category_id="data.vsphere_tag_category.environment.id",
282
- name="development")
283
- platinum = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id",
284
- name="platinum")
285
- gold = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id",
286
- name="platinum")
287
- silver = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id",
288
- name="silver")
289
- bronze = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id",
290
- name="bronze")
291
- replicated = vsphere.get_tag(category_id="data.vsphere_tag_category.replication.id",
292
- name="replicated")
293
- non_replicated = vsphere.get_tag(category_id="data.vsphere_tag_category.replication.id",
294
- name="non_replicated")
295
- prod_datastore = vsphere.VmfsDatastore("prodDatastore", tags=[
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("devDatastore", tags=[
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("prodPlatinumReplicated",
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
- vsphere.VmStoragePolicyTagRuleArgs(
319
- tag_category=data["vsphere_tag_category"]["environment"]["name"],
320
- tags=[data["vsphere_tag"]["production"]["name"]],
321
- include_datastores_with_tags=True,
322
- ),
323
- vsphere.VmStoragePolicyTagRuleArgs(
324
- tag_category=data["vsphere_tag_category"]["service_level"]["name"],
325
- tags=[data["vsphere_tag"]["platinum"]["name"]],
326
- include_datastores_with_tags=True,
327
- ),
328
- vsphere.VmStoragePolicyTagRuleArgs(
329
- tag_category=data["vsphere_tag_category"]["replication"]["name"],
330
- tags=[data["vsphere_tag"]["replicated"]["name"]],
331
- include_datastores_with_tags=True,
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("devSilverNonreplicated",
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
- vsphere.VmStoragePolicyTagRuleArgs(
338
- tag_category=data["vsphere_tag_category"]["environment"]["name"],
339
- tags=[data["vsphere_tag"]["development"]["name"]],
340
- include_datastores_with_tags=True,
341
- ),
342
- vsphere.VmStoragePolicyTagRuleArgs(
343
- tag_category=data["vsphere_tag_category"]["service_level"]["name"],
344
- tags=[data["vsphere_tag"]["silver"]["name"]],
345
- include_datastores_with_tags=True,
346
- ),
347
- vsphere.VmStoragePolicyTagRuleArgs(
348
- tag_category=data["vsphere_tag_category"]["replication"]["name"],
349
- tags=[data["vsphere_tag"]["non_replicated"]["name"]],
350
- include_datastores_with_tags=True,
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
- Lasttly, when creating a virtual machine resource, a storage policy can be specificed to direct virtual machine placement to a datastore which matches the policy's `tags_rules`.
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("prodVm", storage_policy_id=data["vsphere_storage_policy"]["storage_policy"]["prod_platinum_replicated"]["id"])
366
- # ... other configuration ...
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[pulumi.InputType['VmStoragePolicyTagRuleArgs']]]]] = None,
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[pulumi.InputType['VmStoragePolicyTagRuleArgs']]]]] = None) -> 'VmStoragePolicy':
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[pulumi.InputType['VmStoragePolicyTagRuleArgs']]]] tag_rules: List of tag rules. The tag category and tags to be associated to this storage policy.
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