pulumi-vsphere 4.14.0a1745952392__py3-none-any.whl → 4.14.0a1747752163__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 (61) hide show
  1. pulumi_vsphere/compute_cluster.py +11 -13
  2. pulumi_vsphere/compute_cluster_host_group.py +71 -3
  3. pulumi_vsphere/compute_cluster_vm_affinity_rule.py +1 -3
  4. pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +5 -3
  5. pulumi_vsphere/compute_cluster_vm_dependency_rule.py +5 -3
  6. pulumi_vsphere/compute_cluster_vm_group.py +5 -3
  7. pulumi_vsphere/compute_cluster_vm_host_rule.py +5 -3
  8. pulumi_vsphere/content_library.py +5 -3
  9. pulumi_vsphere/content_library_item.py +5 -3
  10. pulumi_vsphere/custom_attribute.py +5 -3
  11. pulumi_vsphere/datacenter.py +1 -3
  12. pulumi_vsphere/datastore_cluster.py +89 -3
  13. pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +5 -3
  14. pulumi_vsphere/distributed_port_group.py +5 -3
  15. pulumi_vsphere/distributed_virtual_switch.py +5 -3
  16. pulumi_vsphere/distributed_virtual_switch_pvlan_mapping.py +1 -3
  17. pulumi_vsphere/dpm_host_override.py +89 -3
  18. pulumi_vsphere/drs_vm_override.py +5 -3
  19. pulumi_vsphere/entity_permissions.py +1 -3
  20. pulumi_vsphere/file.py +35 -52
  21. pulumi_vsphere/folder.py +17 -15
  22. pulumi_vsphere/get_compute_cluster_host_group.py +0 -4
  23. pulumi_vsphere/get_datastore_cluster.py +1 -1
  24. pulumi_vsphere/get_datastore_stats.py +0 -4
  25. pulumi_vsphere/get_dynamic.py +0 -4
  26. pulumi_vsphere/get_folder.py +130 -8
  27. pulumi_vsphere/get_guest_os_customization.py +21 -2
  28. pulumi_vsphere/get_license.py +8 -6
  29. pulumi_vsphere/get_network.py +35 -1
  30. pulumi_vsphere/get_ovf_vm_template.py +4 -4
  31. pulumi_vsphere/guest_os_customization.py +1 -3
  32. pulumi_vsphere/ha_vm_override.py +5 -3
  33. pulumi_vsphere/host.py +61 -9
  34. pulumi_vsphere/host_port_group.py +1 -3
  35. pulumi_vsphere/host_virtual_switch.py +5 -3
  36. pulumi_vsphere/license.py +67 -29
  37. pulumi_vsphere/nas_datastore.py +63 -3
  38. pulumi_vsphere/offline_software_depot.py +5 -3
  39. pulumi_vsphere/outputs.py +33 -0
  40. pulumi_vsphere/provider.py +21 -3
  41. pulumi_vsphere/pulumi-plugin.json +1 -1
  42. pulumi_vsphere/resource_pool.py +490 -166
  43. pulumi_vsphere/role.py +1 -3
  44. pulumi_vsphere/storage_drs_vm_override.py +5 -3
  45. pulumi_vsphere/supervisor.py +3 -5
  46. pulumi_vsphere/tag.py +5 -3
  47. pulumi_vsphere/tag_category.py +5 -3
  48. pulumi_vsphere/vapp_container.py +5 -3
  49. pulumi_vsphere/vapp_entity.py +5 -3
  50. pulumi_vsphere/virtual_disk.py +5 -3
  51. pulumi_vsphere/virtual_machine.py +5 -7
  52. pulumi_vsphere/virtual_machine_class.py +5 -7
  53. pulumi_vsphere/virtual_machine_snapshot.py +1 -3
  54. pulumi_vsphere/vm_storage_policy.py +1 -3
  55. pulumi_vsphere/vmfs_datastore.py +5 -3
  56. pulumi_vsphere/vnic.py +1 -3
  57. {pulumi_vsphere-4.14.0a1745952392.dist-info → pulumi_vsphere-4.14.0a1747752163.dist-info}/METADATA +3 -3
  58. pulumi_vsphere-4.14.0a1747752163.dist-info/RECORD +87 -0
  59. {pulumi_vsphere-4.14.0a1745952392.dist-info → pulumi_vsphere-4.14.0a1747752163.dist-info}/WHEEL +1 -1
  60. pulumi_vsphere-4.14.0a1745952392.dist-info/RECORD +0 -87
  61. {pulumi_vsphere-4.14.0a1745952392.dist-info → pulumi_vsphere-4.14.0a1747752163.dist-info}/top_level.txt +0 -0
@@ -2454,10 +2454,8 @@ class _ComputeClusterState:
2454
2454
  pulumi.set(self, "vsan_verbose_mode_enabled", value)
2455
2455
 
2456
2456
 
2457
+ @pulumi.type_token("vsphere:index/computeCluster:ComputeCluster")
2457
2458
  class ComputeCluster(pulumi.CustomResource):
2458
-
2459
- pulumi_type = "vsphere:index/computeCluster:ComputeCluster"
2460
-
2461
2459
  @overload
2462
2460
  def __init__(__self__,
2463
2461
  resource_name: str,
@@ -2563,6 +2561,8 @@ class ComputeCluster(pulumi.CustomResource):
2563
2561
 
2564
2562
  path to the cluster, via the following command:
2565
2563
 
2564
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
2565
+
2566
2566
  hcl
2567
2567
 
2568
2568
  variable "datacenter" {
@@ -2579,9 +2579,9 @@ class ComputeCluster(pulumi.CustomResource):
2579
2579
 
2580
2580
  resource "vsphere_compute_cluster" "compute_cluster" {
2581
2581
 
2582
- name = "cluster-01"
2582
+ name = "cluster-01"
2583
2583
 
2584
- datacenter_id = data.vsphere_datacenter.datacenter.id
2584
+ datacenter_id = data.vsphere_datacenter.datacenter.id
2585
2585
 
2586
2586
  }
2587
2587
 
@@ -2609,9 +2609,7 @@ class ComputeCluster(pulumi.CustomResource):
2609
2609
 
2610
2610
  ha_datastore_pdl_response = "restartAggressive"
2611
2611
 
2612
- ... etc.
2613
-
2614
- console
2612
+ }
2615
2613
 
2616
2614
  ```sh
2617
2615
  $ pulumi import vsphere:index/computeCluster:ComputeCluster compute_cluster /dc-01/host/cluster-01
@@ -2777,6 +2775,8 @@ class ComputeCluster(pulumi.CustomResource):
2777
2775
 
2778
2776
  path to the cluster, via the following command:
2779
2777
 
2778
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
2779
+
2780
2780
  hcl
2781
2781
 
2782
2782
  variable "datacenter" {
@@ -2793,9 +2793,9 @@ class ComputeCluster(pulumi.CustomResource):
2793
2793
 
2794
2794
  resource "vsphere_compute_cluster" "compute_cluster" {
2795
2795
 
2796
- name = "cluster-01"
2796
+ name = "cluster-01"
2797
2797
 
2798
- datacenter_id = data.vsphere_datacenter.datacenter.id
2798
+ datacenter_id = data.vsphere_datacenter.datacenter.id
2799
2799
 
2800
2800
  }
2801
2801
 
@@ -2823,9 +2823,7 @@ class ComputeCluster(pulumi.CustomResource):
2823
2823
 
2824
2824
  ha_datastore_pdl_response = "restartAggressive"
2825
2825
 
2826
- ... etc.
2827
-
2828
- console
2826
+ }
2829
2827
 
2830
2828
  ```sh
2831
2829
  $ pulumi import vsphere:index/computeCluster:ComputeCluster compute_cluster /dc-01/host/cluster-01
@@ -164,10 +164,8 @@ class _ComputeClusterHostGroupState:
164
164
  pulumi.set(self, "name", value)
165
165
 
166
166
 
167
+ @pulumi.type_token("vsphere:index/computeClusterHostGroup:ComputeClusterHostGroup")
167
168
  class ComputeClusterHostGroup(pulumi.CustomResource):
168
-
169
- pulumi_type = "vsphere:index/computeClusterHostGroup:ComputeClusterHostGroup"
170
-
171
169
  @overload
172
170
  def __init__(__self__,
173
171
  resource_name: str,
@@ -190,6 +188,39 @@ class ComputeClusterHostGroup(pulumi.CustomResource):
190
188
  > **NOTE:** This resource requires vCenter and is not available on direct ESXi
191
189
  connections.
192
190
 
191
+ ## Example Usage
192
+
193
+ ```python
194
+ import pulumi
195
+ import pulumi_vsphere as vsphere
196
+
197
+ config = pulumi.Config()
198
+ datacenter = config.get("datacenter")
199
+ if datacenter is None:
200
+ datacenter = "dc-01"
201
+ hosts = config.get_object("hosts")
202
+ if hosts is None:
203
+ hosts = [
204
+ "esxi-01.example.com",
205
+ "esxi-02.example.com",
206
+ "esxi-03.example.com",
207
+ ]
208
+ datacenter_get_datacenter = vsphere.get_datacenter(name=datacenter)
209
+ hosts_get_host = [vsphere.get_host(name=hosts[__index],
210
+ datacenter_id=datacenter_get_datacenter.id) for __index in range(len(hosts))]
211
+ compute_cluster = vsphere.ComputeCluster("compute_cluster",
212
+ name="compute-cluster-test",
213
+ datacenter_id=dc["id"],
214
+ host_system_ids=[[__item.id for __item in hosts_get_host]],
215
+ drs_enabled=True,
216
+ drs_automation_level="fullyAutomated",
217
+ ha_enabled=True)
218
+ cluster_host_group = vsphere.ComputeClusterHostGroup("cluster_host_group",
219
+ name="test-cluster-host-group",
220
+ compute_cluster_id=compute_cluster.id,
221
+ host_system_ids=[[__item.id for __item in hosts_get_host]])
222
+ ```
223
+
193
224
  ## Import
194
225
 
195
226
  An existing group can be imported into this resource by
@@ -200,6 +231,8 @@ class ComputeClusterHostGroup(pulumi.CustomResource):
200
231
 
201
232
  will be returned. An example is below:
202
233
 
234
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
235
+
203
236
  ```sh
204
237
  $ pulumi import vsphere:index/computeClusterHostGroup:ComputeClusterHostGroup cluster_host_group \\
205
238
  ```
@@ -243,6 +276,39 @@ class ComputeClusterHostGroup(pulumi.CustomResource):
243
276
  > **NOTE:** This resource requires vCenter and is not available on direct ESXi
244
277
  connections.
245
278
 
279
+ ## Example Usage
280
+
281
+ ```python
282
+ import pulumi
283
+ import pulumi_vsphere as vsphere
284
+
285
+ config = pulumi.Config()
286
+ datacenter = config.get("datacenter")
287
+ if datacenter is None:
288
+ datacenter = "dc-01"
289
+ hosts = config.get_object("hosts")
290
+ if hosts is None:
291
+ hosts = [
292
+ "esxi-01.example.com",
293
+ "esxi-02.example.com",
294
+ "esxi-03.example.com",
295
+ ]
296
+ datacenter_get_datacenter = vsphere.get_datacenter(name=datacenter)
297
+ hosts_get_host = [vsphere.get_host(name=hosts[__index],
298
+ datacenter_id=datacenter_get_datacenter.id) for __index in range(len(hosts))]
299
+ compute_cluster = vsphere.ComputeCluster("compute_cluster",
300
+ name="compute-cluster-test",
301
+ datacenter_id=dc["id"],
302
+ host_system_ids=[[__item.id for __item in hosts_get_host]],
303
+ drs_enabled=True,
304
+ drs_automation_level="fullyAutomated",
305
+ ha_enabled=True)
306
+ cluster_host_group = vsphere.ComputeClusterHostGroup("cluster_host_group",
307
+ name="test-cluster-host-group",
308
+ compute_cluster_id=compute_cluster.id,
309
+ host_system_ids=[[__item.id for __item in hosts_get_host]])
310
+ ```
311
+
246
312
  ## Import
247
313
 
248
314
  An existing group can be imported into this resource by
@@ -253,6 +319,8 @@ class ComputeClusterHostGroup(pulumi.CustomResource):
253
319
 
254
320
  will be returned. An example is below:
255
321
 
322
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
323
+
256
324
  ```sh
257
325
  $ pulumi import vsphere:index/computeClusterHostGroup:ComputeClusterHostGroup cluster_host_group \\
258
326
  ```
@@ -223,10 +223,8 @@ class _ComputeClusterVmAffinityRuleState:
223
223
  pulumi.set(self, "virtual_machine_ids", value)
224
224
 
225
225
 
226
+ @pulumi.type_token("vsphere:index/computeClusterVmAffinityRule:ComputeClusterVmAffinityRule")
226
227
  class ComputeClusterVmAffinityRule(pulumi.CustomResource):
227
-
228
- pulumi_type = "vsphere:index/computeClusterVmAffinityRule:ComputeClusterVmAffinityRule"
229
-
230
228
  @overload
231
229
  def __init__(__self__,
232
230
  resource_name: str,
@@ -223,10 +223,8 @@ class _ComputeClusterVmAntiAffinityRuleState:
223
223
  pulumi.set(self, "virtual_machine_ids", value)
224
224
 
225
225
 
226
+ @pulumi.type_token("vsphere:index/computeClusterVmAntiAffinityRule:ComputeClusterVmAntiAffinityRule")
226
227
  class ComputeClusterVmAntiAffinityRule(pulumi.CustomResource):
227
-
228
- pulumi_type = "vsphere:index/computeClusterVmAntiAffinityRule:ComputeClusterVmAntiAffinityRule"
229
-
230
228
  @overload
231
229
  def __init__(__self__,
232
230
  resource_name: str,
@@ -248,6 +246,8 @@ class ComputeClusterVmAntiAffinityRule(pulumi.CustomResource):
248
246
 
249
247
  example is below:
250
248
 
249
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
250
+
251
251
  ```sh
252
252
  $ pulumi import vsphere:index/computeClusterVmAntiAffinityRule:ComputeClusterVmAntiAffinityRule vm_anti_affinity_rule \\
253
253
  ```
@@ -289,6 +289,8 @@ class ComputeClusterVmAntiAffinityRule(pulumi.CustomResource):
289
289
 
290
290
  example is below:
291
291
 
292
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
293
+
292
294
  ```sh
293
295
  $ pulumi import vsphere:index/computeClusterVmAntiAffinityRule:ComputeClusterVmAntiAffinityRule vm_anti_affinity_rule \\
294
296
  ```
@@ -278,10 +278,8 @@ class _ComputeClusterVmDependencyRuleState:
278
278
  pulumi.set(self, "vm_group_name", value)
279
279
 
280
280
 
281
+ @pulumi.type_token("vsphere:index/computeClusterVmDependencyRule:ComputeClusterVmDependencyRule")
281
282
  class ComputeClusterVmDependencyRule(pulumi.CustomResource):
282
-
283
- pulumi_type = "vsphere:index/computeClusterVmDependencyRule:ComputeClusterVmDependencyRule"
284
-
285
283
  @overload
286
284
  def __init__(__self__,
287
285
  resource_name: str,
@@ -386,6 +384,8 @@ class ComputeClusterVmDependencyRule(pulumi.CustomResource):
386
384
 
387
385
  example is below:
388
386
 
387
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
388
+
389
389
  ```sh
390
390
  $ pulumi import vsphere:index/computeClusterVmDependencyRule:ComputeClusterVmDependencyRule cluster_vm_dependency_rule \\
391
391
  ```
@@ -516,6 +516,8 @@ class ComputeClusterVmDependencyRule(pulumi.CustomResource):
516
516
 
517
517
  example is below:
518
518
 
519
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
520
+
519
521
  ```sh
520
522
  $ pulumi import vsphere:index/computeClusterVmDependencyRule:ComputeClusterVmDependencyRule cluster_vm_dependency_rule \\
521
523
  ```
@@ -184,10 +184,8 @@ class _ComputeClusterVmGroupState:
184
184
  pulumi.set(self, "virtual_machine_ids", value)
185
185
 
186
186
 
187
+ @pulumi.type_token("vsphere:index/computeClusterVmGroup:ComputeClusterVmGroup")
187
188
  class ComputeClusterVmGroup(pulumi.CustomResource):
188
-
189
- pulumi_type = "vsphere:index/computeClusterVmGroup:ComputeClusterVmGroup"
190
-
191
189
  @overload
192
190
  def __init__(__self__,
193
191
  resource_name: str,
@@ -268,6 +266,8 @@ class ComputeClusterVmGroup(pulumi.CustomResource):
268
266
 
269
267
  will be returned. An example is below:
270
268
 
269
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
270
+
271
271
  ```sh
272
272
  $ pulumi import vsphere:index/computeClusterVmGroup:ComputeClusterVmGroup cluster_vm_group \\
273
273
  ```
@@ -374,6 +374,8 @@ class ComputeClusterVmGroup(pulumi.CustomResource):
374
374
 
375
375
  will be returned. An example is below:
376
376
 
377
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
378
+
377
379
  ```sh
378
380
  $ pulumi import vsphere:index/computeClusterVmGroup:ComputeClusterVmGroup cluster_vm_group \\
379
381
  ```
@@ -323,10 +323,8 @@ class _ComputeClusterVmHostRuleState:
323
323
  pulumi.set(self, "vm_group_name", value)
324
324
 
325
325
 
326
+ @pulumi.type_token("vsphere:index/computeClusterVmHostRule:ComputeClusterVmHostRule")
326
327
  class ComputeClusterVmHostRule(pulumi.CustomResource):
327
-
328
- pulumi_type = "vsphere:index/computeClusterVmHostRule:ComputeClusterVmHostRule"
329
-
330
328
  @overload
331
329
  def __init__(__self__,
332
330
  resource_name: str,
@@ -428,6 +426,8 @@ class ComputeClusterVmHostRule(pulumi.CustomResource):
428
426
 
429
427
  example is below:
430
428
 
429
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
430
+
431
431
  ```sh
432
432
  $ pulumi import vsphere:index/computeClusterVmHostRule:ComputeClusterVmHostRule cluster_vm_host_rule \\
433
433
  ```
@@ -558,6 +558,8 @@ class ComputeClusterVmHostRule(pulumi.CustomResource):
558
558
 
559
559
  example is below:
560
560
 
561
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
562
+
561
563
  ```sh
562
564
  $ pulumi import vsphere:index/computeClusterVmHostRule:ComputeClusterVmHostRule cluster_vm_host_rule \\
563
565
  ```
@@ -194,10 +194,8 @@ class _ContentLibraryState:
194
194
  pulumi.set(self, "subscription", value)
195
195
 
196
196
 
197
+ @pulumi.type_token("vsphere:index/contentLibrary:ContentLibrary")
197
198
  class ContentLibrary(pulumi.CustomResource):
198
-
199
- pulumi_type = "vsphere:index/contentLibrary:ContentLibrary"
200
-
201
199
  @overload
202
200
  def __init__(__self__,
203
201
  resource_name: str,
@@ -254,6 +252,8 @@ class ContentLibrary(pulumi.CustomResource):
254
252
 
255
253
  An existing content library can be imported into this resource by supplying the content library ID. For example:
256
254
 
255
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
256
+
257
257
  ```sh
258
258
  $ pulumi import vsphere:index/contentLibrary:ContentLibrary vsphere_content_library publisher_content_library f42a4b25-844a-44ec-9063-a3a5e9cc88c7
259
259
  ```
@@ -318,6 +318,8 @@ class ContentLibrary(pulumi.CustomResource):
318
318
 
319
319
  An existing content library can be imported into this resource by supplying the content library ID. For example:
320
320
 
321
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
322
+
321
323
  ```sh
322
324
  $ pulumi import vsphere:index/contentLibrary:ContentLibrary vsphere_content_library publisher_content_library f42a4b25-844a-44ec-9063-a3a5e9cc88c7
323
325
  ```
@@ -228,10 +228,8 @@ class _ContentLibraryItemState:
228
228
  pulumi.set(self, "type", value)
229
229
 
230
230
 
231
+ @pulumi.type_token("vsphere:index/contentLibraryItem:ContentLibraryItem")
231
232
  class ContentLibraryItem(pulumi.CustomResource):
232
-
233
- pulumi_type = "vsphere:index/contentLibraryItem:ContentLibraryItem"
234
-
235
233
  @overload
236
234
  def __init__(__self__,
237
235
  resource_name: str,
@@ -309,6 +307,8 @@ class ContentLibraryItem(pulumi.CustomResource):
309
307
 
310
308
  supplying the content library ID. An example is below:
311
309
 
310
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
311
+
312
312
  ```sh
313
313
  $ pulumi import vsphere:index/contentLibraryItem:ContentLibraryItem vsphere_content_library_item iso-linux-ubuntu-server-lts xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
314
314
  ```
@@ -395,6 +395,8 @@ class ContentLibraryItem(pulumi.CustomResource):
395
395
 
396
396
  supplying the content library ID. An example is below:
397
397
 
398
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
399
+
398
400
  ```sh
399
401
  $ pulumi import vsphere:index/contentLibraryItem:ContentLibraryItem vsphere_content_library_item iso-linux-ubuntu-server-lts xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
400
402
  ```
@@ -105,10 +105,8 @@ class _CustomAttributeState:
105
105
  pulumi.set(self, "name", value)
106
106
 
107
107
 
108
+ @pulumi.type_token("vsphere:index/customAttribute:CustomAttribute")
108
109
  class CustomAttribute(pulumi.CustomResource):
109
-
110
- pulumi_type = "vsphere:index/customAttribute:CustomAttribute"
111
-
112
110
  @overload
113
111
  def __init__(__self__,
114
112
  resource_name: str,
@@ -149,6 +147,8 @@ class CustomAttribute(pulumi.CustomResource):
149
147
 
150
148
  via its name, using the following command:
151
149
 
150
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
151
+
152
152
  ```sh
153
153
  $ pulumi import vsphere:index/customAttribute:CustomAttribute attribute terraform-test-attribute
154
154
  ```
@@ -199,6 +199,8 @@ class CustomAttribute(pulumi.CustomResource):
199
199
 
200
200
  via its name, using the following command:
201
201
 
202
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
203
+
202
204
  ```sh
203
205
  $ pulumi import vsphere:index/customAttribute:CustomAttribute attribute terraform-test-attribute
204
206
  ```
@@ -217,10 +217,8 @@ class _DatacenterState:
217
217
  pulumi.set(self, "tags", value)
218
218
 
219
219
 
220
+ @pulumi.type_token("vsphere:index/datacenter:Datacenter")
220
221
  class Datacenter(pulumi.CustomResource):
221
-
222
- pulumi_type = "vsphere:index/datacenter:Datacenter"
223
-
224
222
  @overload
225
223
  def __init__(__self__,
226
224
  resource_name: str,
@@ -920,10 +920,8 @@ class _DatastoreClusterState:
920
920
  pulumi.set(self, "tags", value)
921
921
 
922
922
 
923
+ @pulumi.type_token("vsphere:index/datastoreCluster:DatastoreCluster")
923
924
  class DatastoreCluster(pulumi.CustomResource):
924
-
925
- pulumi_type = "vsphere:index/datastoreCluster:DatastoreCluster"
926
-
927
925
  @overload
928
926
  def __init__(__self__,
929
927
  resource_name: str,
@@ -970,12 +968,56 @@ class DatastoreCluster(pulumi.CustomResource):
970
968
 
971
969
  > **NOTE:** Storage DRS requires a vSphere Enterprise Plus license.
972
970
 
971
+ ## Example Usage
972
+
973
+ The following example sets up a datastore cluster and enables Storage DRS with
974
+ the default settings. It then creates two NAS datastores using the
975
+ `NasDatastore` resource and assigns them to
976
+ the datastore cluster.
977
+
978
+ ```python
979
+ import pulumi
980
+ import pulumi_vsphere as vsphere
981
+
982
+ config = pulumi.Config()
983
+ hosts = config.get_object("hosts")
984
+ if hosts is None:
985
+ hosts = [
986
+ "esxi-01.example.com",
987
+ "esxi-02.example.com",
988
+ "esxi-03.example.com",
989
+ ]
990
+ datacenter = vsphere.get_datacenter()
991
+ hosts_get_host = [vsphere.get_host(name=hosts[__index],
992
+ datacenter_id=datacenter.id) for __index in range(len(hosts))]
993
+ datastore_cluster = vsphere.DatastoreCluster("datastore_cluster",
994
+ name="datastore-cluster-test",
995
+ datacenter_id=datacenter.id,
996
+ sdrs_enabled=True)
997
+ datastore1 = vsphere.NasDatastore("datastore1",
998
+ name="datastore-test1",
999
+ host_system_ids=[[__item["id"] for __item in esxi_hosts]],
1000
+ datastore_cluster_id=datastore_cluster.id,
1001
+ type="NFS",
1002
+ remote_hosts=["nfs"],
1003
+ remote_path="/export/test1")
1004
+ datastore2 = vsphere.NasDatastore("datastore2",
1005
+ name="datastore-test2",
1006
+ host_system_ids=[[__item["id"] for __item in esxi_hosts]],
1007
+ datastore_cluster_id=datastore_cluster.id,
1008
+ type="NFS",
1009
+ remote_hosts=["nfs"],
1010
+ remote_path="/export/test2")
1011
+ ```
1012
+
973
1013
  ## Import
974
1014
 
975
1015
  An existing datastore cluster can be imported into this resource
976
1016
 
977
1017
  via the path to the cluster, via the following command:
978
1018
 
1019
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
1020
+
979
1021
  ```sh
980
1022
  $ pulumi import vsphere:index/datastoreCluster:DatastoreCluster datastore_cluster /dc1/datastore/ds-cluster
981
1023
  ```
@@ -1056,12 +1098,56 @@ class DatastoreCluster(pulumi.CustomResource):
1056
1098
 
1057
1099
  > **NOTE:** Storage DRS requires a vSphere Enterprise Plus license.
1058
1100
 
1101
+ ## Example Usage
1102
+
1103
+ The following example sets up a datastore cluster and enables Storage DRS with
1104
+ the default settings. It then creates two NAS datastores using the
1105
+ `NasDatastore` resource and assigns them to
1106
+ the datastore cluster.
1107
+
1108
+ ```python
1109
+ import pulumi
1110
+ import pulumi_vsphere as vsphere
1111
+
1112
+ config = pulumi.Config()
1113
+ hosts = config.get_object("hosts")
1114
+ if hosts is None:
1115
+ hosts = [
1116
+ "esxi-01.example.com",
1117
+ "esxi-02.example.com",
1118
+ "esxi-03.example.com",
1119
+ ]
1120
+ datacenter = vsphere.get_datacenter()
1121
+ hosts_get_host = [vsphere.get_host(name=hosts[__index],
1122
+ datacenter_id=datacenter.id) for __index in range(len(hosts))]
1123
+ datastore_cluster = vsphere.DatastoreCluster("datastore_cluster",
1124
+ name="datastore-cluster-test",
1125
+ datacenter_id=datacenter.id,
1126
+ sdrs_enabled=True)
1127
+ datastore1 = vsphere.NasDatastore("datastore1",
1128
+ name="datastore-test1",
1129
+ host_system_ids=[[__item["id"] for __item in esxi_hosts]],
1130
+ datastore_cluster_id=datastore_cluster.id,
1131
+ type="NFS",
1132
+ remote_hosts=["nfs"],
1133
+ remote_path="/export/test1")
1134
+ datastore2 = vsphere.NasDatastore("datastore2",
1135
+ name="datastore-test2",
1136
+ host_system_ids=[[__item["id"] for __item in esxi_hosts]],
1137
+ datastore_cluster_id=datastore_cluster.id,
1138
+ type="NFS",
1139
+ remote_hosts=["nfs"],
1140
+ remote_path="/export/test2")
1141
+ ```
1142
+
1059
1143
  ## Import
1060
1144
 
1061
1145
  An existing datastore cluster can be imported into this resource
1062
1146
 
1063
1147
  via the path to the cluster, via the following command:
1064
1148
 
1149
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
1150
+
1065
1151
  ```sh
1066
1152
  $ pulumi import vsphere:index/datastoreCluster:DatastoreCluster datastore_cluster /dc1/datastore/ds-cluster
1067
1153
  ```
@@ -215,10 +215,8 @@ class _DatastoreClusterVmAntiAffinityRuleState:
215
215
  pulumi.set(self, "virtual_machine_ids", value)
216
216
 
217
217
 
218
+ @pulumi.type_token("vsphere:index/datastoreClusterVmAntiAffinityRule:DatastoreClusterVmAntiAffinityRule")
218
219
  class DatastoreClusterVmAntiAffinityRule(pulumi.CustomResource):
219
-
220
- pulumi_type = "vsphere:index/datastoreClusterVmAntiAffinityRule:DatastoreClusterVmAntiAffinityRule"
221
-
222
220
  @overload
223
221
  def __init__(__self__,
224
222
  resource_name: str,
@@ -299,6 +297,8 @@ class DatastoreClusterVmAntiAffinityRule(pulumi.CustomResource):
299
297
 
300
298
  example is below:
301
299
 
300
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
301
+
302
302
  ```sh
303
303
  $ pulumi import vsphere:index/datastoreClusterVmAntiAffinityRule:DatastoreClusterVmAntiAffinityRule cluster_vm_anti_affinity_rule \\
304
304
  ```
@@ -397,6 +397,8 @@ class DatastoreClusterVmAntiAffinityRule(pulumi.CustomResource):
397
397
 
398
398
  example is below:
399
399
 
400
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
401
+
400
402
  ```sh
401
403
  $ pulumi import vsphere:index/datastoreClusterVmAntiAffinityRule:DatastoreClusterVmAntiAffinityRule cluster_vm_anti_affinity_rule \\
402
404
  ```
@@ -1624,10 +1624,8 @@ class _DistributedPortGroupState:
1624
1624
  pulumi.set(self, "vlan_ranges", value)
1625
1625
 
1626
1626
 
1627
+ @pulumi.type_token("vsphere:index/distributedPortGroup:DistributedPortGroup")
1627
1628
  class DistributedPortGroup(pulumi.CustomResource):
1628
-
1629
- pulumi_type = "vsphere:index/distributedPortGroup:DistributedPortGroup"
1630
-
1631
1629
  @overload
1632
1630
  def __init__(__self__,
1633
1631
  resource_name: str,
@@ -1812,6 +1810,8 @@ class DistributedPortGroup(pulumi.CustomResource):
1812
1810
 
1813
1811
  the managed object id of the port group, via the following command:
1814
1812
 
1813
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
1814
+
1815
1815
  ```sh
1816
1816
  $ pulumi import vsphere:index/distributedPortGroup:DistributedPortGroup pg /dc-01/network/pg-01
1817
1817
  ```
@@ -2029,6 +2029,8 @@ class DistributedPortGroup(pulumi.CustomResource):
2029
2029
 
2030
2030
  the managed object id of the port group, via the following command:
2031
2031
 
2032
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
2033
+
2032
2034
  ```sh
2033
2035
  $ pulumi import vsphere:index/distributedPortGroup:DistributedPortGroup pg /dc-01/network/pg-01
2034
2036
  ```
@@ -3144,10 +3144,8 @@ class _DistributedVirtualSwitchState:
3144
3144
  pulumi.set(self, "vsan_share_level", value)
3145
3145
 
3146
3146
 
3147
+ @pulumi.type_token("vsphere:index/distributedVirtualSwitch:DistributedVirtualSwitch")
3147
3148
  class DistributedVirtualSwitch(pulumi.CustomResource):
3148
-
3149
- pulumi_type = "vsphere:index/distributedVirtualSwitch:DistributedVirtualSwitch"
3150
-
3151
3149
  @overload
3152
3150
  def __init__(__self__,
3153
3151
  resource_name: str,
@@ -3368,6 +3366,8 @@ class DistributedVirtualSwitch(pulumi.CustomResource):
3368
3366
 
3369
3367
  to the VDS, via the following command:
3370
3368
 
3369
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
3370
+
3371
3371
  ```sh
3372
3372
  $ pulumi import vsphere:index/distributedVirtualSwitch:DistributedVirtualSwitch vds /dc-01/network/vds-01
3373
3373
  ```
@@ -3621,6 +3621,8 @@ class DistributedVirtualSwitch(pulumi.CustomResource):
3621
3621
 
3622
3622
  to the VDS, via the following command:
3623
3623
 
3624
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
3625
+
3624
3626
  ```sh
3625
3627
  $ pulumi import vsphere:index/distributedVirtualSwitch:DistributedVirtualSwitch vds /dc-01/network/vds-01
3626
3628
  ```
@@ -157,10 +157,8 @@ class _DistributedVirtualSwitchPvlanMappingState:
157
157
  pulumi.set(self, "secondary_vlan_id", value)
158
158
 
159
159
 
160
+ @pulumi.type_token("vsphere:index/distributedVirtualSwitchPvlanMapping:DistributedVirtualSwitchPvlanMapping")
160
161
  class DistributedVirtualSwitchPvlanMapping(pulumi.CustomResource):
161
-
162
- pulumi_type = "vsphere:index/distributedVirtualSwitchPvlanMapping:DistributedVirtualSwitchPvlanMapping"
163
-
164
162
  @overload
165
163
  def __init__(__self__,
166
164
  resource_name: str,