@pulumi/vsphere 4.16.2 → 4.16.3

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.
Files changed (161) hide show
  1. package/computeCluster.d.ts +137 -67
  2. package/computeCluster.js +92 -46
  3. package/computeCluster.js.map +1 -1
  4. package/computeClusterHostGroup.d.ts +45 -25
  5. package/computeClusterHostGroup.js +21 -13
  6. package/computeClusterHostGroup.js.map +1 -1
  7. package/computeClusterVmAffinityRule.d.ts +32 -20
  8. package/computeClusterVmAffinityRule.js +20 -14
  9. package/computeClusterVmAffinityRule.js.map +1 -1
  10. package/computeClusterVmAntiAffinityRule.d.ts +40 -13
  11. package/computeClusterVmAntiAffinityRule.js +28 -7
  12. package/computeClusterVmAntiAffinityRule.js.map +1 -1
  13. package/computeClusterVmDependencyRule.d.ts +32 -24
  14. package/computeClusterVmDependencyRule.js +20 -18
  15. package/computeClusterVmDependencyRule.js.map +1 -1
  16. package/computeClusterVmGroup.d.ts +32 -23
  17. package/computeClusterVmGroup.js +8 -11
  18. package/computeClusterVmGroup.js.map +1 -1
  19. package/computeClusterVmHostRule.d.ts +36 -26
  20. package/computeClusterVmHostRule.js +24 -20
  21. package/computeClusterVmHostRule.js.map +1 -1
  22. package/configurationProfile.d.ts +88 -0
  23. package/configurationProfile.js +88 -0
  24. package/configurationProfile.js.map +1 -1
  25. package/contentLibrary.d.ts +6 -4
  26. package/contentLibrary.js +3 -1
  27. package/contentLibrary.js.map +1 -1
  28. package/contentLibraryItem.d.ts +3 -2
  29. package/contentLibraryItem.js +3 -2
  30. package/contentLibraryItem.js.map +1 -1
  31. package/customAttribute.d.ts +2 -3
  32. package/customAttribute.js +2 -3
  33. package/customAttribute.js.map +1 -1
  34. package/datacenter.d.ts +18 -8
  35. package/datacenter.js +4 -3
  36. package/datacenter.js.map +1 -1
  37. package/datastoreCluster.d.ts +37 -25
  38. package/datastoreCluster.js +10 -10
  39. package/datastoreCluster.js.map +1 -1
  40. package/datastoreClusterVmAntiAffinityRule.d.ts +37 -22
  41. package/datastoreClusterVmAntiAffinityRule.js +13 -13
  42. package/datastoreClusterVmAntiAffinityRule.js.map +1 -1
  43. package/distributedPortGroup.d.ts +19 -9
  44. package/distributedPortGroup.js +7 -6
  45. package/distributedPortGroup.js.map +1 -1
  46. package/distributedVirtualSwitch.d.ts +27 -10
  47. package/distributedVirtualSwitch.js +3 -4
  48. package/distributedVirtualSwitch.js.map +1 -1
  49. package/dpmHostOverride.d.ts +21 -16
  50. package/dpmHostOverride.js +9 -10
  51. package/dpmHostOverride.js.map +1 -1
  52. package/drsVmOverride.d.ts +22 -17
  53. package/drsVmOverride.js +10 -11
  54. package/drsVmOverride.js.map +1 -1
  55. package/entityPermissions.d.ts +58 -0
  56. package/entityPermissions.js +58 -0
  57. package/entityPermissions.js.map +1 -1
  58. package/file.d.ts +15 -0
  59. package/file.js +15 -0
  60. package/file.js.map +1 -1
  61. package/folder.d.ts +37 -19
  62. package/folder.js +7 -10
  63. package/folder.js.map +1 -1
  64. package/getComputeCluster.d.ts +35 -19
  65. package/getComputeCluster.js +24 -10
  66. package/getComputeCluster.js.map +1 -1
  67. package/getCustomAttribute.d.ts +10 -6
  68. package/getCustomAttribute.js +10 -6
  69. package/getCustomAttribute.js.map +1 -1
  70. package/getDatacenter.d.ts +10 -6
  71. package/getDatacenter.js +10 -6
  72. package/getDatacenter.js.map +1 -1
  73. package/getDatastore.d.ts +22 -16
  74. package/getDatastore.js +12 -8
  75. package/getDatastore.js.map +1 -1
  76. package/getDatastoreCluster.d.ts +24 -10
  77. package/getDatastoreCluster.js +20 -6
  78. package/getDatastoreCluster.js.map +1 -1
  79. package/getDistributedVirtualSwitch.d.ts +25 -19
  80. package/getDistributedVirtualSwitch.js +12 -8
  81. package/getDistributedVirtualSwitch.js.map +1 -1
  82. package/getHost.d.ts +23 -13
  83. package/getHost.js +8 -4
  84. package/getHost.js.map +1 -1
  85. package/getNetwork.d.ts +12 -8
  86. package/getNetwork.js.map +1 -1
  87. package/getOvfVmTemplate.d.ts +276 -0
  88. package/getOvfVmTemplate.js +276 -0
  89. package/getOvfVmTemplate.js.map +1 -1
  90. package/getResourcePool.d.ts +38 -26
  91. package/getResourcePool.js +16 -8
  92. package/getResourcePool.js.map +1 -1
  93. package/getTag.d.ts +14 -10
  94. package/getTag.js +14 -10
  95. package/getTag.js.map +1 -1
  96. package/getTagCategory.d.ts +8 -4
  97. package/getTagCategory.js +8 -4
  98. package/getTagCategory.js.map +1 -1
  99. package/getVappContainer.d.ts +16 -6
  100. package/getVappContainer.js +6 -2
  101. package/getVappContainer.js.map +1 -1
  102. package/getVirtualMachine.d.ts +58 -36
  103. package/getVirtualMachine.js +10 -6
  104. package/getVirtualMachine.js.map +1 -1
  105. package/getVmfsDisks.d.ts +12 -4
  106. package/getVmfsDisks.js +6 -2
  107. package/getVmfsDisks.js.map +1 -1
  108. package/haVmOverride.d.ts +8 -10
  109. package/haVmOverride.js +8 -10
  110. package/haVmOverride.js.map +1 -1
  111. package/host.d.ts +54 -80
  112. package/host.js +54 -80
  113. package/host.js.map +1 -1
  114. package/hostPortGroup.d.ts +21 -11
  115. package/hostPortGroup.js +8 -4
  116. package/hostPortGroup.js.map +1 -1
  117. package/hostVirtualSwitch.d.ts +21 -17
  118. package/hostVirtualSwitch.js +9 -11
  119. package/hostVirtualSwitch.js.map +1 -1
  120. package/nasDatastore.d.ts +48 -35
  121. package/nasDatastore.js +9 -8
  122. package/nasDatastore.js.map +1 -1
  123. package/package.json +2 -2
  124. package/resourcePool.d.ts +31 -7
  125. package/resourcePool.js +13 -1
  126. package/resourcePool.js.map +1 -1
  127. package/role.d.ts +31 -2
  128. package/role.js +31 -2
  129. package/role.js.map +1 -1
  130. package/storageDrsVmOverride.d.ts +40 -17
  131. package/storageDrsVmOverride.js +19 -8
  132. package/storageDrsVmOverride.js.map +1 -1
  133. package/tag.d.ts +16 -15
  134. package/tag.js +16 -15
  135. package/tag.js.map +1 -1
  136. package/tagCategory.d.ts +2 -3
  137. package/tagCategory.js +2 -3
  138. package/tagCategory.js.map +1 -1
  139. package/types/input.d.ts +5 -3
  140. package/types/output.d.ts +5 -3
  141. package/vappContainer.d.ts +21 -12
  142. package/vappContainer.js +0 -3
  143. package/vappContainer.js.map +1 -1
  144. package/vappEntity.d.ts +14 -11
  145. package/vappEntity.js +2 -5
  146. package/vappEntity.js.map +1 -1
  147. package/virtualDisk.d.ts +18 -10
  148. package/virtualDisk.js +9 -7
  149. package/virtualDisk.js.map +1 -1
  150. package/virtualMachine.d.ts +1102 -10
  151. package/virtualMachine.js +1056 -6
  152. package/virtualMachine.js.map +1 -1
  153. package/virtualMachineSnapshot.d.ts +2 -1
  154. package/virtualMachineSnapshot.js +2 -1
  155. package/virtualMachineSnapshot.js.map +1 -1
  156. package/vmfsDatastore.d.ts +54 -42
  157. package/vmfsDatastore.js +12 -15
  158. package/vmfsDatastore.js.map +1 -1
  159. package/vnic.d.ts +4 -3
  160. package/vnic.js +4 -3
  161. package/vnic.js.map +1 -1
@@ -3,6 +3,144 @@ import * as pulumi from "@pulumi/pulumi";
3
3
  * The `vsphere.getOvfVmTemplate` data source can be used to submit an OVF to
4
4
  * vSphere and extract its hardware settings in a form that can be then used as
5
5
  * inputs for a `vsphere.VirtualMachine` resource.
6
+ *
7
+ * ## Example Usage
8
+ *
9
+ * ```typescript
10
+ * import * as pulumi from "@pulumi/pulumi";
11
+ * import * as std from "@pulumi/std";
12
+ * import * as vsphere from "@pulumi/vsphere";
13
+ *
14
+ * const datacenter = vsphere.getDatacenter({
15
+ * name: "dc-01",
16
+ * });
17
+ * const datastore = datacenter.then(datacenter => vsphere.getDatastore({
18
+ * name: "datastore-01",
19
+ * datacenterId: datacenter.id,
20
+ * }));
21
+ * const cluster = datacenter.then(datacenter => vsphere.getComputeCluster({
22
+ * name: "cluster-01",
23
+ * datacenterId: datacenter.id,
24
+ * }));
25
+ * const _default = Promise.all([cluster, datacenter]).then(([cluster, datacenter]) => vsphere.getResourcePool({
26
+ * name: std.index.format({
27
+ * input: "%s%s",
28
+ * args: [
29
+ * cluster.name,
30
+ * "/Resources",
31
+ * ],
32
+ * }).result,
33
+ * datacenterId: datacenter.id,
34
+ * }));
35
+ * const host = datacenter.then(datacenter => vsphere.getHost({
36
+ * name: "esxi-01.example.com",
37
+ * datacenterId: datacenter.id,
38
+ * }));
39
+ * const network = datacenter.then(datacenter => vsphere.getNetwork({
40
+ * name: "172.16.11.0",
41
+ * datacenterId: datacenter.id,
42
+ * }));
43
+ * //# Remote OVF/OVA Source
44
+ * const ovfRemote = Promise.all([_default, datastore, host, network]).then(([_default, datastore, host, network]) => vsphere.getOvfVmTemplate({
45
+ * name: "ubuntu-server-cloud-image-01",
46
+ * diskProvisioning: "thin",
47
+ * resourcePoolId: _default.id,
48
+ * datastoreId: datastore.id,
49
+ * hostSystemId: host.id,
50
+ * remoteOvfUrl: "https://cloud-images.ubuntu.com/releases/xx.xx/release/ubuntu-xx.xx-server-cloudimg-amd64.ova",
51
+ * ovfNetworkMap: {
52
+ * "VM Network": network.id,
53
+ * },
54
+ * }));
55
+ * //# Local OVF/OVA Source
56
+ * const ovfLocal = Promise.all([_default, datastore, host, network]).then(([_default, datastore, host, network]) => vsphere.getOvfVmTemplate({
57
+ * name: "ubuntu-server-cloud-image-02",
58
+ * diskProvisioning: "thin",
59
+ * resourcePoolId: _default.id,
60
+ * datastoreId: datastore.id,
61
+ * hostSystemId: host.id,
62
+ * localOvfPath: "/Volume/Storage/OVA/ubuntu-xx-xx-server-cloudimg-amd64.ova",
63
+ * ovfNetworkMap: {
64
+ * "VM Network": network.id,
65
+ * },
66
+ * }));
67
+ * //# Deployment of VM from Remote OVF
68
+ * const vmFromRemoteOvf = new vsphere.VirtualMachine("vmFromRemoteOvf", {
69
+ * networkInterfaces: .map(entry => ({
70
+ * networkId: entry.value,
71
+ * })),
72
+ * name: "ubuntu-server-cloud-image-01",
73
+ * datacenterId: datacenter.then(datacenter => datacenter.id),
74
+ * datastoreId: datastore.then(datastore => datastore.id),
75
+ * hostSystemId: host.then(host => host.id),
76
+ * resourcePoolId: _default.then(_default => _default.id),
77
+ * numCpus: ovfRemote.then(ovfRemote => ovfRemote.numCpus),
78
+ * numCoresPerSocket: ovfRemote.then(ovfRemote => ovfRemote.numCoresPerSocket),
79
+ * memory: ovfRemote.then(ovfRemote => ovfRemote.memory),
80
+ * guestId: ovfRemote.then(ovfRemote => ovfRemote.guestId),
81
+ * firmware: ovfRemote.then(ovfRemote => ovfRemote.firmware),
82
+ * scsiType: ovfRemote.then(ovfRemote => ovfRemote.scsiType),
83
+ * waitForGuestNetTimeout: 0,
84
+ * waitForGuestIpTimeout: 0,
85
+ * ovfDeploy: {
86
+ * remoteOvfUrl: "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.ova",
87
+ * ovfNetworkMap: ovfRemote.then(ovfRemote => ovfRemote.ovfNetworkMap),
88
+ * },
89
+ * cdroms: [{
90
+ * clientDevice: true,
91
+ * }],
92
+ * vapp: {
93
+ * properties: {
94
+ * hostname: remoteOvfName,
95
+ * "instance-id": remoteOvfUuid,
96
+ * "public-keys": remoteOvfPublicKeys,
97
+ * password: remoteOvfPassword,
98
+ * "user-data": std.index.base64encode({
99
+ * input: remoteOvfUserData,
100
+ * }).result,
101
+ * },
102
+ * },
103
+ * });
104
+ * //# Deployment of VM from Local OVF
105
+ * const vmFromLocalOvf = new vsphere.VirtualMachine("vmFromLocalOvf", {
106
+ * networkInterfaces: .map(entry => ({
107
+ * networkId: entry.value,
108
+ * })),
109
+ * name: "ubuntu-server-cloud-image-02",
110
+ * datacenterId: datacenter.then(datacenter => datacenter.id),
111
+ * datastoreId: datastore.then(datastore => datastore.id),
112
+ * hostSystemId: host.then(host => host.id),
113
+ * resourcePoolId: _default.then(_default => _default.id),
114
+ * numCpus: ovfLocal.then(ovfLocal => ovfLocal.numCpus),
115
+ * numCoresPerSocket: ovfLocal.then(ovfLocal => ovfLocal.numCoresPerSocket),
116
+ * memory: ovfLocal.then(ovfLocal => ovfLocal.memory),
117
+ * guestId: ovfLocal.then(ovfLocal => ovfLocal.guestId),
118
+ * firmware: ovfLocal.then(ovfLocal => ovfLocal.firmware),
119
+ * scsiType: ovfLocal.then(ovfLocal => ovfLocal.scsiType),
120
+ * waitForGuestNetTimeout: 0,
121
+ * waitForGuestIpTimeout: 0,
122
+ * ovfDeploy: {
123
+ * allowUnverifiedSslCert: false,
124
+ * localOvfPath: ovfLocal.then(ovfLocal => ovfLocal.localOvfPath),
125
+ * diskProvisioning: ovfLocal.then(ovfLocal => ovfLocal.diskProvisioning),
126
+ * ovfNetworkMap: ovfLocal.then(ovfLocal => ovfLocal.ovfNetworkMap),
127
+ * },
128
+ * cdroms: [{
129
+ * clientDevice: true,
130
+ * }],
131
+ * vapp: {
132
+ * properties: {
133
+ * hostname: localOvfName,
134
+ * "instance-id": localOvfUuid,
135
+ * "public-keys": localOvfPublicKeys,
136
+ * password: localOvfPassword,
137
+ * "user-data": std.index.base64encode({
138
+ * input: localOvfUserData,
139
+ * }).result,
140
+ * },
141
+ * },
142
+ * });
143
+ * ```
6
144
  */
7
145
  export declare function getOvfVmTemplate(args: GetOvfVmTemplateArgs, opts?: pulumi.InvokeOptions): Promise<GetOvfVmTemplateResult>;
8
146
  /**
@@ -172,6 +310,144 @@ export interface GetOvfVmTemplateResult {
172
310
  * The `vsphere.getOvfVmTemplate` data source can be used to submit an OVF to
173
311
  * vSphere and extract its hardware settings in a form that can be then used as
174
312
  * inputs for a `vsphere.VirtualMachine` resource.
313
+ *
314
+ * ## Example Usage
315
+ *
316
+ * ```typescript
317
+ * import * as pulumi from "@pulumi/pulumi";
318
+ * import * as std from "@pulumi/std";
319
+ * import * as vsphere from "@pulumi/vsphere";
320
+ *
321
+ * const datacenter = vsphere.getDatacenter({
322
+ * name: "dc-01",
323
+ * });
324
+ * const datastore = datacenter.then(datacenter => vsphere.getDatastore({
325
+ * name: "datastore-01",
326
+ * datacenterId: datacenter.id,
327
+ * }));
328
+ * const cluster = datacenter.then(datacenter => vsphere.getComputeCluster({
329
+ * name: "cluster-01",
330
+ * datacenterId: datacenter.id,
331
+ * }));
332
+ * const _default = Promise.all([cluster, datacenter]).then(([cluster, datacenter]) => vsphere.getResourcePool({
333
+ * name: std.index.format({
334
+ * input: "%s%s",
335
+ * args: [
336
+ * cluster.name,
337
+ * "/Resources",
338
+ * ],
339
+ * }).result,
340
+ * datacenterId: datacenter.id,
341
+ * }));
342
+ * const host = datacenter.then(datacenter => vsphere.getHost({
343
+ * name: "esxi-01.example.com",
344
+ * datacenterId: datacenter.id,
345
+ * }));
346
+ * const network = datacenter.then(datacenter => vsphere.getNetwork({
347
+ * name: "172.16.11.0",
348
+ * datacenterId: datacenter.id,
349
+ * }));
350
+ * //# Remote OVF/OVA Source
351
+ * const ovfRemote = Promise.all([_default, datastore, host, network]).then(([_default, datastore, host, network]) => vsphere.getOvfVmTemplate({
352
+ * name: "ubuntu-server-cloud-image-01",
353
+ * diskProvisioning: "thin",
354
+ * resourcePoolId: _default.id,
355
+ * datastoreId: datastore.id,
356
+ * hostSystemId: host.id,
357
+ * remoteOvfUrl: "https://cloud-images.ubuntu.com/releases/xx.xx/release/ubuntu-xx.xx-server-cloudimg-amd64.ova",
358
+ * ovfNetworkMap: {
359
+ * "VM Network": network.id,
360
+ * },
361
+ * }));
362
+ * //# Local OVF/OVA Source
363
+ * const ovfLocal = Promise.all([_default, datastore, host, network]).then(([_default, datastore, host, network]) => vsphere.getOvfVmTemplate({
364
+ * name: "ubuntu-server-cloud-image-02",
365
+ * diskProvisioning: "thin",
366
+ * resourcePoolId: _default.id,
367
+ * datastoreId: datastore.id,
368
+ * hostSystemId: host.id,
369
+ * localOvfPath: "/Volume/Storage/OVA/ubuntu-xx-xx-server-cloudimg-amd64.ova",
370
+ * ovfNetworkMap: {
371
+ * "VM Network": network.id,
372
+ * },
373
+ * }));
374
+ * //# Deployment of VM from Remote OVF
375
+ * const vmFromRemoteOvf = new vsphere.VirtualMachine("vmFromRemoteOvf", {
376
+ * networkInterfaces: .map(entry => ({
377
+ * networkId: entry.value,
378
+ * })),
379
+ * name: "ubuntu-server-cloud-image-01",
380
+ * datacenterId: datacenter.then(datacenter => datacenter.id),
381
+ * datastoreId: datastore.then(datastore => datastore.id),
382
+ * hostSystemId: host.then(host => host.id),
383
+ * resourcePoolId: _default.then(_default => _default.id),
384
+ * numCpus: ovfRemote.then(ovfRemote => ovfRemote.numCpus),
385
+ * numCoresPerSocket: ovfRemote.then(ovfRemote => ovfRemote.numCoresPerSocket),
386
+ * memory: ovfRemote.then(ovfRemote => ovfRemote.memory),
387
+ * guestId: ovfRemote.then(ovfRemote => ovfRemote.guestId),
388
+ * firmware: ovfRemote.then(ovfRemote => ovfRemote.firmware),
389
+ * scsiType: ovfRemote.then(ovfRemote => ovfRemote.scsiType),
390
+ * waitForGuestNetTimeout: 0,
391
+ * waitForGuestIpTimeout: 0,
392
+ * ovfDeploy: {
393
+ * remoteOvfUrl: "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.ova",
394
+ * ovfNetworkMap: ovfRemote.then(ovfRemote => ovfRemote.ovfNetworkMap),
395
+ * },
396
+ * cdroms: [{
397
+ * clientDevice: true,
398
+ * }],
399
+ * vapp: {
400
+ * properties: {
401
+ * hostname: remoteOvfName,
402
+ * "instance-id": remoteOvfUuid,
403
+ * "public-keys": remoteOvfPublicKeys,
404
+ * password: remoteOvfPassword,
405
+ * "user-data": std.index.base64encode({
406
+ * input: remoteOvfUserData,
407
+ * }).result,
408
+ * },
409
+ * },
410
+ * });
411
+ * //# Deployment of VM from Local OVF
412
+ * const vmFromLocalOvf = new vsphere.VirtualMachine("vmFromLocalOvf", {
413
+ * networkInterfaces: .map(entry => ({
414
+ * networkId: entry.value,
415
+ * })),
416
+ * name: "ubuntu-server-cloud-image-02",
417
+ * datacenterId: datacenter.then(datacenter => datacenter.id),
418
+ * datastoreId: datastore.then(datastore => datastore.id),
419
+ * hostSystemId: host.then(host => host.id),
420
+ * resourcePoolId: _default.then(_default => _default.id),
421
+ * numCpus: ovfLocal.then(ovfLocal => ovfLocal.numCpus),
422
+ * numCoresPerSocket: ovfLocal.then(ovfLocal => ovfLocal.numCoresPerSocket),
423
+ * memory: ovfLocal.then(ovfLocal => ovfLocal.memory),
424
+ * guestId: ovfLocal.then(ovfLocal => ovfLocal.guestId),
425
+ * firmware: ovfLocal.then(ovfLocal => ovfLocal.firmware),
426
+ * scsiType: ovfLocal.then(ovfLocal => ovfLocal.scsiType),
427
+ * waitForGuestNetTimeout: 0,
428
+ * waitForGuestIpTimeout: 0,
429
+ * ovfDeploy: {
430
+ * allowUnverifiedSslCert: false,
431
+ * localOvfPath: ovfLocal.then(ovfLocal => ovfLocal.localOvfPath),
432
+ * diskProvisioning: ovfLocal.then(ovfLocal => ovfLocal.diskProvisioning),
433
+ * ovfNetworkMap: ovfLocal.then(ovfLocal => ovfLocal.ovfNetworkMap),
434
+ * },
435
+ * cdroms: [{
436
+ * clientDevice: true,
437
+ * }],
438
+ * vapp: {
439
+ * properties: {
440
+ * hostname: localOvfName,
441
+ * "instance-id": localOvfUuid,
442
+ * "public-keys": localOvfPublicKeys,
443
+ * password: localOvfPassword,
444
+ * "user-data": std.index.base64encode({
445
+ * input: localOvfUserData,
446
+ * }).result,
447
+ * },
448
+ * },
449
+ * });
450
+ * ```
175
451
  */
176
452
  export declare function getOvfVmTemplateOutput(args: GetOvfVmTemplateOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetOvfVmTemplateResult>;
177
453
  /**
@@ -9,6 +9,144 @@ const utilities = require("./utilities");
9
9
  * The `vsphere.getOvfVmTemplate` data source can be used to submit an OVF to
10
10
  * vSphere and extract its hardware settings in a form that can be then used as
11
11
  * inputs for a `vsphere.VirtualMachine` resource.
12
+ *
13
+ * ## Example Usage
14
+ *
15
+ * ```typescript
16
+ * import * as pulumi from "@pulumi/pulumi";
17
+ * import * as std from "@pulumi/std";
18
+ * import * as vsphere from "@pulumi/vsphere";
19
+ *
20
+ * const datacenter = vsphere.getDatacenter({
21
+ * name: "dc-01",
22
+ * });
23
+ * const datastore = datacenter.then(datacenter => vsphere.getDatastore({
24
+ * name: "datastore-01",
25
+ * datacenterId: datacenter.id,
26
+ * }));
27
+ * const cluster = datacenter.then(datacenter => vsphere.getComputeCluster({
28
+ * name: "cluster-01",
29
+ * datacenterId: datacenter.id,
30
+ * }));
31
+ * const _default = Promise.all([cluster, datacenter]).then(([cluster, datacenter]) => vsphere.getResourcePool({
32
+ * name: std.index.format({
33
+ * input: "%s%s",
34
+ * args: [
35
+ * cluster.name,
36
+ * "/Resources",
37
+ * ],
38
+ * }).result,
39
+ * datacenterId: datacenter.id,
40
+ * }));
41
+ * const host = datacenter.then(datacenter => vsphere.getHost({
42
+ * name: "esxi-01.example.com",
43
+ * datacenterId: datacenter.id,
44
+ * }));
45
+ * const network = datacenter.then(datacenter => vsphere.getNetwork({
46
+ * name: "172.16.11.0",
47
+ * datacenterId: datacenter.id,
48
+ * }));
49
+ * //# Remote OVF/OVA Source
50
+ * const ovfRemote = Promise.all([_default, datastore, host, network]).then(([_default, datastore, host, network]) => vsphere.getOvfVmTemplate({
51
+ * name: "ubuntu-server-cloud-image-01",
52
+ * diskProvisioning: "thin",
53
+ * resourcePoolId: _default.id,
54
+ * datastoreId: datastore.id,
55
+ * hostSystemId: host.id,
56
+ * remoteOvfUrl: "https://cloud-images.ubuntu.com/releases/xx.xx/release/ubuntu-xx.xx-server-cloudimg-amd64.ova",
57
+ * ovfNetworkMap: {
58
+ * "VM Network": network.id,
59
+ * },
60
+ * }));
61
+ * //# Local OVF/OVA Source
62
+ * const ovfLocal = Promise.all([_default, datastore, host, network]).then(([_default, datastore, host, network]) => vsphere.getOvfVmTemplate({
63
+ * name: "ubuntu-server-cloud-image-02",
64
+ * diskProvisioning: "thin",
65
+ * resourcePoolId: _default.id,
66
+ * datastoreId: datastore.id,
67
+ * hostSystemId: host.id,
68
+ * localOvfPath: "/Volume/Storage/OVA/ubuntu-xx-xx-server-cloudimg-amd64.ova",
69
+ * ovfNetworkMap: {
70
+ * "VM Network": network.id,
71
+ * },
72
+ * }));
73
+ * //# Deployment of VM from Remote OVF
74
+ * const vmFromRemoteOvf = new vsphere.VirtualMachine("vmFromRemoteOvf", {
75
+ * networkInterfaces: .map(entry => ({
76
+ * networkId: entry.value,
77
+ * })),
78
+ * name: "ubuntu-server-cloud-image-01",
79
+ * datacenterId: datacenter.then(datacenter => datacenter.id),
80
+ * datastoreId: datastore.then(datastore => datastore.id),
81
+ * hostSystemId: host.then(host => host.id),
82
+ * resourcePoolId: _default.then(_default => _default.id),
83
+ * numCpus: ovfRemote.then(ovfRemote => ovfRemote.numCpus),
84
+ * numCoresPerSocket: ovfRemote.then(ovfRemote => ovfRemote.numCoresPerSocket),
85
+ * memory: ovfRemote.then(ovfRemote => ovfRemote.memory),
86
+ * guestId: ovfRemote.then(ovfRemote => ovfRemote.guestId),
87
+ * firmware: ovfRemote.then(ovfRemote => ovfRemote.firmware),
88
+ * scsiType: ovfRemote.then(ovfRemote => ovfRemote.scsiType),
89
+ * waitForGuestNetTimeout: 0,
90
+ * waitForGuestIpTimeout: 0,
91
+ * ovfDeploy: {
92
+ * remoteOvfUrl: "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.ova",
93
+ * ovfNetworkMap: ovfRemote.then(ovfRemote => ovfRemote.ovfNetworkMap),
94
+ * },
95
+ * cdroms: [{
96
+ * clientDevice: true,
97
+ * }],
98
+ * vapp: {
99
+ * properties: {
100
+ * hostname: remoteOvfName,
101
+ * "instance-id": remoteOvfUuid,
102
+ * "public-keys": remoteOvfPublicKeys,
103
+ * password: remoteOvfPassword,
104
+ * "user-data": std.index.base64encode({
105
+ * input: remoteOvfUserData,
106
+ * }).result,
107
+ * },
108
+ * },
109
+ * });
110
+ * //# Deployment of VM from Local OVF
111
+ * const vmFromLocalOvf = new vsphere.VirtualMachine("vmFromLocalOvf", {
112
+ * networkInterfaces: .map(entry => ({
113
+ * networkId: entry.value,
114
+ * })),
115
+ * name: "ubuntu-server-cloud-image-02",
116
+ * datacenterId: datacenter.then(datacenter => datacenter.id),
117
+ * datastoreId: datastore.then(datastore => datastore.id),
118
+ * hostSystemId: host.then(host => host.id),
119
+ * resourcePoolId: _default.then(_default => _default.id),
120
+ * numCpus: ovfLocal.then(ovfLocal => ovfLocal.numCpus),
121
+ * numCoresPerSocket: ovfLocal.then(ovfLocal => ovfLocal.numCoresPerSocket),
122
+ * memory: ovfLocal.then(ovfLocal => ovfLocal.memory),
123
+ * guestId: ovfLocal.then(ovfLocal => ovfLocal.guestId),
124
+ * firmware: ovfLocal.then(ovfLocal => ovfLocal.firmware),
125
+ * scsiType: ovfLocal.then(ovfLocal => ovfLocal.scsiType),
126
+ * waitForGuestNetTimeout: 0,
127
+ * waitForGuestIpTimeout: 0,
128
+ * ovfDeploy: {
129
+ * allowUnverifiedSslCert: false,
130
+ * localOvfPath: ovfLocal.then(ovfLocal => ovfLocal.localOvfPath),
131
+ * diskProvisioning: ovfLocal.then(ovfLocal => ovfLocal.diskProvisioning),
132
+ * ovfNetworkMap: ovfLocal.then(ovfLocal => ovfLocal.ovfNetworkMap),
133
+ * },
134
+ * cdroms: [{
135
+ * clientDevice: true,
136
+ * }],
137
+ * vapp: {
138
+ * properties: {
139
+ * hostname: localOvfName,
140
+ * "instance-id": localOvfUuid,
141
+ * "public-keys": localOvfPublicKeys,
142
+ * password: localOvfPassword,
143
+ * "user-data": std.index.base64encode({
144
+ * input: localOvfUserData,
145
+ * }).result,
146
+ * },
147
+ * },
148
+ * });
149
+ * ```
12
150
  */
13
151
  function getOvfVmTemplate(args, opts) {
14
152
  opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
@@ -34,6 +172,144 @@ exports.getOvfVmTemplate = getOvfVmTemplate;
34
172
  * The `vsphere.getOvfVmTemplate` data source can be used to submit an OVF to
35
173
  * vSphere and extract its hardware settings in a form that can be then used as
36
174
  * inputs for a `vsphere.VirtualMachine` resource.
175
+ *
176
+ * ## Example Usage
177
+ *
178
+ * ```typescript
179
+ * import * as pulumi from "@pulumi/pulumi";
180
+ * import * as std from "@pulumi/std";
181
+ * import * as vsphere from "@pulumi/vsphere";
182
+ *
183
+ * const datacenter = vsphere.getDatacenter({
184
+ * name: "dc-01",
185
+ * });
186
+ * const datastore = datacenter.then(datacenter => vsphere.getDatastore({
187
+ * name: "datastore-01",
188
+ * datacenterId: datacenter.id,
189
+ * }));
190
+ * const cluster = datacenter.then(datacenter => vsphere.getComputeCluster({
191
+ * name: "cluster-01",
192
+ * datacenterId: datacenter.id,
193
+ * }));
194
+ * const _default = Promise.all([cluster, datacenter]).then(([cluster, datacenter]) => vsphere.getResourcePool({
195
+ * name: std.index.format({
196
+ * input: "%s%s",
197
+ * args: [
198
+ * cluster.name,
199
+ * "/Resources",
200
+ * ],
201
+ * }).result,
202
+ * datacenterId: datacenter.id,
203
+ * }));
204
+ * const host = datacenter.then(datacenter => vsphere.getHost({
205
+ * name: "esxi-01.example.com",
206
+ * datacenterId: datacenter.id,
207
+ * }));
208
+ * const network = datacenter.then(datacenter => vsphere.getNetwork({
209
+ * name: "172.16.11.0",
210
+ * datacenterId: datacenter.id,
211
+ * }));
212
+ * //# Remote OVF/OVA Source
213
+ * const ovfRemote = Promise.all([_default, datastore, host, network]).then(([_default, datastore, host, network]) => vsphere.getOvfVmTemplate({
214
+ * name: "ubuntu-server-cloud-image-01",
215
+ * diskProvisioning: "thin",
216
+ * resourcePoolId: _default.id,
217
+ * datastoreId: datastore.id,
218
+ * hostSystemId: host.id,
219
+ * remoteOvfUrl: "https://cloud-images.ubuntu.com/releases/xx.xx/release/ubuntu-xx.xx-server-cloudimg-amd64.ova",
220
+ * ovfNetworkMap: {
221
+ * "VM Network": network.id,
222
+ * },
223
+ * }));
224
+ * //# Local OVF/OVA Source
225
+ * const ovfLocal = Promise.all([_default, datastore, host, network]).then(([_default, datastore, host, network]) => vsphere.getOvfVmTemplate({
226
+ * name: "ubuntu-server-cloud-image-02",
227
+ * diskProvisioning: "thin",
228
+ * resourcePoolId: _default.id,
229
+ * datastoreId: datastore.id,
230
+ * hostSystemId: host.id,
231
+ * localOvfPath: "/Volume/Storage/OVA/ubuntu-xx-xx-server-cloudimg-amd64.ova",
232
+ * ovfNetworkMap: {
233
+ * "VM Network": network.id,
234
+ * },
235
+ * }));
236
+ * //# Deployment of VM from Remote OVF
237
+ * const vmFromRemoteOvf = new vsphere.VirtualMachine("vmFromRemoteOvf", {
238
+ * networkInterfaces: .map(entry => ({
239
+ * networkId: entry.value,
240
+ * })),
241
+ * name: "ubuntu-server-cloud-image-01",
242
+ * datacenterId: datacenter.then(datacenter => datacenter.id),
243
+ * datastoreId: datastore.then(datastore => datastore.id),
244
+ * hostSystemId: host.then(host => host.id),
245
+ * resourcePoolId: _default.then(_default => _default.id),
246
+ * numCpus: ovfRemote.then(ovfRemote => ovfRemote.numCpus),
247
+ * numCoresPerSocket: ovfRemote.then(ovfRemote => ovfRemote.numCoresPerSocket),
248
+ * memory: ovfRemote.then(ovfRemote => ovfRemote.memory),
249
+ * guestId: ovfRemote.then(ovfRemote => ovfRemote.guestId),
250
+ * firmware: ovfRemote.then(ovfRemote => ovfRemote.firmware),
251
+ * scsiType: ovfRemote.then(ovfRemote => ovfRemote.scsiType),
252
+ * waitForGuestNetTimeout: 0,
253
+ * waitForGuestIpTimeout: 0,
254
+ * ovfDeploy: {
255
+ * remoteOvfUrl: "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.ova",
256
+ * ovfNetworkMap: ovfRemote.then(ovfRemote => ovfRemote.ovfNetworkMap),
257
+ * },
258
+ * cdroms: [{
259
+ * clientDevice: true,
260
+ * }],
261
+ * vapp: {
262
+ * properties: {
263
+ * hostname: remoteOvfName,
264
+ * "instance-id": remoteOvfUuid,
265
+ * "public-keys": remoteOvfPublicKeys,
266
+ * password: remoteOvfPassword,
267
+ * "user-data": std.index.base64encode({
268
+ * input: remoteOvfUserData,
269
+ * }).result,
270
+ * },
271
+ * },
272
+ * });
273
+ * //# Deployment of VM from Local OVF
274
+ * const vmFromLocalOvf = new vsphere.VirtualMachine("vmFromLocalOvf", {
275
+ * networkInterfaces: .map(entry => ({
276
+ * networkId: entry.value,
277
+ * })),
278
+ * name: "ubuntu-server-cloud-image-02",
279
+ * datacenterId: datacenter.then(datacenter => datacenter.id),
280
+ * datastoreId: datastore.then(datastore => datastore.id),
281
+ * hostSystemId: host.then(host => host.id),
282
+ * resourcePoolId: _default.then(_default => _default.id),
283
+ * numCpus: ovfLocal.then(ovfLocal => ovfLocal.numCpus),
284
+ * numCoresPerSocket: ovfLocal.then(ovfLocal => ovfLocal.numCoresPerSocket),
285
+ * memory: ovfLocal.then(ovfLocal => ovfLocal.memory),
286
+ * guestId: ovfLocal.then(ovfLocal => ovfLocal.guestId),
287
+ * firmware: ovfLocal.then(ovfLocal => ovfLocal.firmware),
288
+ * scsiType: ovfLocal.then(ovfLocal => ovfLocal.scsiType),
289
+ * waitForGuestNetTimeout: 0,
290
+ * waitForGuestIpTimeout: 0,
291
+ * ovfDeploy: {
292
+ * allowUnverifiedSslCert: false,
293
+ * localOvfPath: ovfLocal.then(ovfLocal => ovfLocal.localOvfPath),
294
+ * diskProvisioning: ovfLocal.then(ovfLocal => ovfLocal.diskProvisioning),
295
+ * ovfNetworkMap: ovfLocal.then(ovfLocal => ovfLocal.ovfNetworkMap),
296
+ * },
297
+ * cdroms: [{
298
+ * clientDevice: true,
299
+ * }],
300
+ * vapp: {
301
+ * properties: {
302
+ * hostname: localOvfName,
303
+ * "instance-id": localOvfUuid,
304
+ * "public-keys": localOvfPublicKeys,
305
+ * password: localOvfPassword,
306
+ * "user-data": std.index.base64encode({
307
+ * input: localOvfUserData,
308
+ * }).result,
309
+ * },
310
+ * },
311
+ * });
312
+ * ```
37
313
  */
38
314
  function getOvfVmTemplateOutput(args, opts) {
39
315
  opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
@@ -1 +1 @@
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