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
 
12
17
  __all__ = ['ComputeClusterVmDependencyRuleArgs', 'ComputeClusterVmDependencyRule']
@@ -14,33 +19,33 @@ __all__ = ['ComputeClusterVmDependencyRuleArgs', 'ComputeClusterVmDependencyRule
14
19
  @pulumi.input_type
15
20
  class ComputeClusterVmDependencyRuleArgs:
16
21
  def __init__(__self__, *,
17
- compute_cluster_id: pulumi.Input[str],
18
- dependency_vm_group_name: pulumi.Input[str],
19
- vm_group_name: pulumi.Input[str],
20
- enabled: Optional[pulumi.Input[bool]] = None,
21
- mandatory: Optional[pulumi.Input[bool]] = None,
22
- name: Optional[pulumi.Input[str]] = None):
22
+ compute_cluster_id: pulumi.Input[_builtins.str],
23
+ dependency_vm_group_name: pulumi.Input[_builtins.str],
24
+ vm_group_name: pulumi.Input[_builtins.str],
25
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
26
+ mandatory: Optional[pulumi.Input[_builtins.bool]] = None,
27
+ name: Optional[pulumi.Input[_builtins.str]] = None):
23
28
  """
24
29
  The set of arguments for constructing a ComputeClusterVmDependencyRule resource.
25
- :param pulumi.Input[str] compute_cluster_id: The managed object reference
30
+ :param pulumi.Input[_builtins.str] compute_cluster_id: The managed object reference
26
31
  ID of the cluster to put the group in. Forces a new
27
32
  resource if changed.
28
- :param pulumi.Input[str] dependency_vm_group_name: The name of the VM group that this
33
+ :param pulumi.Input[_builtins.str] dependency_vm_group_name: The name of the VM group that this
29
34
  rule depends on. The VMs defined in the group specified by
30
35
  `vm_group_name` will not be started until the VMs in this
31
36
  group are started.
32
- :param pulumi.Input[str] vm_group_name: The name of the VM group that is the subject of
37
+ :param pulumi.Input[_builtins.str] vm_group_name: The name of the VM group that is the subject of
33
38
  this rule. The VMs defined in this group will not be started until the VMs in
34
39
  the group specified by
35
40
  `dependency_vm_group_name` are started.
36
- :param pulumi.Input[bool] enabled: Enable this rule in the cluster. Default: `true`.
37
- :param pulumi.Input[bool] mandatory: When this value is `true`, prevents any virtual
41
+ :param pulumi.Input[_builtins.bool] enabled: Enable this rule in the cluster. Default: `true`.
42
+ :param pulumi.Input[_builtins.bool] mandatory: When this value is `true`, prevents any virtual
38
43
  machine operations that may violate this rule. Default: `false`.
39
44
 
40
45
  > **NOTE:** The namespace for rule names on this resource (defined by the
41
46
  `name` argument) is shared with all rules in the cluster - consider
42
47
  this when naming your rules.
43
- :param pulumi.Input[str] name: The name of the rule. This must be unique in the
48
+ :param pulumi.Input[_builtins.str] name: The name of the rule. This must be unique in the
44
49
  cluster.
45
50
  """
46
51
  pulumi.set(__self__, "compute_cluster_id", compute_cluster_id)
@@ -53,9 +58,9 @@ class ComputeClusterVmDependencyRuleArgs:
53
58
  if name is not None:
54
59
  pulumi.set(__self__, "name", name)
55
60
 
56
- @property
61
+ @_builtins.property
57
62
  @pulumi.getter(name="computeClusterId")
58
- def compute_cluster_id(self) -> pulumi.Input[str]:
63
+ def compute_cluster_id(self) -> pulumi.Input[_builtins.str]:
59
64
  """
60
65
  The managed object reference
61
66
  ID of the cluster to put the group in. Forces a new
@@ -64,12 +69,12 @@ class ComputeClusterVmDependencyRuleArgs:
64
69
  return pulumi.get(self, "compute_cluster_id")
65
70
 
66
71
  @compute_cluster_id.setter
67
- def compute_cluster_id(self, value: pulumi.Input[str]):
72
+ def compute_cluster_id(self, value: pulumi.Input[_builtins.str]):
68
73
  pulumi.set(self, "compute_cluster_id", value)
69
74
 
70
- @property
75
+ @_builtins.property
71
76
  @pulumi.getter(name="dependencyVmGroupName")
72
- def dependency_vm_group_name(self) -> pulumi.Input[str]:
77
+ def dependency_vm_group_name(self) -> pulumi.Input[_builtins.str]:
73
78
  """
74
79
  The name of the VM group that this
75
80
  rule depends on. The VMs defined in the group specified by
@@ -79,12 +84,12 @@ class ComputeClusterVmDependencyRuleArgs:
79
84
  return pulumi.get(self, "dependency_vm_group_name")
80
85
 
81
86
  @dependency_vm_group_name.setter
82
- def dependency_vm_group_name(self, value: pulumi.Input[str]):
87
+ def dependency_vm_group_name(self, value: pulumi.Input[_builtins.str]):
83
88
  pulumi.set(self, "dependency_vm_group_name", value)
84
89
 
85
- @property
90
+ @_builtins.property
86
91
  @pulumi.getter(name="vmGroupName")
87
- def vm_group_name(self) -> pulumi.Input[str]:
92
+ def vm_group_name(self) -> pulumi.Input[_builtins.str]:
88
93
  """
89
94
  The name of the VM group that is the subject of
90
95
  this rule. The VMs defined in this group will not be started until the VMs in
@@ -94,24 +99,24 @@ class ComputeClusterVmDependencyRuleArgs:
94
99
  return pulumi.get(self, "vm_group_name")
95
100
 
96
101
  @vm_group_name.setter
97
- def vm_group_name(self, value: pulumi.Input[str]):
102
+ def vm_group_name(self, value: pulumi.Input[_builtins.str]):
98
103
  pulumi.set(self, "vm_group_name", value)
99
104
 
100
- @property
105
+ @_builtins.property
101
106
  @pulumi.getter
102
- def enabled(self) -> Optional[pulumi.Input[bool]]:
107
+ def enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
103
108
  """
104
109
  Enable this rule in the cluster. Default: `true`.
105
110
  """
106
111
  return pulumi.get(self, "enabled")
107
112
 
108
113
  @enabled.setter
109
- def enabled(self, value: Optional[pulumi.Input[bool]]):
114
+ def enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
110
115
  pulumi.set(self, "enabled", value)
111
116
 
112
- @property
117
+ @_builtins.property
113
118
  @pulumi.getter
114
- def mandatory(self) -> Optional[pulumi.Input[bool]]:
119
+ def mandatory(self) -> Optional[pulumi.Input[_builtins.bool]]:
115
120
  """
116
121
  When this value is `true`, prevents any virtual
117
122
  machine operations that may violate this rule. Default: `false`.
@@ -123,12 +128,12 @@ class ComputeClusterVmDependencyRuleArgs:
123
128
  return pulumi.get(self, "mandatory")
124
129
 
125
130
  @mandatory.setter
126
- def mandatory(self, value: Optional[pulumi.Input[bool]]):
131
+ def mandatory(self, value: Optional[pulumi.Input[_builtins.bool]]):
127
132
  pulumi.set(self, "mandatory", value)
128
133
 
129
- @property
134
+ @_builtins.property
130
135
  @pulumi.getter
131
- def name(self) -> Optional[pulumi.Input[str]]:
136
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
132
137
  """
133
138
  The name of the rule. This must be unique in the
134
139
  cluster.
@@ -136,38 +141,38 @@ class ComputeClusterVmDependencyRuleArgs:
136
141
  return pulumi.get(self, "name")
137
142
 
138
143
  @name.setter
139
- def name(self, value: Optional[pulumi.Input[str]]):
144
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
140
145
  pulumi.set(self, "name", value)
141
146
 
142
147
 
143
148
  @pulumi.input_type
144
149
  class _ComputeClusterVmDependencyRuleState:
145
150
  def __init__(__self__, *,
146
- compute_cluster_id: Optional[pulumi.Input[str]] = None,
147
- dependency_vm_group_name: Optional[pulumi.Input[str]] = None,
148
- enabled: Optional[pulumi.Input[bool]] = None,
149
- mandatory: Optional[pulumi.Input[bool]] = None,
150
- name: Optional[pulumi.Input[str]] = None,
151
- vm_group_name: Optional[pulumi.Input[str]] = None):
151
+ compute_cluster_id: Optional[pulumi.Input[_builtins.str]] = None,
152
+ dependency_vm_group_name: Optional[pulumi.Input[_builtins.str]] = None,
153
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
154
+ mandatory: Optional[pulumi.Input[_builtins.bool]] = None,
155
+ name: Optional[pulumi.Input[_builtins.str]] = None,
156
+ vm_group_name: Optional[pulumi.Input[_builtins.str]] = None):
152
157
  """
153
158
  Input properties used for looking up and filtering ComputeClusterVmDependencyRule resources.
154
- :param pulumi.Input[str] compute_cluster_id: The managed object reference
159
+ :param pulumi.Input[_builtins.str] compute_cluster_id: The managed object reference
155
160
  ID of the cluster to put the group in. Forces a new
156
161
  resource if changed.
157
- :param pulumi.Input[str] dependency_vm_group_name: The name of the VM group that this
162
+ :param pulumi.Input[_builtins.str] dependency_vm_group_name: The name of the VM group that this
158
163
  rule depends on. The VMs defined in the group specified by
159
164
  `vm_group_name` will not be started until the VMs in this
160
165
  group are started.
161
- :param pulumi.Input[bool] enabled: Enable this rule in the cluster. Default: `true`.
162
- :param pulumi.Input[bool] mandatory: When this value is `true`, prevents any virtual
166
+ :param pulumi.Input[_builtins.bool] enabled: Enable this rule in the cluster. Default: `true`.
167
+ :param pulumi.Input[_builtins.bool] mandatory: When this value is `true`, prevents any virtual
163
168
  machine operations that may violate this rule. Default: `false`.
164
169
 
165
170
  > **NOTE:** The namespace for rule names on this resource (defined by the
166
171
  `name` argument) is shared with all rules in the cluster - consider
167
172
  this when naming your rules.
168
- :param pulumi.Input[str] name: The name of the rule. This must be unique in the
173
+ :param pulumi.Input[_builtins.str] name: The name of the rule. This must be unique in the
169
174
  cluster.
170
- :param pulumi.Input[str] vm_group_name: The name of the VM group that is the subject of
175
+ :param pulumi.Input[_builtins.str] vm_group_name: The name of the VM group that is the subject of
171
176
  this rule. The VMs defined in this group will not be started until the VMs in
172
177
  the group specified by
173
178
  `dependency_vm_group_name` are started.
@@ -185,9 +190,9 @@ class _ComputeClusterVmDependencyRuleState:
185
190
  if vm_group_name is not None:
186
191
  pulumi.set(__self__, "vm_group_name", vm_group_name)
187
192
 
188
- @property
193
+ @_builtins.property
189
194
  @pulumi.getter(name="computeClusterId")
190
- def compute_cluster_id(self) -> Optional[pulumi.Input[str]]:
195
+ def compute_cluster_id(self) -> Optional[pulumi.Input[_builtins.str]]:
191
196
  """
192
197
  The managed object reference
193
198
  ID of the cluster to put the group in. Forces a new
@@ -196,12 +201,12 @@ class _ComputeClusterVmDependencyRuleState:
196
201
  return pulumi.get(self, "compute_cluster_id")
197
202
 
198
203
  @compute_cluster_id.setter
199
- def compute_cluster_id(self, value: Optional[pulumi.Input[str]]):
204
+ def compute_cluster_id(self, value: Optional[pulumi.Input[_builtins.str]]):
200
205
  pulumi.set(self, "compute_cluster_id", value)
201
206
 
202
- @property
207
+ @_builtins.property
203
208
  @pulumi.getter(name="dependencyVmGroupName")
204
- def dependency_vm_group_name(self) -> Optional[pulumi.Input[str]]:
209
+ def dependency_vm_group_name(self) -> Optional[pulumi.Input[_builtins.str]]:
205
210
  """
206
211
  The name of the VM group that this
207
212
  rule depends on. The VMs defined in the group specified by
@@ -211,24 +216,24 @@ class _ComputeClusterVmDependencyRuleState:
211
216
  return pulumi.get(self, "dependency_vm_group_name")
212
217
 
213
218
  @dependency_vm_group_name.setter
214
- def dependency_vm_group_name(self, value: Optional[pulumi.Input[str]]):
219
+ def dependency_vm_group_name(self, value: Optional[pulumi.Input[_builtins.str]]):
215
220
  pulumi.set(self, "dependency_vm_group_name", value)
216
221
 
217
- @property
222
+ @_builtins.property
218
223
  @pulumi.getter
219
- def enabled(self) -> Optional[pulumi.Input[bool]]:
224
+ def enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
220
225
  """
221
226
  Enable this rule in the cluster. Default: `true`.
222
227
  """
223
228
  return pulumi.get(self, "enabled")
224
229
 
225
230
  @enabled.setter
226
- def enabled(self, value: Optional[pulumi.Input[bool]]):
231
+ def enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
227
232
  pulumi.set(self, "enabled", value)
228
233
 
229
- @property
234
+ @_builtins.property
230
235
  @pulumi.getter
231
- def mandatory(self) -> Optional[pulumi.Input[bool]]:
236
+ def mandatory(self) -> Optional[pulumi.Input[_builtins.bool]]:
232
237
  """
233
238
  When this value is `true`, prevents any virtual
234
239
  machine operations that may violate this rule. Default: `false`.
@@ -240,12 +245,12 @@ class _ComputeClusterVmDependencyRuleState:
240
245
  return pulumi.get(self, "mandatory")
241
246
 
242
247
  @mandatory.setter
243
- def mandatory(self, value: Optional[pulumi.Input[bool]]):
248
+ def mandatory(self, value: Optional[pulumi.Input[_builtins.bool]]):
244
249
  pulumi.set(self, "mandatory", value)
245
250
 
246
- @property
251
+ @_builtins.property
247
252
  @pulumi.getter
248
- def name(self) -> Optional[pulumi.Input[str]]:
253
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
249
254
  """
250
255
  The name of the rule. This must be unique in the
251
256
  cluster.
@@ -253,12 +258,12 @@ class _ComputeClusterVmDependencyRuleState:
253
258
  return pulumi.get(self, "name")
254
259
 
255
260
  @name.setter
256
- def name(self, value: Optional[pulumi.Input[str]]):
261
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
257
262
  pulumi.set(self, "name", value)
258
263
 
259
- @property
264
+ @_builtins.property
260
265
  @pulumi.getter(name="vmGroupName")
261
- def vm_group_name(self) -> Optional[pulumi.Input[str]]:
266
+ def vm_group_name(self) -> Optional[pulumi.Input[_builtins.str]]:
262
267
  """
263
268
  The name of the VM group that is the subject of
264
269
  this rule. The VMs defined in this group will not be started until the VMs in
@@ -268,43 +273,145 @@ class _ComputeClusterVmDependencyRuleState:
268
273
  return pulumi.get(self, "vm_group_name")
269
274
 
270
275
  @vm_group_name.setter
271
- def vm_group_name(self, value: Optional[pulumi.Input[str]]):
276
+ def vm_group_name(self, value: Optional[pulumi.Input[_builtins.str]]):
272
277
  pulumi.set(self, "vm_group_name", value)
273
278
 
274
279
 
280
+ @pulumi.type_token("vsphere:index/computeClusterVmDependencyRule:ComputeClusterVmDependencyRule")
275
281
  class ComputeClusterVmDependencyRule(pulumi.CustomResource):
276
282
  @overload
277
283
  def __init__(__self__,
278
284
  resource_name: str,
279
285
  opts: Optional[pulumi.ResourceOptions] = None,
280
- compute_cluster_id: Optional[pulumi.Input[str]] = None,
281
- dependency_vm_group_name: Optional[pulumi.Input[str]] = None,
282
- enabled: Optional[pulumi.Input[bool]] = None,
283
- mandatory: Optional[pulumi.Input[bool]] = None,
284
- name: Optional[pulumi.Input[str]] = None,
285
- vm_group_name: Optional[pulumi.Input[str]] = None,
286
+ compute_cluster_id: Optional[pulumi.Input[_builtins.str]] = None,
287
+ dependency_vm_group_name: Optional[pulumi.Input[_builtins.str]] = None,
288
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
289
+ mandatory: Optional[pulumi.Input[_builtins.bool]] = None,
290
+ name: Optional[pulumi.Input[_builtins.str]] = None,
291
+ vm_group_name: Optional[pulumi.Input[_builtins.str]] = None,
286
292
  __props__=None):
287
293
  """
288
- Create a ComputeClusterVmDependencyRule resource with the given unique name, props, and options.
294
+ The `ComputeClusterVmDependencyRule` resource can be used to manage
295
+ VM dependency rules in a cluster, either created by the
296
+ `ComputeCluster` resource or looked up
297
+ by the `ComputeCluster` data source.
298
+
299
+ A virtual machine dependency rule applies to vSphere HA, and allows
300
+ user-defined startup orders for virtual machines in the case of host failure.
301
+ Virtual machines are supplied via groups, which can be managed via the
302
+ `ComputeClusterVmGroup`
303
+ resource.
304
+
305
+ > **NOTE:** This resource requires vCenter and is not available on direct ESXi
306
+ connections.
307
+
308
+ ## Example Usage
309
+
310
+ The example below creates two virtual machine in a cluster using the
311
+ `VirtualMachine` resource in a cluster
312
+ looked up by the `ComputeCluster`
313
+ data source. It then creates a group with this virtual machine. Two groups are created, each with one of the created VMs. Finally, a rule is created to ensure that `vm1` starts before `vm2`.
314
+
315
+ > Note how `dependency_vm_group_name` and
316
+ `vm_group_name` are sourced off of the `name` attributes from
317
+ the `ComputeClusterVmGroup`
318
+ resource. This is to ensure that the rule is not created before the groups
319
+ exist, which may not possibly happen in the event that the names came from a
320
+ "static" source such as a variable.
321
+
322
+ ```python
323
+ import pulumi
324
+ import pulumi_vsphere as vsphere
325
+
326
+ datacenter = vsphere.get_datacenter(name="dc-01")
327
+ datastore = vsphere.get_datastore(name="datastore1",
328
+ datacenter_id=datacenter.id)
329
+ cluster = vsphere.get_compute_cluster(name="cluster-01",
330
+ datacenter_id=datacenter.id)
331
+ network = vsphere.get_network(name="network1",
332
+ datacenter_id=datacenter.id)
333
+ vm1 = vsphere.VirtualMachine("vm1",
334
+ name="test1",
335
+ resource_pool_id=cluster.resource_pool_id,
336
+ datastore_id=datastore.id,
337
+ num_cpus=2,
338
+ memory=2048,
339
+ guest_id="otherLinux64Guest",
340
+ network_interfaces=[{
341
+ "network_id": network.id,
342
+ }],
343
+ disks=[{
344
+ "label": "disk0",
345
+ "size": 20,
346
+ }])
347
+ vm2 = vsphere.VirtualMachine("vm2",
348
+ name="test2",
349
+ resource_pool_id=cluster.resource_pool_id,
350
+ datastore_id=datastore.id,
351
+ num_cpus=2,
352
+ memory=2048,
353
+ guest_id="otherLinux64Guest",
354
+ network_interfaces=[{
355
+ "network_id": network.id,
356
+ }],
357
+ disks=[{
358
+ "label": "disk0",
359
+ "size": 20,
360
+ }])
361
+ cluster_vm_group1 = vsphere.ComputeClusterVmGroup("cluster_vm_group1",
362
+ name="test-cluster-vm-group1",
363
+ compute_cluster_id=cluster.id,
364
+ virtual_machine_ids=[vm1.id])
365
+ cluster_vm_group2 = vsphere.ComputeClusterVmGroup("cluster_vm_group2",
366
+ name="test-cluster-vm-group2",
367
+ compute_cluster_id=cluster.id,
368
+ virtual_machine_ids=[vm2.id])
369
+ cluster_vm_dependency_rule = vsphere.ComputeClusterVmDependencyRule("cluster_vm_dependency_rule",
370
+ compute_cluster_id=cluster.id,
371
+ name="test-cluster-vm-dependency-rule",
372
+ dependency_vm_group_name=cluster_vm_group1.name,
373
+ vm_group_name=cluster_vm_group2.name)
374
+ ```
375
+
376
+ ## Import
377
+
378
+ An existing rule can be imported into this resource by supplying
379
+
380
+ both the path to the cluster, and the name the rule. If the name or cluster is
381
+
382
+ not found, or if the rule is of a different type, an error will be returned. An
383
+
384
+ example is below:
385
+
386
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
387
+
388
+ ```sh
389
+ $ pulumi import vsphere:index/computeClusterVmDependencyRule:ComputeClusterVmDependencyRule cluster_vm_dependency_rule \\
390
+ ```
391
+
392
+ '{"compute_cluster_path": "/dc1/host/cluster1", \\
393
+
394
+ "name": "pulumi-test-cluster-vm-dependency-rule"}'
395
+
289
396
  :param str resource_name: The name of the resource.
290
397
  :param pulumi.ResourceOptions opts: Options for the resource.
291
- :param pulumi.Input[str] compute_cluster_id: The managed object reference
398
+ :param pulumi.Input[_builtins.str] compute_cluster_id: The managed object reference
292
399
  ID of the cluster to put the group in. Forces a new
293
400
  resource if changed.
294
- :param pulumi.Input[str] dependency_vm_group_name: The name of the VM group that this
401
+ :param pulumi.Input[_builtins.str] dependency_vm_group_name: The name of the VM group that this
295
402
  rule depends on. The VMs defined in the group specified by
296
403
  `vm_group_name` will not be started until the VMs in this
297
404
  group are started.
298
- :param pulumi.Input[bool] enabled: Enable this rule in the cluster. Default: `true`.
299
- :param pulumi.Input[bool] mandatory: When this value is `true`, prevents any virtual
405
+ :param pulumi.Input[_builtins.bool] enabled: Enable this rule in the cluster. Default: `true`.
406
+ :param pulumi.Input[_builtins.bool] mandatory: When this value is `true`, prevents any virtual
300
407
  machine operations that may violate this rule. Default: `false`.
301
408
 
302
409
  > **NOTE:** The namespace for rule names on this resource (defined by the
303
410
  `name` argument) is shared with all rules in the cluster - consider
304
411
  this when naming your rules.
305
- :param pulumi.Input[str] name: The name of the rule. This must be unique in the
412
+ :param pulumi.Input[_builtins.str] name: The name of the rule. This must be unique in the
306
413
  cluster.
307
- :param pulumi.Input[str] vm_group_name: The name of the VM group that is the subject of
414
+ :param pulumi.Input[_builtins.str] vm_group_name: The name of the VM group that is the subject of
308
415
  this rule. The VMs defined in this group will not be started until the VMs in
309
416
  the group specified by
310
417
  `dependency_vm_group_name` are started.
@@ -316,7 +423,108 @@ class ComputeClusterVmDependencyRule(pulumi.CustomResource):
316
423
  args: ComputeClusterVmDependencyRuleArgs,
317
424
  opts: Optional[pulumi.ResourceOptions] = None):
318
425
  """
319
- Create a ComputeClusterVmDependencyRule resource with the given unique name, props, and options.
426
+ The `ComputeClusterVmDependencyRule` resource can be used to manage
427
+ VM dependency rules in a cluster, either created by the
428
+ `ComputeCluster` resource or looked up
429
+ by the `ComputeCluster` data source.
430
+
431
+ A virtual machine dependency rule applies to vSphere HA, and allows
432
+ user-defined startup orders for virtual machines in the case of host failure.
433
+ Virtual machines are supplied via groups, which can be managed via the
434
+ `ComputeClusterVmGroup`
435
+ resource.
436
+
437
+ > **NOTE:** This resource requires vCenter and is not available on direct ESXi
438
+ connections.
439
+
440
+ ## Example Usage
441
+
442
+ The example below creates two virtual machine in a cluster using the
443
+ `VirtualMachine` resource in a cluster
444
+ looked up by the `ComputeCluster`
445
+ data source. It then creates a group with this virtual machine. Two groups are created, each with one of the created VMs. Finally, a rule is created to ensure that `vm1` starts before `vm2`.
446
+
447
+ > Note how `dependency_vm_group_name` and
448
+ `vm_group_name` are sourced off of the `name` attributes from
449
+ the `ComputeClusterVmGroup`
450
+ resource. This is to ensure that the rule is not created before the groups
451
+ exist, which may not possibly happen in the event that the names came from a
452
+ "static" source such as a variable.
453
+
454
+ ```python
455
+ import pulumi
456
+ import pulumi_vsphere as vsphere
457
+
458
+ datacenter = vsphere.get_datacenter(name="dc-01")
459
+ datastore = vsphere.get_datastore(name="datastore1",
460
+ datacenter_id=datacenter.id)
461
+ cluster = vsphere.get_compute_cluster(name="cluster-01",
462
+ datacenter_id=datacenter.id)
463
+ network = vsphere.get_network(name="network1",
464
+ datacenter_id=datacenter.id)
465
+ vm1 = vsphere.VirtualMachine("vm1",
466
+ name="test1",
467
+ resource_pool_id=cluster.resource_pool_id,
468
+ datastore_id=datastore.id,
469
+ num_cpus=2,
470
+ memory=2048,
471
+ guest_id="otherLinux64Guest",
472
+ network_interfaces=[{
473
+ "network_id": network.id,
474
+ }],
475
+ disks=[{
476
+ "label": "disk0",
477
+ "size": 20,
478
+ }])
479
+ vm2 = vsphere.VirtualMachine("vm2",
480
+ name="test2",
481
+ resource_pool_id=cluster.resource_pool_id,
482
+ datastore_id=datastore.id,
483
+ num_cpus=2,
484
+ memory=2048,
485
+ guest_id="otherLinux64Guest",
486
+ network_interfaces=[{
487
+ "network_id": network.id,
488
+ }],
489
+ disks=[{
490
+ "label": "disk0",
491
+ "size": 20,
492
+ }])
493
+ cluster_vm_group1 = vsphere.ComputeClusterVmGroup("cluster_vm_group1",
494
+ name="test-cluster-vm-group1",
495
+ compute_cluster_id=cluster.id,
496
+ virtual_machine_ids=[vm1.id])
497
+ cluster_vm_group2 = vsphere.ComputeClusterVmGroup("cluster_vm_group2",
498
+ name="test-cluster-vm-group2",
499
+ compute_cluster_id=cluster.id,
500
+ virtual_machine_ids=[vm2.id])
501
+ cluster_vm_dependency_rule = vsphere.ComputeClusterVmDependencyRule("cluster_vm_dependency_rule",
502
+ compute_cluster_id=cluster.id,
503
+ name="test-cluster-vm-dependency-rule",
504
+ dependency_vm_group_name=cluster_vm_group1.name,
505
+ vm_group_name=cluster_vm_group2.name)
506
+ ```
507
+
508
+ ## Import
509
+
510
+ An existing rule can be imported into this resource by supplying
511
+
512
+ both the path to the cluster, and the name the rule. If the name or cluster is
513
+
514
+ not found, or if the rule is of a different type, an error will be returned. An
515
+
516
+ example is below:
517
+
518
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
519
+
520
+ ```sh
521
+ $ pulumi import vsphere:index/computeClusterVmDependencyRule:ComputeClusterVmDependencyRule cluster_vm_dependency_rule \\
522
+ ```
523
+
524
+ '{"compute_cluster_path": "/dc1/host/cluster1", \\
525
+
526
+ "name": "pulumi-test-cluster-vm-dependency-rule"}'
527
+
320
528
  :param str resource_name: The name of the resource.
321
529
  :param ComputeClusterVmDependencyRuleArgs args: The arguments to use to populate this resource's properties.
322
530
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -332,12 +540,12 @@ class ComputeClusterVmDependencyRule(pulumi.CustomResource):
332
540
  def _internal_init(__self__,
333
541
  resource_name: str,
334
542
  opts: Optional[pulumi.ResourceOptions] = None,
335
- compute_cluster_id: Optional[pulumi.Input[str]] = None,
336
- dependency_vm_group_name: Optional[pulumi.Input[str]] = None,
337
- enabled: Optional[pulumi.Input[bool]] = None,
338
- mandatory: Optional[pulumi.Input[bool]] = None,
339
- name: Optional[pulumi.Input[str]] = None,
340
- vm_group_name: Optional[pulumi.Input[str]] = None,
543
+ compute_cluster_id: Optional[pulumi.Input[_builtins.str]] = None,
544
+ dependency_vm_group_name: Optional[pulumi.Input[_builtins.str]] = None,
545
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
546
+ mandatory: Optional[pulumi.Input[_builtins.bool]] = None,
547
+ name: Optional[pulumi.Input[_builtins.str]] = None,
548
+ vm_group_name: Optional[pulumi.Input[_builtins.str]] = None,
341
549
  __props__=None):
342
550
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
343
551
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -369,12 +577,12 @@ class ComputeClusterVmDependencyRule(pulumi.CustomResource):
369
577
  def get(resource_name: str,
370
578
  id: pulumi.Input[str],
371
579
  opts: Optional[pulumi.ResourceOptions] = None,
372
- compute_cluster_id: Optional[pulumi.Input[str]] = None,
373
- dependency_vm_group_name: Optional[pulumi.Input[str]] = None,
374
- enabled: Optional[pulumi.Input[bool]] = None,
375
- mandatory: Optional[pulumi.Input[bool]] = None,
376
- name: Optional[pulumi.Input[str]] = None,
377
- vm_group_name: Optional[pulumi.Input[str]] = None) -> 'ComputeClusterVmDependencyRule':
580
+ compute_cluster_id: Optional[pulumi.Input[_builtins.str]] = None,
581
+ dependency_vm_group_name: Optional[pulumi.Input[_builtins.str]] = None,
582
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
583
+ mandatory: Optional[pulumi.Input[_builtins.bool]] = None,
584
+ name: Optional[pulumi.Input[_builtins.str]] = None,
585
+ vm_group_name: Optional[pulumi.Input[_builtins.str]] = None) -> 'ComputeClusterVmDependencyRule':
378
586
  """
379
587
  Get an existing ComputeClusterVmDependencyRule resource's state with the given name, id, and optional extra
380
588
  properties used to qualify the lookup.
@@ -382,23 +590,23 @@ class ComputeClusterVmDependencyRule(pulumi.CustomResource):
382
590
  :param str resource_name: The unique name of the resulting resource.
383
591
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
384
592
  :param pulumi.ResourceOptions opts: Options for the resource.
385
- :param pulumi.Input[str] compute_cluster_id: The managed object reference
593
+ :param pulumi.Input[_builtins.str] compute_cluster_id: The managed object reference
386
594
  ID of the cluster to put the group in. Forces a new
387
595
  resource if changed.
388
- :param pulumi.Input[str] dependency_vm_group_name: The name of the VM group that this
596
+ :param pulumi.Input[_builtins.str] dependency_vm_group_name: The name of the VM group that this
389
597
  rule depends on. The VMs defined in the group specified by
390
598
  `vm_group_name` will not be started until the VMs in this
391
599
  group are started.
392
- :param pulumi.Input[bool] enabled: Enable this rule in the cluster. Default: `true`.
393
- :param pulumi.Input[bool] mandatory: When this value is `true`, prevents any virtual
600
+ :param pulumi.Input[_builtins.bool] enabled: Enable this rule in the cluster. Default: `true`.
601
+ :param pulumi.Input[_builtins.bool] mandatory: When this value is `true`, prevents any virtual
394
602
  machine operations that may violate this rule. Default: `false`.
395
603
 
396
604
  > **NOTE:** The namespace for rule names on this resource (defined by the
397
605
  `name` argument) is shared with all rules in the cluster - consider
398
606
  this when naming your rules.
399
- :param pulumi.Input[str] name: The name of the rule. This must be unique in the
607
+ :param pulumi.Input[_builtins.str] name: The name of the rule. This must be unique in the
400
608
  cluster.
401
- :param pulumi.Input[str] vm_group_name: The name of the VM group that is the subject of
609
+ :param pulumi.Input[_builtins.str] vm_group_name: The name of the VM group that is the subject of
402
610
  this rule. The VMs defined in this group will not be started until the VMs in
403
611
  the group specified by
404
612
  `dependency_vm_group_name` are started.
@@ -415,9 +623,9 @@ class ComputeClusterVmDependencyRule(pulumi.CustomResource):
415
623
  __props__.__dict__["vm_group_name"] = vm_group_name
416
624
  return ComputeClusterVmDependencyRule(resource_name, opts=opts, __props__=__props__)
417
625
 
418
- @property
626
+ @_builtins.property
419
627
  @pulumi.getter(name="computeClusterId")
420
- def compute_cluster_id(self) -> pulumi.Output[str]:
628
+ def compute_cluster_id(self) -> pulumi.Output[_builtins.str]:
421
629
  """
422
630
  The managed object reference
423
631
  ID of the cluster to put the group in. Forces a new
@@ -425,9 +633,9 @@ class ComputeClusterVmDependencyRule(pulumi.CustomResource):
425
633
  """
426
634
  return pulumi.get(self, "compute_cluster_id")
427
635
 
428
- @property
636
+ @_builtins.property
429
637
  @pulumi.getter(name="dependencyVmGroupName")
430
- def dependency_vm_group_name(self) -> pulumi.Output[str]:
638
+ def dependency_vm_group_name(self) -> pulumi.Output[_builtins.str]:
431
639
  """
432
640
  The name of the VM group that this
433
641
  rule depends on. The VMs defined in the group specified by
@@ -436,17 +644,17 @@ class ComputeClusterVmDependencyRule(pulumi.CustomResource):
436
644
  """
437
645
  return pulumi.get(self, "dependency_vm_group_name")
438
646
 
439
- @property
647
+ @_builtins.property
440
648
  @pulumi.getter
441
- def enabled(self) -> pulumi.Output[Optional[bool]]:
649
+ def enabled(self) -> pulumi.Output[Optional[_builtins.bool]]:
442
650
  """
443
651
  Enable this rule in the cluster. Default: `true`.
444
652
  """
445
653
  return pulumi.get(self, "enabled")
446
654
 
447
- @property
655
+ @_builtins.property
448
656
  @pulumi.getter
449
- def mandatory(self) -> pulumi.Output[Optional[bool]]:
657
+ def mandatory(self) -> pulumi.Output[Optional[_builtins.bool]]:
450
658
  """
451
659
  When this value is `true`, prevents any virtual
452
660
  machine operations that may violate this rule. Default: `false`.
@@ -457,18 +665,18 @@ class ComputeClusterVmDependencyRule(pulumi.CustomResource):
457
665
  """
458
666
  return pulumi.get(self, "mandatory")
459
667
 
460
- @property
668
+ @_builtins.property
461
669
  @pulumi.getter
462
- def name(self) -> pulumi.Output[str]:
670
+ def name(self) -> pulumi.Output[_builtins.str]:
463
671
  """
464
672
  The name of the rule. This must be unique in the
465
673
  cluster.
466
674
  """
467
675
  return pulumi.get(self, "name")
468
676
 
469
- @property
677
+ @_builtins.property
470
678
  @pulumi.getter(name="vmGroupName")
471
- def vm_group_name(self) -> pulumi.Output[str]:
679
+ def vm_group_name(self) -> pulumi.Output[_builtins.str]:
472
680
  """
473
681
  The name of the VM group that is the subject of
474
682
  this rule. The VMs defined in this group will not be started until the VMs in