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__ = ['ComputeClusterVmGroupArgs', 'ComputeClusterVmGroup']
@@ -14,23 +19,28 @@ __all__ = ['ComputeClusterVmGroupArgs', 'ComputeClusterVmGroup']
14
19
  @pulumi.input_type
15
20
  class ComputeClusterVmGroupArgs:
16
21
  def __init__(__self__, *,
17
- compute_cluster_id: pulumi.Input[str],
18
- name: Optional[pulumi.Input[str]] = None,
19
- virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
22
+ compute_cluster_id: pulumi.Input[_builtins.str],
23
+ name: Optional[pulumi.Input[_builtins.str]] = None,
24
+ virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None):
20
25
  """
21
26
  The set of arguments for constructing a ComputeClusterVmGroup resource.
22
- :param pulumi.Input[str] compute_cluster_id: The managed object reference
27
+ :param pulumi.Input[_builtins.str] compute_cluster_id: The managed object reference
23
28
  ID of the cluster to put the group in. Forces a new
24
29
  resource if changed.
25
- :param pulumi.Input[str] name: The name of the VM group. This must be unique in the
30
+ :param pulumi.Input[_builtins.str] name: The name of the VM group. This must be unique in the
26
31
  cluster. Forces a new resource if changed.
27
- :param pulumi.Input[Sequence[pulumi.Input[str]]] virtual_machine_ids: The UUIDs of the virtual machines in this
32
+ :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] virtual_machine_ids: The UUIDs of the virtual machines in this
28
33
  group.
29
34
 
30
35
  > **NOTE:** The namespace for cluster names on this resource (defined by the
31
36
  `name` argument) is shared with the
32
37
  `ComputeClusterHostGroup`
33
38
  resource. Make sure your names are unique across both resources.
39
+
40
+ > **NOTE:** To update a existing VM group, you must first import the group with `import` command in
41
+ import section. When importing a VM group, validate that all virtual machines that
42
+ need to be in the group are included in the `virtual_machine_ids`; otherwise, any virtual machines
43
+ that are not in `virtual_machine_ids` the included will be removed from the group.
34
44
  """
35
45
  pulumi.set(__self__, "compute_cluster_id", compute_cluster_id)
36
46
  if name is not None:
@@ -38,9 +48,9 @@ class ComputeClusterVmGroupArgs:
38
48
  if virtual_machine_ids is not None:
39
49
  pulumi.set(__self__, "virtual_machine_ids", virtual_machine_ids)
40
50
 
41
- @property
51
+ @_builtins.property
42
52
  @pulumi.getter(name="computeClusterId")
43
- def compute_cluster_id(self) -> pulumi.Input[str]:
53
+ def compute_cluster_id(self) -> pulumi.Input[_builtins.str]:
44
54
  """
45
55
  The managed object reference
46
56
  ID of the cluster to put the group in. Forces a new
@@ -49,12 +59,12 @@ class ComputeClusterVmGroupArgs:
49
59
  return pulumi.get(self, "compute_cluster_id")
50
60
 
51
61
  @compute_cluster_id.setter
52
- def compute_cluster_id(self, value: pulumi.Input[str]):
62
+ def compute_cluster_id(self, value: pulumi.Input[_builtins.str]):
53
63
  pulumi.set(self, "compute_cluster_id", value)
54
64
 
55
- @property
65
+ @_builtins.property
56
66
  @pulumi.getter
57
- def name(self) -> Optional[pulumi.Input[str]]:
67
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
58
68
  """
59
69
  The name of the VM group. This must be unique in the
60
70
  cluster. Forces a new resource if changed.
@@ -62,12 +72,12 @@ class ComputeClusterVmGroupArgs:
62
72
  return pulumi.get(self, "name")
63
73
 
64
74
  @name.setter
65
- def name(self, value: Optional[pulumi.Input[str]]):
75
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
66
76
  pulumi.set(self, "name", value)
67
77
 
68
- @property
78
+ @_builtins.property
69
79
  @pulumi.getter(name="virtualMachineIds")
70
- def virtual_machine_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
80
+ def virtual_machine_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
71
81
  """
72
82
  The UUIDs of the virtual machines in this
73
83
  group.
@@ -76,34 +86,44 @@ class ComputeClusterVmGroupArgs:
76
86
  `name` argument) is shared with the
77
87
  `ComputeClusterHostGroup`
78
88
  resource. Make sure your names are unique across both resources.
89
+
90
+ > **NOTE:** To update a existing VM group, you must first import the group with `import` command in
91
+ import section. When importing a VM group, validate that all virtual machines that
92
+ need to be in the group are included in the `virtual_machine_ids`; otherwise, any virtual machines
93
+ that are not in `virtual_machine_ids` the included will be removed from the group.
79
94
  """
80
95
  return pulumi.get(self, "virtual_machine_ids")
81
96
 
82
97
  @virtual_machine_ids.setter
83
- def virtual_machine_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
98
+ def virtual_machine_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]):
84
99
  pulumi.set(self, "virtual_machine_ids", value)
85
100
 
86
101
 
87
102
  @pulumi.input_type
88
103
  class _ComputeClusterVmGroupState:
89
104
  def __init__(__self__, *,
90
- compute_cluster_id: Optional[pulumi.Input[str]] = None,
91
- name: Optional[pulumi.Input[str]] = None,
92
- virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
105
+ compute_cluster_id: Optional[pulumi.Input[_builtins.str]] = None,
106
+ name: Optional[pulumi.Input[_builtins.str]] = None,
107
+ virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None):
93
108
  """
94
109
  Input properties used for looking up and filtering ComputeClusterVmGroup resources.
95
- :param pulumi.Input[str] compute_cluster_id: The managed object reference
110
+ :param pulumi.Input[_builtins.str] compute_cluster_id: The managed object reference
96
111
  ID of the cluster to put the group in. Forces a new
97
112
  resource if changed.
98
- :param pulumi.Input[str] name: The name of the VM group. This must be unique in the
113
+ :param pulumi.Input[_builtins.str] name: The name of the VM group. This must be unique in the
99
114
  cluster. Forces a new resource if changed.
100
- :param pulumi.Input[Sequence[pulumi.Input[str]]] virtual_machine_ids: The UUIDs of the virtual machines in this
115
+ :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] virtual_machine_ids: The UUIDs of the virtual machines in this
101
116
  group.
102
117
 
103
118
  > **NOTE:** The namespace for cluster names on this resource (defined by the
104
119
  `name` argument) is shared with the
105
120
  `ComputeClusterHostGroup`
106
121
  resource. Make sure your names are unique across both resources.
122
+
123
+ > **NOTE:** To update a existing VM group, you must first import the group with `import` command in
124
+ import section. When importing a VM group, validate that all virtual machines that
125
+ need to be in the group are included in the `virtual_machine_ids`; otherwise, any virtual machines
126
+ that are not in `virtual_machine_ids` the included will be removed from the group.
107
127
  """
108
128
  if compute_cluster_id is not None:
109
129
  pulumi.set(__self__, "compute_cluster_id", compute_cluster_id)
@@ -112,9 +132,9 @@ class _ComputeClusterVmGroupState:
112
132
  if virtual_machine_ids is not None:
113
133
  pulumi.set(__self__, "virtual_machine_ids", virtual_machine_ids)
114
134
 
115
- @property
135
+ @_builtins.property
116
136
  @pulumi.getter(name="computeClusterId")
117
- def compute_cluster_id(self) -> Optional[pulumi.Input[str]]:
137
+ def compute_cluster_id(self) -> Optional[pulumi.Input[_builtins.str]]:
118
138
  """
119
139
  The managed object reference
120
140
  ID of the cluster to put the group in. Forces a new
@@ -123,12 +143,12 @@ class _ComputeClusterVmGroupState:
123
143
  return pulumi.get(self, "compute_cluster_id")
124
144
 
125
145
  @compute_cluster_id.setter
126
- def compute_cluster_id(self, value: Optional[pulumi.Input[str]]):
146
+ def compute_cluster_id(self, value: Optional[pulumi.Input[_builtins.str]]):
127
147
  pulumi.set(self, "compute_cluster_id", value)
128
148
 
129
- @property
149
+ @_builtins.property
130
150
  @pulumi.getter
131
- def name(self) -> Optional[pulumi.Input[str]]:
151
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
132
152
  """
133
153
  The name of the VM group. This must be unique in the
134
154
  cluster. Forces a new resource if changed.
@@ -136,12 +156,12 @@ class _ComputeClusterVmGroupState:
136
156
  return pulumi.get(self, "name")
137
157
 
138
158
  @name.setter
139
- def name(self, value: Optional[pulumi.Input[str]]):
159
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
140
160
  pulumi.set(self, "name", value)
141
161
 
142
- @property
162
+ @_builtins.property
143
163
  @pulumi.getter(name="virtualMachineIds")
144
- def virtual_machine_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
164
+ def virtual_machine_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
145
165
  """
146
166
  The UUIDs of the virtual machines in this
147
167
  group.
@@ -150,39 +170,130 @@ class _ComputeClusterVmGroupState:
150
170
  `name` argument) is shared with the
151
171
  `ComputeClusterHostGroup`
152
172
  resource. Make sure your names are unique across both resources.
173
+
174
+ > **NOTE:** To update a existing VM group, you must first import the group with `import` command in
175
+ import section. When importing a VM group, validate that all virtual machines that
176
+ need to be in the group are included in the `virtual_machine_ids`; otherwise, any virtual machines
177
+ that are not in `virtual_machine_ids` the included will be removed from the group.
153
178
  """
154
179
  return pulumi.get(self, "virtual_machine_ids")
155
180
 
156
181
  @virtual_machine_ids.setter
157
- def virtual_machine_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
182
+ def virtual_machine_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]):
158
183
  pulumi.set(self, "virtual_machine_ids", value)
159
184
 
160
185
 
186
+ @pulumi.type_token("vsphere:index/computeClusterVmGroup:ComputeClusterVmGroup")
161
187
  class ComputeClusterVmGroup(pulumi.CustomResource):
162
188
  @overload
163
189
  def __init__(__self__,
164
190
  resource_name: str,
165
191
  opts: Optional[pulumi.ResourceOptions] = None,
166
- compute_cluster_id: Optional[pulumi.Input[str]] = None,
167
- name: Optional[pulumi.Input[str]] = None,
168
- virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
192
+ compute_cluster_id: Optional[pulumi.Input[_builtins.str]] = None,
193
+ name: Optional[pulumi.Input[_builtins.str]] = None,
194
+ virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
169
195
  __props__=None):
170
196
  """
171
- Create a ComputeClusterVmGroup resource with the given unique name, props, and options.
197
+ The `ComputeClusterVmGroup` resource can be used to manage groups of
198
+ virtual machines in a cluster, either created by the
199
+ [`ComputeCluster`][tf-vsphere-cluster-resource] resource or looked up
200
+ by the [`ComputeCluster`][tf-vsphere-cluster-data-source] data source.
201
+
202
+ [tf-vsphere-cluster-resource]: /docs/providers/vsphere/r/compute_cluster.html
203
+ [tf-vsphere-cluster-data-source]: /docs/providers/vsphere/d/compute_cluster.html
204
+
205
+ This resource mainly serves as an input to the
206
+ [`ComputeClusterVmDependencyRule`][tf-vsphere-cluster-vm-dependency-rule-resource]
207
+ and
208
+ [`ComputeClusterVmHostRule`][tf-vsphere-cluster-vm-host-rule-resource]
209
+ resources. See the individual resource documentation pages for more information.
210
+
211
+ [tf-vsphere-cluster-vm-dependency-rule-resource]: /docs/providers/vsphere/r/compute_cluster_vm_dependency_rule.html
212
+ [tf-vsphere-cluster-vm-host-rule-resource]: /docs/providers/vsphere/r/compute_cluster_vm_host_rule.html
213
+
214
+ > **NOTE:** This resource requires vCenter and is not available on direct ESXi
215
+ connections.
216
+
217
+ ## Example Usage
218
+
219
+ The example below creates two virtual machines in a cluster using the
220
+ `VirtualMachine` resource, creating the
221
+ virtual machine in the cluster looked up by the
222
+ `ComputeCluster` data source. It
223
+ then creates a group from these two virtual machines.
224
+
225
+ ```python
226
+ import pulumi
227
+ import pulumi_vsphere as vsphere
228
+
229
+ datacenter = vsphere.get_datacenter(name="dc-01")
230
+ datastore = vsphere.get_datastore(name="datastore1",
231
+ datacenter_id=datacenter.id)
232
+ cluster = vsphere.get_compute_cluster(name="cluster-01",
233
+ datacenter_id=datacenter.id)
234
+ network = vsphere.get_network(name="network1",
235
+ datacenter_id=datacenter.id)
236
+ vm = []
237
+ for range in [{"value": i} for i in range(0, 2)]:
238
+ vm.append(vsphere.VirtualMachine(f"vm-{range['value']}",
239
+ name=f"test-{range['value']}",
240
+ resource_pool_id=cluster.resource_pool_id,
241
+ datastore_id=datastore.id,
242
+ num_cpus=2,
243
+ memory=2048,
244
+ guest_id="otherLinux64Guest",
245
+ network_interfaces=[{
246
+ "network_id": network.id,
247
+ }],
248
+ disks=[{
249
+ "label": "disk0",
250
+ "size": 20,
251
+ }]))
252
+ cluster_vm_group = vsphere.ComputeClusterVmGroup("cluster_vm_group",
253
+ name="test-cluster-vm-group",
254
+ compute_cluster_id=cluster.id,
255
+ virtual_machine_ids=[[__item.id for __item in vm]])
256
+ ```
257
+
258
+ ## Import
259
+
260
+ An existing group can be imported into this resource by
261
+
262
+ supplying both the path to the cluster, and the name of the VM group. If the
263
+
264
+ name or cluster is not found, or if the group is of a different type, an error
265
+
266
+ will be returned. An example is below:
267
+
268
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
269
+
270
+ ```sh
271
+ $ pulumi import vsphere:index/computeClusterVmGroup:ComputeClusterVmGroup cluster_vm_group \\
272
+ ```
273
+
274
+ '{"compute_cluster_path": "/dc1/host/cluster1", \\
275
+
276
+ "name": "pulumi-test-cluster-vm-group"}'
277
+
172
278
  :param str resource_name: The name of the resource.
173
279
  :param pulumi.ResourceOptions opts: Options for the resource.
174
- :param pulumi.Input[str] compute_cluster_id: The managed object reference
280
+ :param pulumi.Input[_builtins.str] compute_cluster_id: The managed object reference
175
281
  ID of the cluster to put the group in. Forces a new
176
282
  resource if changed.
177
- :param pulumi.Input[str] name: The name of the VM group. This must be unique in the
283
+ :param pulumi.Input[_builtins.str] name: The name of the VM group. This must be unique in the
178
284
  cluster. Forces a new resource if changed.
179
- :param pulumi.Input[Sequence[pulumi.Input[str]]] virtual_machine_ids: The UUIDs of the virtual machines in this
285
+ :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] virtual_machine_ids: The UUIDs of the virtual machines in this
180
286
  group.
181
287
 
182
288
  > **NOTE:** The namespace for cluster names on this resource (defined by the
183
289
  `name` argument) is shared with the
184
290
  `ComputeClusterHostGroup`
185
291
  resource. Make sure your names are unique across both resources.
292
+
293
+ > **NOTE:** To update a existing VM group, you must first import the group with `import` command in
294
+ import section. When importing a VM group, validate that all virtual machines that
295
+ need to be in the group are included in the `virtual_machine_ids`; otherwise, any virtual machines
296
+ that are not in `virtual_machine_ids` the included will be removed from the group.
186
297
  """
187
298
  ...
188
299
  @overload
@@ -191,7 +302,87 @@ class ComputeClusterVmGroup(pulumi.CustomResource):
191
302
  args: ComputeClusterVmGroupArgs,
192
303
  opts: Optional[pulumi.ResourceOptions] = None):
193
304
  """
194
- Create a ComputeClusterVmGroup resource with the given unique name, props, and options.
305
+ The `ComputeClusterVmGroup` resource can be used to manage groups of
306
+ virtual machines in a cluster, either created by the
307
+ [`ComputeCluster`][tf-vsphere-cluster-resource] resource or looked up
308
+ by the [`ComputeCluster`][tf-vsphere-cluster-data-source] data source.
309
+
310
+ [tf-vsphere-cluster-resource]: /docs/providers/vsphere/r/compute_cluster.html
311
+ [tf-vsphere-cluster-data-source]: /docs/providers/vsphere/d/compute_cluster.html
312
+
313
+ This resource mainly serves as an input to the
314
+ [`ComputeClusterVmDependencyRule`][tf-vsphere-cluster-vm-dependency-rule-resource]
315
+ and
316
+ [`ComputeClusterVmHostRule`][tf-vsphere-cluster-vm-host-rule-resource]
317
+ resources. See the individual resource documentation pages for more information.
318
+
319
+ [tf-vsphere-cluster-vm-dependency-rule-resource]: /docs/providers/vsphere/r/compute_cluster_vm_dependency_rule.html
320
+ [tf-vsphere-cluster-vm-host-rule-resource]: /docs/providers/vsphere/r/compute_cluster_vm_host_rule.html
321
+
322
+ > **NOTE:** This resource requires vCenter and is not available on direct ESXi
323
+ connections.
324
+
325
+ ## Example Usage
326
+
327
+ The example below creates two virtual machines in a cluster using the
328
+ `VirtualMachine` resource, creating the
329
+ virtual machine in the cluster looked up by the
330
+ `ComputeCluster` data source. It
331
+ then creates a group from these two virtual machines.
332
+
333
+ ```python
334
+ import pulumi
335
+ import pulumi_vsphere as vsphere
336
+
337
+ datacenter = vsphere.get_datacenter(name="dc-01")
338
+ datastore = vsphere.get_datastore(name="datastore1",
339
+ datacenter_id=datacenter.id)
340
+ cluster = vsphere.get_compute_cluster(name="cluster-01",
341
+ datacenter_id=datacenter.id)
342
+ network = vsphere.get_network(name="network1",
343
+ datacenter_id=datacenter.id)
344
+ vm = []
345
+ for range in [{"value": i} for i in range(0, 2)]:
346
+ vm.append(vsphere.VirtualMachine(f"vm-{range['value']}",
347
+ name=f"test-{range['value']}",
348
+ resource_pool_id=cluster.resource_pool_id,
349
+ datastore_id=datastore.id,
350
+ num_cpus=2,
351
+ memory=2048,
352
+ guest_id="otherLinux64Guest",
353
+ network_interfaces=[{
354
+ "network_id": network.id,
355
+ }],
356
+ disks=[{
357
+ "label": "disk0",
358
+ "size": 20,
359
+ }]))
360
+ cluster_vm_group = vsphere.ComputeClusterVmGroup("cluster_vm_group",
361
+ name="test-cluster-vm-group",
362
+ compute_cluster_id=cluster.id,
363
+ virtual_machine_ids=[[__item.id for __item in vm]])
364
+ ```
365
+
366
+ ## Import
367
+
368
+ An existing group can be imported into this resource by
369
+
370
+ supplying both the path to the cluster, and the name of the VM group. If the
371
+
372
+ name or cluster is not found, or if the group is of a different type, an error
373
+
374
+ will be returned. An example is below:
375
+
376
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
377
+
378
+ ```sh
379
+ $ pulumi import vsphere:index/computeClusterVmGroup:ComputeClusterVmGroup cluster_vm_group \\
380
+ ```
381
+
382
+ '{"compute_cluster_path": "/dc1/host/cluster1", \\
383
+
384
+ "name": "pulumi-test-cluster-vm-group"}'
385
+
195
386
  :param str resource_name: The name of the resource.
196
387
  :param ComputeClusterVmGroupArgs args: The arguments to use to populate this resource's properties.
197
388
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -207,9 +398,9 @@ class ComputeClusterVmGroup(pulumi.CustomResource):
207
398
  def _internal_init(__self__,
208
399
  resource_name: str,
209
400
  opts: Optional[pulumi.ResourceOptions] = None,
210
- compute_cluster_id: Optional[pulumi.Input[str]] = None,
211
- name: Optional[pulumi.Input[str]] = None,
212
- virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
401
+ compute_cluster_id: Optional[pulumi.Input[_builtins.str]] = None,
402
+ name: Optional[pulumi.Input[_builtins.str]] = None,
403
+ virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
213
404
  __props__=None):
214
405
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
215
406
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -234,9 +425,9 @@ class ComputeClusterVmGroup(pulumi.CustomResource):
234
425
  def get(resource_name: str,
235
426
  id: pulumi.Input[str],
236
427
  opts: Optional[pulumi.ResourceOptions] = None,
237
- compute_cluster_id: Optional[pulumi.Input[str]] = None,
238
- name: Optional[pulumi.Input[str]] = None,
239
- virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None) -> 'ComputeClusterVmGroup':
428
+ compute_cluster_id: Optional[pulumi.Input[_builtins.str]] = None,
429
+ name: Optional[pulumi.Input[_builtins.str]] = None,
430
+ virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None) -> 'ComputeClusterVmGroup':
240
431
  """
241
432
  Get an existing ComputeClusterVmGroup resource's state with the given name, id, and optional extra
242
433
  properties used to qualify the lookup.
@@ -244,18 +435,23 @@ class ComputeClusterVmGroup(pulumi.CustomResource):
244
435
  :param str resource_name: The unique name of the resulting resource.
245
436
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
246
437
  :param pulumi.ResourceOptions opts: Options for the resource.
247
- :param pulumi.Input[str] compute_cluster_id: The managed object reference
438
+ :param pulumi.Input[_builtins.str] compute_cluster_id: The managed object reference
248
439
  ID of the cluster to put the group in. Forces a new
249
440
  resource if changed.
250
- :param pulumi.Input[str] name: The name of the VM group. This must be unique in the
441
+ :param pulumi.Input[_builtins.str] name: The name of the VM group. This must be unique in the
251
442
  cluster. Forces a new resource if changed.
252
- :param pulumi.Input[Sequence[pulumi.Input[str]]] virtual_machine_ids: The UUIDs of the virtual machines in this
443
+ :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] virtual_machine_ids: The UUIDs of the virtual machines in this
253
444
  group.
254
445
 
255
446
  > **NOTE:** The namespace for cluster names on this resource (defined by the
256
447
  `name` argument) is shared with the
257
448
  `ComputeClusterHostGroup`
258
449
  resource. Make sure your names are unique across both resources.
450
+
451
+ > **NOTE:** To update a existing VM group, you must first import the group with `import` command in
452
+ import section. When importing a VM group, validate that all virtual machines that
453
+ need to be in the group are included in the `virtual_machine_ids`; otherwise, any virtual machines
454
+ that are not in `virtual_machine_ids` the included will be removed from the group.
259
455
  """
260
456
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
261
457
 
@@ -266,9 +462,9 @@ class ComputeClusterVmGroup(pulumi.CustomResource):
266
462
  __props__.__dict__["virtual_machine_ids"] = virtual_machine_ids
267
463
  return ComputeClusterVmGroup(resource_name, opts=opts, __props__=__props__)
268
464
 
269
- @property
465
+ @_builtins.property
270
466
  @pulumi.getter(name="computeClusterId")
271
- def compute_cluster_id(self) -> pulumi.Output[str]:
467
+ def compute_cluster_id(self) -> pulumi.Output[_builtins.str]:
272
468
  """
273
469
  The managed object reference
274
470
  ID of the cluster to put the group in. Forces a new
@@ -276,18 +472,18 @@ class ComputeClusterVmGroup(pulumi.CustomResource):
276
472
  """
277
473
  return pulumi.get(self, "compute_cluster_id")
278
474
 
279
- @property
475
+ @_builtins.property
280
476
  @pulumi.getter
281
- def name(self) -> pulumi.Output[str]:
477
+ def name(self) -> pulumi.Output[_builtins.str]:
282
478
  """
283
479
  The name of the VM group. This must be unique in the
284
480
  cluster. Forces a new resource if changed.
285
481
  """
286
482
  return pulumi.get(self, "name")
287
483
 
288
- @property
484
+ @_builtins.property
289
485
  @pulumi.getter(name="virtualMachineIds")
290
- def virtual_machine_ids(self) -> pulumi.Output[Optional[Sequence[str]]]:
486
+ def virtual_machine_ids(self) -> pulumi.Output[Optional[Sequence[_builtins.str]]]:
291
487
  """
292
488
  The UUIDs of the virtual machines in this
293
489
  group.
@@ -296,6 +492,11 @@ class ComputeClusterVmGroup(pulumi.CustomResource):
296
492
  `name` argument) is shared with the
297
493
  `ComputeClusterHostGroup`
298
494
  resource. Make sure your names are unique across both resources.
495
+
496
+ > **NOTE:** To update a existing VM group, you must first import the group with `import` command in
497
+ import section. When importing a VM group, validate that all virtual machines that
498
+ need to be in the group are included in the `virtual_machine_ids`; otherwise, any virtual machines
499
+ that are not in `virtual_machine_ids` the included will be removed from the group.
299
500
  """
300
501
  return pulumi.get(self, "virtual_machine_ids")
301
502