pulumi-vsphere 4.10.0a1709017641__py3-none-any.whl → 4.17.0a1763710194__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 (89) hide show
  1. pulumi_vsphere/__init__.py +51 -1
  2. pulumi_vsphere/_inputs.py +2568 -1025
  3. pulumi_vsphere/_utilities.py +50 -10
  4. pulumi_vsphere/compute_cluster.py +1564 -2373
  5. pulumi_vsphere/compute_cluster_host_group.py +191 -55
  6. pulumi_vsphere/compute_cluster_vm_affinity_rule.py +157 -113
  7. pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +133 -89
  8. pulumi_vsphere/compute_cluster_vm_dependency_rule.py +314 -106
  9. pulumi_vsphere/compute_cluster_vm_group.py +256 -55
  10. pulumi_vsphere/compute_cluster_vm_host_rule.py +323 -123
  11. pulumi_vsphere/config/__init__.py +2 -1
  12. pulumi_vsphere/config/__init__.pyi +7 -2
  13. pulumi_vsphere/config/vars.py +20 -15
  14. pulumi_vsphere/configuration_profile.py +286 -0
  15. pulumi_vsphere/content_library.py +177 -71
  16. pulumi_vsphere/content_library_item.py +252 -106
  17. pulumi_vsphere/custom_attribute.py +118 -38
  18. pulumi_vsphere/datacenter.py +128 -107
  19. pulumi_vsphere/datastore_cluster.py +636 -731
  20. pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +251 -89
  21. pulumi_vsphere/distributed_port_group.py +1129 -967
  22. pulumi_vsphere/distributed_virtual_switch.py +1971 -2239
  23. pulumi_vsphere/distributed_virtual_switch_pvlan_mapping.py +294 -0
  24. pulumi_vsphere/dpm_host_override.py +222 -72
  25. pulumi_vsphere/drs_vm_override.py +236 -72
  26. pulumi_vsphere/entity_permissions.py +96 -69
  27. pulumi_vsphere/file.py +173 -178
  28. pulumi_vsphere/folder.py +236 -113
  29. pulumi_vsphere/get_compute_cluster.py +34 -23
  30. pulumi_vsphere/get_compute_cluster_host_group.py +52 -41
  31. pulumi_vsphere/get_configuration_profile.py +145 -0
  32. pulumi_vsphere/get_content_library.py +33 -21
  33. pulumi_vsphere/get_content_library_item.py +47 -31
  34. pulumi_vsphere/get_custom_attribute.py +26 -17
  35. pulumi_vsphere/get_datacenter.py +40 -18
  36. pulumi_vsphere/get_datastore.py +60 -24
  37. pulumi_vsphere/get_datastore_cluster.py +47 -22
  38. pulumi_vsphere/get_datastore_stats.py +204 -0
  39. pulumi_vsphere/get_distributed_virtual_switch.py +36 -23
  40. pulumi_vsphere/get_dynamic.py +55 -45
  41. pulumi_vsphere/get_folder.py +163 -25
  42. pulumi_vsphere/get_guest_os_customization.py +68 -37
  43. pulumi_vsphere/get_host.py +34 -23
  44. pulumi_vsphere/get_host_base_images.py +104 -0
  45. pulumi_vsphere/get_host_pci_device.py +78 -35
  46. pulumi_vsphere/get_host_thumbprint.py +58 -38
  47. pulumi_vsphere/get_host_vgpu_profile.py +195 -0
  48. pulumi_vsphere/get_license.py +44 -28
  49. pulumi_vsphere/get_network.py +157 -46
  50. pulumi_vsphere/get_ovf_vm_template.py +184 -301
  51. pulumi_vsphere/get_policy.py +23 -15
  52. pulumi_vsphere/get_resource_pool.py +107 -40
  53. pulumi_vsphere/get_role.py +49 -35
  54. pulumi_vsphere/get_tag.py +34 -23
  55. pulumi_vsphere/get_tag_category.py +32 -21
  56. pulumi_vsphere/get_vapp_container.py +31 -21
  57. pulumi_vsphere/get_virtual_machine.py +499 -287
  58. pulumi_vsphere/get_vmfs_disks.py +42 -29
  59. pulumi_vsphere/guest_os_customization.py +135 -79
  60. pulumi_vsphere/ha_vm_override.py +470 -577
  61. pulumi_vsphere/host.py +515 -262
  62. pulumi_vsphere/host_port_group.py +352 -355
  63. pulumi_vsphere/host_virtual_switch.py +580 -580
  64. pulumi_vsphere/license.py +110 -92
  65. pulumi_vsphere/nas_datastore.py +398 -270
  66. pulumi_vsphere/offline_software_depot.py +190 -0
  67. pulumi_vsphere/outputs.py +1582 -1027
  68. pulumi_vsphere/provider.py +172 -152
  69. pulumi_vsphere/pulumi-plugin.json +2 -1
  70. pulumi_vsphere/resource_pool.py +357 -273
  71. pulumi_vsphere/role.py +79 -47
  72. pulumi_vsphere/storage_drs_vm_override.py +225 -89
  73. pulumi_vsphere/supervisor.py +1064 -0
  74. pulumi_vsphere/tag.py +217 -55
  75. pulumi_vsphere/tag_category.py +158 -72
  76. pulumi_vsphere/vapp_container.py +425 -259
  77. pulumi_vsphere/vapp_entity.py +324 -174
  78. pulumi_vsphere/virtual_disk.py +245 -153
  79. pulumi_vsphere/virtual_machine.py +1696 -1836
  80. pulumi_vsphere/virtual_machine_class.py +448 -0
  81. pulumi_vsphere/virtual_machine_snapshot.py +137 -131
  82. pulumi_vsphere/vm_storage_policy.py +160 -154
  83. pulumi_vsphere/vmfs_datastore.py +460 -186
  84. pulumi_vsphere/vnic.py +249 -231
  85. {pulumi_vsphere-4.10.0a1709017641.dist-info → pulumi_vsphere-4.17.0a1763710194.dist-info}/METADATA +7 -6
  86. pulumi_vsphere-4.17.0a1763710194.dist-info/RECORD +89 -0
  87. {pulumi_vsphere-4.10.0a1709017641.dist-info → pulumi_vsphere-4.17.0a1763710194.dist-info}/WHEEL +1 -1
  88. pulumi_vsphere-4.10.0a1709017641.dist-info/RECORD +0 -80
  89. {pulumi_vsphere-4.10.0a1709017641.dist-info → pulumi_vsphere-4.17.0a1763710194.dist-info}/top_level.txt +0 -0
@@ -1,12 +1,17 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
- import copy
5
+ import builtins as _builtins
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 *
@@ -17,13 +22,13 @@ __all__ = ['VmStoragePolicyArgs', 'VmStoragePolicy']
17
22
  class VmStoragePolicyArgs:
18
23
  def __init__(__self__, *,
19
24
  tag_rules: pulumi.Input[Sequence[pulumi.Input['VmStoragePolicyTagRuleArgs']]],
20
- description: Optional[pulumi.Input[str]] = None,
21
- name: Optional[pulumi.Input[str]] = None):
25
+ description: Optional[pulumi.Input[_builtins.str]] = None,
26
+ name: Optional[pulumi.Input[_builtins.str]] = None):
22
27
  """
23
28
  The set of arguments for constructing a VmStoragePolicy resource.
24
29
  :param pulumi.Input[Sequence[pulumi.Input['VmStoragePolicyTagRuleArgs']]] tag_rules: List of tag rules. The tag category and tags to be associated to this storage policy.
25
- :param pulumi.Input[str] description: Description of the storage policy.
26
- :param pulumi.Input[str] name: The name of the storage policy.
30
+ :param pulumi.Input[_builtins.str] description: Description of the storage policy.
31
+ :param pulumi.Input[_builtins.str] name: The name of the storage policy.
27
32
  """
28
33
  pulumi.set(__self__, "tag_rules", tag_rules)
29
34
  if description is not None:
@@ -31,7 +36,7 @@ class VmStoragePolicyArgs:
31
36
  if name is not None:
32
37
  pulumi.set(__self__, "name", name)
33
38
 
34
- @property
39
+ @_builtins.property
35
40
  @pulumi.getter(name="tagRules")
36
41
  def tag_rules(self) -> pulumi.Input[Sequence[pulumi.Input['VmStoragePolicyTagRuleArgs']]]:
37
42
  """
@@ -43,41 +48,41 @@ class VmStoragePolicyArgs:
43
48
  def tag_rules(self, value: pulumi.Input[Sequence[pulumi.Input['VmStoragePolicyTagRuleArgs']]]):
44
49
  pulumi.set(self, "tag_rules", value)
45
50
 
46
- @property
51
+ @_builtins.property
47
52
  @pulumi.getter
48
- def description(self) -> Optional[pulumi.Input[str]]:
53
+ def description(self) -> Optional[pulumi.Input[_builtins.str]]:
49
54
  """
50
55
  Description of the storage policy.
51
56
  """
52
57
  return pulumi.get(self, "description")
53
58
 
54
59
  @description.setter
55
- def description(self, value: Optional[pulumi.Input[str]]):
60
+ def description(self, value: Optional[pulumi.Input[_builtins.str]]):
56
61
  pulumi.set(self, "description", value)
57
62
 
58
- @property
63
+ @_builtins.property
59
64
  @pulumi.getter
60
- def name(self) -> Optional[pulumi.Input[str]]:
65
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
61
66
  """
62
67
  The name of the storage policy.
63
68
  """
64
69
  return pulumi.get(self, "name")
65
70
 
66
71
  @name.setter
67
- def name(self, value: Optional[pulumi.Input[str]]):
72
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
68
73
  pulumi.set(self, "name", value)
69
74
 
70
75
 
71
76
  @pulumi.input_type
72
77
  class _VmStoragePolicyState:
73
78
  def __init__(__self__, *,
74
- description: Optional[pulumi.Input[str]] = None,
75
- name: Optional[pulumi.Input[str]] = None,
79
+ description: Optional[pulumi.Input[_builtins.str]] = None,
80
+ name: Optional[pulumi.Input[_builtins.str]] = None,
76
81
  tag_rules: Optional[pulumi.Input[Sequence[pulumi.Input['VmStoragePolicyTagRuleArgs']]]] = None):
77
82
  """
78
83
  Input properties used for looking up and filtering VmStoragePolicy resources.
79
- :param pulumi.Input[str] description: Description of the storage policy.
80
- :param pulumi.Input[str] name: The name of the storage policy.
84
+ :param pulumi.Input[_builtins.str] description: Description of the storage policy.
85
+ :param pulumi.Input[_builtins.str] name: The name of the storage policy.
81
86
  :param pulumi.Input[Sequence[pulumi.Input['VmStoragePolicyTagRuleArgs']]] tag_rules: List of tag rules. The tag category and tags to be associated to this storage policy.
82
87
  """
83
88
  if description is not None:
@@ -87,31 +92,31 @@ class _VmStoragePolicyState:
87
92
  if tag_rules is not None:
88
93
  pulumi.set(__self__, "tag_rules", tag_rules)
89
94
 
90
- @property
95
+ @_builtins.property
91
96
  @pulumi.getter
92
- def description(self) -> Optional[pulumi.Input[str]]:
97
+ def description(self) -> Optional[pulumi.Input[_builtins.str]]:
93
98
  """
94
99
  Description of the storage policy.
95
100
  """
96
101
  return pulumi.get(self, "description")
97
102
 
98
103
  @description.setter
99
- def description(self, value: Optional[pulumi.Input[str]]):
104
+ def description(self, value: Optional[pulumi.Input[_builtins.str]]):
100
105
  pulumi.set(self, "description", value)
101
106
 
102
- @property
107
+ @_builtins.property
103
108
  @pulumi.getter
104
- def name(self) -> Optional[pulumi.Input[str]]:
109
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
105
110
  """
106
111
  The name of the storage policy.
107
112
  """
108
113
  return pulumi.get(self, "name")
109
114
 
110
115
  @name.setter
111
- def name(self, value: Optional[pulumi.Input[str]]):
116
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
112
117
  pulumi.set(self, "name", value)
113
118
 
114
- @property
119
+ @_builtins.property
115
120
  @pulumi.getter(name="tagRules")
116
121
  def tag_rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['VmStoragePolicyTagRuleArgs']]]]:
117
122
  """
@@ -124,14 +129,15 @@ class _VmStoragePolicyState:
124
129
  pulumi.set(self, "tag_rules", value)
125
130
 
126
131
 
132
+ @pulumi.type_token("vsphere:index/vmStoragePolicy:VmStoragePolicy")
127
133
  class VmStoragePolicy(pulumi.CustomResource):
128
134
  @overload
129
135
  def __init__(__self__,
130
136
  resource_name: str,
131
137
  opts: Optional[pulumi.ResourceOptions] = None,
132
- description: Optional[pulumi.Input[str]] = None,
133
- name: Optional[pulumi.Input[str]] = None,
134
- tag_rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['VmStoragePolicyTagRuleArgs']]]]] = None,
138
+ description: Optional[pulumi.Input[_builtins.str]] = None,
139
+ name: Optional[pulumi.Input[_builtins.str]] = None,
140
+ tag_rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['VmStoragePolicyTagRuleArgs', 'VmStoragePolicyTagRuleArgsDict']]]]] = None,
135
141
  __props__=None):
136
142
  """
137
143
  The `VmStoragePolicy` resource can be used to create and manage storage
@@ -151,28 +157,28 @@ class VmStoragePolicy(pulumi.CustomResource):
151
157
  environment = vsphere.get_tag_category(name="environment")
152
158
  service_level = vsphere.get_tag_category(name="service_level")
153
159
  replication = vsphere.get_tag_category(name="replication")
154
- production = vsphere.get_tag(category_id="data.vsphere_tag_category.environment.id",
155
- name="production")
156
- development = vsphere.get_tag(category_id="data.vsphere_tag_category.environment.id",
157
- name="development")
158
- platinum = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id",
159
- name="platinum")
160
- gold = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id",
161
- name="platinum")
162
- silver = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id",
163
- name="silver")
164
- bronze = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id",
165
- name="bronze")
166
- replicated = vsphere.get_tag(category_id="data.vsphere_tag_category.replication.id",
167
- name="replicated")
168
- non_replicated = vsphere.get_tag(category_id="data.vsphere_tag_category.replication.id",
169
- name="non_replicated")
170
- prod_datastore = vsphere.VmfsDatastore("prodDatastore", tags=[
160
+ production = vsphere.get_tag(name="production",
161
+ category_id="data.vsphere_tag_category.environment.id")
162
+ development = vsphere.get_tag(name="development",
163
+ category_id="data.vsphere_tag_category.environment.id")
164
+ platinum = vsphere.get_tag(name="platinum",
165
+ category_id="data.vsphere_tag_category.service_level.id")
166
+ gold = vsphere.get_tag(name="platinum",
167
+ category_id="data.vsphere_tag_category.service_level.id")
168
+ silver = vsphere.get_tag(name="silver",
169
+ category_id="data.vsphere_tag_category.service_level.id")
170
+ bronze = vsphere.get_tag(name="bronze",
171
+ category_id="data.vsphere_tag_category.service_level.id")
172
+ replicated = vsphere.get_tag(name="replicated",
173
+ category_id="data.vsphere_tag_category.replication.id")
174
+ non_replicated = vsphere.get_tag(name="non_replicated",
175
+ category_id="data.vsphere_tag_category.replication.id")
176
+ prod_datastore = vsphere.VmfsDatastore("prod_datastore", tags=[
171
177
  "data.vsphere_tag.production.id",
172
178
  "data.vsphere_tag.platinum.id",
173
179
  "data.vsphere_tag.replicated.id",
174
180
  ])
175
- dev_datastore = vsphere.NasDatastore("devDatastore", tags=[
181
+ dev_datastore = vsphere.NasDatastore("dev_datastore", tags=[
176
182
  "data.vsphere_tag.development.id",
177
183
  "data.vsphere_tag.silver.id",
178
184
  "data.vsphere_tag.non_replicated.id",
@@ -185,47 +191,49 @@ class VmStoragePolicy(pulumi.CustomResource):
185
191
  import pulumi
186
192
  import pulumi_vsphere as vsphere
187
193
 
188
- prod_platinum_replicated = vsphere.VmStoragePolicy("prodPlatinumReplicated",
194
+ prod_platinum_replicated = vsphere.VmStoragePolicy("prod_platinum_replicated",
195
+ name="prod_platinum_replicated",
189
196
  description="prod_platinum_replicated",
190
197
  tag_rules=[
191
- vsphere.VmStoragePolicyTagRuleArgs(
192
- tag_category=data["vsphere_tag_category"]["environment"]["name"],
193
- tags=[data["vsphere_tag"]["production"]["name"]],
194
- include_datastores_with_tags=True,
195
- ),
196
- vsphere.VmStoragePolicyTagRuleArgs(
197
- tag_category=data["vsphere_tag_category"]["service_level"]["name"],
198
- tags=[data["vsphere_tag"]["platinum"]["name"]],
199
- include_datastores_with_tags=True,
200
- ),
201
- vsphere.VmStoragePolicyTagRuleArgs(
202
- tag_category=data["vsphere_tag_category"]["replication"]["name"],
203
- tags=[data["vsphere_tag"]["replicated"]["name"]],
204
- include_datastores_with_tags=True,
205
- ),
198
+ {
199
+ "tag_category": environment["name"],
200
+ "tags": [production["name"]],
201
+ "include_datastores_with_tags": True,
202
+ },
203
+ {
204
+ "tag_category": service_level["name"],
205
+ "tags": [platinum["name"]],
206
+ "include_datastores_with_tags": True,
207
+ },
208
+ {
209
+ "tag_category": replication["name"],
210
+ "tags": [replicated["name"]],
211
+ "include_datastores_with_tags": True,
212
+ },
206
213
  ])
207
- dev_silver_nonreplicated = vsphere.VmStoragePolicy("devSilverNonreplicated",
214
+ dev_silver_nonreplicated = vsphere.VmStoragePolicy("dev_silver_nonreplicated",
215
+ name="dev_silver_nonreplicated",
208
216
  description="dev_silver_nonreplicated",
209
217
  tag_rules=[
210
- vsphere.VmStoragePolicyTagRuleArgs(
211
- tag_category=data["vsphere_tag_category"]["environment"]["name"],
212
- tags=[data["vsphere_tag"]["development"]["name"]],
213
- include_datastores_with_tags=True,
214
- ),
215
- vsphere.VmStoragePolicyTagRuleArgs(
216
- tag_category=data["vsphere_tag_category"]["service_level"]["name"],
217
- tags=[data["vsphere_tag"]["silver"]["name"]],
218
- include_datastores_with_tags=True,
219
- ),
220
- vsphere.VmStoragePolicyTagRuleArgs(
221
- tag_category=data["vsphere_tag_category"]["replication"]["name"],
222
- tags=[data["vsphere_tag"]["non_replicated"]["name"]],
223
- include_datastores_with_tags=True,
224
- ),
218
+ {
219
+ "tag_category": environment["name"],
220
+ "tags": [development["name"]],
221
+ "include_datastores_with_tags": True,
222
+ },
223
+ {
224
+ "tag_category": service_level["name"],
225
+ "tags": [silver["name"]],
226
+ "include_datastores_with_tags": True,
227
+ },
228
+ {
229
+ "tag_category": replication["name"],
230
+ "tags": [non_replicated["name"]],
231
+ "include_datastores_with_tags": True,
232
+ },
225
233
  ])
226
234
  ```
227
235
 
228
- 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`.
236
+ 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`.
229
237
 
230
238
  ```python
231
239
  import pulumi
@@ -233,17 +241,15 @@ class VmStoragePolicy(pulumi.CustomResource):
233
241
 
234
242
  prod_platinum_replicated = vsphere.get_policy(name="prod_platinum_replicated")
235
243
  dev_silver_nonreplicated = vsphere.get_policy(name="dev_silver_nonreplicated")
236
- prod_vm = vsphere.VirtualMachine("prodVm", storage_policy_id=data["vsphere_storage_policy"]["storage_policy"]["prod_platinum_replicated"]["id"])
237
- # ... other configuration ...
238
- dev_vm = vsphere.VirtualMachine("devVm", storage_policy_id=data["vsphere_storage_policy"]["storage_policy"]["dev_silver_nonreplicated"]["id"])
239
- # ... other configuration ...
244
+ prod_vm = vsphere.VirtualMachine("prod_vm", storage_policy_id=storage_policy["prodPlatinumReplicated"]["id"])
245
+ dev_vm = vsphere.VirtualMachine("dev_vm", storage_policy_id=storage_policy["devSilverNonreplicated"]["id"])
240
246
  ```
241
247
 
242
248
  :param str resource_name: The name of the resource.
243
249
  :param pulumi.ResourceOptions opts: Options for the resource.
244
- :param pulumi.Input[str] description: Description of the storage policy.
245
- :param pulumi.Input[str] name: The name of the storage policy.
246
- :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.
250
+ :param pulumi.Input[_builtins.str] description: Description of the storage policy.
251
+ :param pulumi.Input[_builtins.str] name: The name of the storage policy.
252
+ :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.
247
253
  """
248
254
  ...
249
255
  @overload
@@ -269,28 +275,28 @@ class VmStoragePolicy(pulumi.CustomResource):
269
275
  environment = vsphere.get_tag_category(name="environment")
270
276
  service_level = vsphere.get_tag_category(name="service_level")
271
277
  replication = vsphere.get_tag_category(name="replication")
272
- production = vsphere.get_tag(category_id="data.vsphere_tag_category.environment.id",
273
- name="production")
274
- development = vsphere.get_tag(category_id="data.vsphere_tag_category.environment.id",
275
- name="development")
276
- platinum = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id",
277
- name="platinum")
278
- gold = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id",
279
- name="platinum")
280
- silver = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id",
281
- name="silver")
282
- bronze = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id",
283
- name="bronze")
284
- replicated = vsphere.get_tag(category_id="data.vsphere_tag_category.replication.id",
285
- name="replicated")
286
- non_replicated = vsphere.get_tag(category_id="data.vsphere_tag_category.replication.id",
287
- name="non_replicated")
288
- prod_datastore = vsphere.VmfsDatastore("prodDatastore", tags=[
278
+ production = vsphere.get_tag(name="production",
279
+ category_id="data.vsphere_tag_category.environment.id")
280
+ development = vsphere.get_tag(name="development",
281
+ category_id="data.vsphere_tag_category.environment.id")
282
+ platinum = vsphere.get_tag(name="platinum",
283
+ category_id="data.vsphere_tag_category.service_level.id")
284
+ gold = vsphere.get_tag(name="platinum",
285
+ category_id="data.vsphere_tag_category.service_level.id")
286
+ silver = vsphere.get_tag(name="silver",
287
+ category_id="data.vsphere_tag_category.service_level.id")
288
+ bronze = vsphere.get_tag(name="bronze",
289
+ category_id="data.vsphere_tag_category.service_level.id")
290
+ replicated = vsphere.get_tag(name="replicated",
291
+ category_id="data.vsphere_tag_category.replication.id")
292
+ non_replicated = vsphere.get_tag(name="non_replicated",
293
+ category_id="data.vsphere_tag_category.replication.id")
294
+ prod_datastore = vsphere.VmfsDatastore("prod_datastore", tags=[
289
295
  "data.vsphere_tag.production.id",
290
296
  "data.vsphere_tag.platinum.id",
291
297
  "data.vsphere_tag.replicated.id",
292
298
  ])
293
- dev_datastore = vsphere.NasDatastore("devDatastore", tags=[
299
+ dev_datastore = vsphere.NasDatastore("dev_datastore", tags=[
294
300
  "data.vsphere_tag.development.id",
295
301
  "data.vsphere_tag.silver.id",
296
302
  "data.vsphere_tag.non_replicated.id",
@@ -303,47 +309,49 @@ class VmStoragePolicy(pulumi.CustomResource):
303
309
  import pulumi
304
310
  import pulumi_vsphere as vsphere
305
311
 
306
- prod_platinum_replicated = vsphere.VmStoragePolicy("prodPlatinumReplicated",
312
+ prod_platinum_replicated = vsphere.VmStoragePolicy("prod_platinum_replicated",
313
+ name="prod_platinum_replicated",
307
314
  description="prod_platinum_replicated",
308
315
  tag_rules=[
309
- vsphere.VmStoragePolicyTagRuleArgs(
310
- tag_category=data["vsphere_tag_category"]["environment"]["name"],
311
- tags=[data["vsphere_tag"]["production"]["name"]],
312
- include_datastores_with_tags=True,
313
- ),
314
- vsphere.VmStoragePolicyTagRuleArgs(
315
- tag_category=data["vsphere_tag_category"]["service_level"]["name"],
316
- tags=[data["vsphere_tag"]["platinum"]["name"]],
317
- include_datastores_with_tags=True,
318
- ),
319
- vsphere.VmStoragePolicyTagRuleArgs(
320
- tag_category=data["vsphere_tag_category"]["replication"]["name"],
321
- tags=[data["vsphere_tag"]["replicated"]["name"]],
322
- include_datastores_with_tags=True,
323
- ),
316
+ {
317
+ "tag_category": environment["name"],
318
+ "tags": [production["name"]],
319
+ "include_datastores_with_tags": True,
320
+ },
321
+ {
322
+ "tag_category": service_level["name"],
323
+ "tags": [platinum["name"]],
324
+ "include_datastores_with_tags": True,
325
+ },
326
+ {
327
+ "tag_category": replication["name"],
328
+ "tags": [replicated["name"]],
329
+ "include_datastores_with_tags": True,
330
+ },
324
331
  ])
325
- dev_silver_nonreplicated = vsphere.VmStoragePolicy("devSilverNonreplicated",
332
+ dev_silver_nonreplicated = vsphere.VmStoragePolicy("dev_silver_nonreplicated",
333
+ name="dev_silver_nonreplicated",
326
334
  description="dev_silver_nonreplicated",
327
335
  tag_rules=[
328
- vsphere.VmStoragePolicyTagRuleArgs(
329
- tag_category=data["vsphere_tag_category"]["environment"]["name"],
330
- tags=[data["vsphere_tag"]["development"]["name"]],
331
- include_datastores_with_tags=True,
332
- ),
333
- vsphere.VmStoragePolicyTagRuleArgs(
334
- tag_category=data["vsphere_tag_category"]["service_level"]["name"],
335
- tags=[data["vsphere_tag"]["silver"]["name"]],
336
- include_datastores_with_tags=True,
337
- ),
338
- vsphere.VmStoragePolicyTagRuleArgs(
339
- tag_category=data["vsphere_tag_category"]["replication"]["name"],
340
- tags=[data["vsphere_tag"]["non_replicated"]["name"]],
341
- include_datastores_with_tags=True,
342
- ),
336
+ {
337
+ "tag_category": environment["name"],
338
+ "tags": [development["name"]],
339
+ "include_datastores_with_tags": True,
340
+ },
341
+ {
342
+ "tag_category": service_level["name"],
343
+ "tags": [silver["name"]],
344
+ "include_datastores_with_tags": True,
345
+ },
346
+ {
347
+ "tag_category": replication["name"],
348
+ "tags": [non_replicated["name"]],
349
+ "include_datastores_with_tags": True,
350
+ },
343
351
  ])
344
352
  ```
345
353
 
346
- 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`.
354
+ 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`.
347
355
 
348
356
  ```python
349
357
  import pulumi
@@ -351,10 +359,8 @@ class VmStoragePolicy(pulumi.CustomResource):
351
359
 
352
360
  prod_platinum_replicated = vsphere.get_policy(name="prod_platinum_replicated")
353
361
  dev_silver_nonreplicated = vsphere.get_policy(name="dev_silver_nonreplicated")
354
- prod_vm = vsphere.VirtualMachine("prodVm", storage_policy_id=data["vsphere_storage_policy"]["storage_policy"]["prod_platinum_replicated"]["id"])
355
- # ... other configuration ...
356
- dev_vm = vsphere.VirtualMachine("devVm", storage_policy_id=data["vsphere_storage_policy"]["storage_policy"]["dev_silver_nonreplicated"]["id"])
357
- # ... other configuration ...
362
+ prod_vm = vsphere.VirtualMachine("prod_vm", storage_policy_id=storage_policy["prodPlatinumReplicated"]["id"])
363
+ dev_vm = vsphere.VirtualMachine("dev_vm", storage_policy_id=storage_policy["devSilverNonreplicated"]["id"])
358
364
  ```
359
365
 
360
366
  :param str resource_name: The name of the resource.
@@ -372,9 +378,9 @@ class VmStoragePolicy(pulumi.CustomResource):
372
378
  def _internal_init(__self__,
373
379
  resource_name: str,
374
380
  opts: Optional[pulumi.ResourceOptions] = None,
375
- description: Optional[pulumi.Input[str]] = None,
376
- name: Optional[pulumi.Input[str]] = None,
377
- tag_rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['VmStoragePolicyTagRuleArgs']]]]] = None,
381
+ description: Optional[pulumi.Input[_builtins.str]] = None,
382
+ name: Optional[pulumi.Input[_builtins.str]] = None,
383
+ tag_rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['VmStoragePolicyTagRuleArgs', 'VmStoragePolicyTagRuleArgsDict']]]]] = None,
378
384
  __props__=None):
379
385
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
380
386
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -399,9 +405,9 @@ class VmStoragePolicy(pulumi.CustomResource):
399
405
  def get(resource_name: str,
400
406
  id: pulumi.Input[str],
401
407
  opts: Optional[pulumi.ResourceOptions] = None,
402
- description: Optional[pulumi.Input[str]] = None,
403
- name: Optional[pulumi.Input[str]] = None,
404
- tag_rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['VmStoragePolicyTagRuleArgs']]]]] = None) -> 'VmStoragePolicy':
408
+ description: Optional[pulumi.Input[_builtins.str]] = None,
409
+ name: Optional[pulumi.Input[_builtins.str]] = None,
410
+ tag_rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['VmStoragePolicyTagRuleArgs', 'VmStoragePolicyTagRuleArgsDict']]]]] = None) -> 'VmStoragePolicy':
405
411
  """
406
412
  Get an existing VmStoragePolicy resource's state with the given name, id, and optional extra
407
413
  properties used to qualify the lookup.
@@ -409,9 +415,9 @@ class VmStoragePolicy(pulumi.CustomResource):
409
415
  :param str resource_name: The unique name of the resulting resource.
410
416
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
411
417
  :param pulumi.ResourceOptions opts: Options for the resource.
412
- :param pulumi.Input[str] description: Description of the storage policy.
413
- :param pulumi.Input[str] name: The name of the storage policy.
414
- :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.
418
+ :param pulumi.Input[_builtins.str] description: Description of the storage policy.
419
+ :param pulumi.Input[_builtins.str] name: The name of the storage policy.
420
+ :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.
415
421
  """
416
422
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
417
423
 
@@ -422,23 +428,23 @@ class VmStoragePolicy(pulumi.CustomResource):
422
428
  __props__.__dict__["tag_rules"] = tag_rules
423
429
  return VmStoragePolicy(resource_name, opts=opts, __props__=__props__)
424
430
 
425
- @property
431
+ @_builtins.property
426
432
  @pulumi.getter
427
- def description(self) -> pulumi.Output[Optional[str]]:
433
+ def description(self) -> pulumi.Output[Optional[_builtins.str]]:
428
434
  """
429
435
  Description of the storage policy.
430
436
  """
431
437
  return pulumi.get(self, "description")
432
438
 
433
- @property
439
+ @_builtins.property
434
440
  @pulumi.getter
435
- def name(self) -> pulumi.Output[str]:
441
+ def name(self) -> pulumi.Output[_builtins.str]:
436
442
  """
437
443
  The name of the storage policy.
438
444
  """
439
445
  return pulumi.get(self, "name")
440
446
 
441
- @property
447
+ @_builtins.property
442
448
  @pulumi.getter(name="tagRules")
443
449
  def tag_rules(self) -> pulumi.Output[Sequence['outputs.VmStoragePolicyTagRule']]:
444
450
  """