@pulumi/vsphere 4.11.2 → 4.11.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 (162) hide show
  1. package/computeCluster.d.ts +89 -0
  2. package/computeCluster.js +89 -0
  3. package/computeCluster.js.map +1 -1
  4. package/computeClusterHostGroup.d.ts +32 -0
  5. package/computeClusterHostGroup.js +32 -0
  6. package/computeClusterHostGroup.js.map +1 -1
  7. package/computeClusterVmAffinityRule.d.ts +12 -1
  8. package/computeClusterVmAffinityRule.js +12 -1
  9. package/computeClusterVmAffinityRule.js.map +1 -1
  10. package/computeClusterVmAntiAffinityRule.d.ts +19 -0
  11. package/computeClusterVmAntiAffinityRule.js +19 -0
  12. package/computeClusterVmAntiAffinityRule.js.map +1 -1
  13. package/computeClusterVmDependencyRule.d.ts +114 -0
  14. package/computeClusterVmDependencyRule.js +114 -0
  15. package/computeClusterVmDependencyRule.js.map +1 -1
  16. package/computeClusterVmGroup.d.ts +91 -0
  17. package/computeClusterVmGroup.js +91 -0
  18. package/computeClusterVmGroup.js.map +1 -1
  19. package/computeClusterVmHostRule.d.ts +35 -0
  20. package/computeClusterVmHostRule.js +35 -0
  21. package/computeClusterVmHostRule.js.map +1 -1
  22. package/contentLibrary.d.ts +60 -0
  23. package/contentLibrary.js +60 -0
  24. package/contentLibrary.js.map +1 -1
  25. package/contentLibraryItem.d.ts +85 -0
  26. package/contentLibraryItem.js +85 -0
  27. package/contentLibraryItem.js.map +1 -1
  28. package/customAttribute.d.ts +38 -0
  29. package/customAttribute.js +38 -0
  30. package/customAttribute.js.map +1 -1
  31. package/datacenter.d.ts +7 -2
  32. package/datacenter.js +7 -2
  33. package/datacenter.js.map +1 -1
  34. package/datastoreCluster.d.ts +30 -0
  35. package/datastoreCluster.js +30 -0
  36. package/datastoreCluster.js.map +1 -1
  37. package/datastoreClusterVmAntiAffinityRule.d.ts +89 -0
  38. package/datastoreClusterVmAntiAffinityRule.js +89 -0
  39. package/datastoreClusterVmAntiAffinityRule.js.map +1 -1
  40. package/distributedPortGroup.d.ts +145 -0
  41. package/distributedPortGroup.js +145 -0
  42. package/distributedPortGroup.js.map +1 -1
  43. package/distributedVirtualSwitch.d.ts +131 -0
  44. package/distributedVirtualSwitch.js +131 -0
  45. package/distributedVirtualSwitch.js.map +1 -1
  46. package/dpmHostOverride.d.ts +30 -0
  47. package/dpmHostOverride.js +30 -0
  48. package/dpmHostOverride.js.map +1 -1
  49. package/drsVmOverride.d.ts +32 -0
  50. package/drsVmOverride.js +32 -0
  51. package/drsVmOverride.js.map +1 -1
  52. package/folder.d.ts +72 -0
  53. package/folder.js +72 -0
  54. package/folder.js.map +1 -1
  55. package/getComputeCluster.js +5 -1
  56. package/getComputeCluster.js.map +1 -1
  57. package/getComputeClusterHostGroup.d.ts +2 -2
  58. package/getComputeClusterHostGroup.js +7 -3
  59. package/getComputeClusterHostGroup.js.map +1 -1
  60. package/getContentLibrary.js +4 -1
  61. package/getContentLibrary.js.map +1 -1
  62. package/getContentLibraryItem.js +6 -1
  63. package/getContentLibraryItem.js.map +1 -1
  64. package/getCustomAttribute.js +4 -1
  65. package/getCustomAttribute.js.map +1 -1
  66. package/getDatacenter.js +5 -1
  67. package/getDatacenter.js.map +1 -1
  68. package/getDatastore.js +6 -1
  69. package/getDatastore.js.map +1 -1
  70. package/getDatastoreCluster.js +5 -1
  71. package/getDatastoreCluster.js.map +1 -1
  72. package/getDatastoreStats.js +6 -1
  73. package/getDatastoreStats.js.map +1 -1
  74. package/getDistributedVirtualSwitch.js +5 -1
  75. package/getDistributedVirtualSwitch.js.map +1 -1
  76. package/getDynamic.js +6 -1
  77. package/getDynamic.js.map +1 -1
  78. package/getFolder.js +4 -1
  79. package/getFolder.js.map +1 -1
  80. package/getGuestOsCustomization.js +4 -1
  81. package/getGuestOsCustomization.js.map +1 -1
  82. package/getHost.js +5 -1
  83. package/getHost.js.map +1 -1
  84. package/getHostBaseImages.js +2 -1
  85. package/getHostBaseImages.js.map +1 -1
  86. package/getHostPciDevice.js +7 -1
  87. package/getHostPciDevice.js.map +1 -1
  88. package/getHostThumbprint.js +6 -1
  89. package/getHostThumbprint.js.map +1 -1
  90. package/getHostVgpuProfile.js +5 -1
  91. package/getHostVgpuProfile.js.map +1 -1
  92. package/getLicense.js +4 -1
  93. package/getLicense.js.map +1 -1
  94. package/getNetwork.js +6 -1
  95. package/getNetwork.js.map +1 -1
  96. package/getOvfVmTemplate.js +17 -1
  97. package/getOvfVmTemplate.js.map +1 -1
  98. package/getPolicy.js +4 -1
  99. package/getPolicy.js.map +1 -1
  100. package/getResourcePool.js +6 -1
  101. package/getResourcePool.js.map +1 -1
  102. package/getRole.js +7 -1
  103. package/getRole.js.map +1 -1
  104. package/getTag.js +5 -1
  105. package/getTag.js.map +1 -1
  106. package/getTagCategory.js +4 -1
  107. package/getTagCategory.js.map +1 -1
  108. package/getVappContainer.js +5 -1
  109. package/getVappContainer.js.map +1 -1
  110. package/getVirtualMachine.js +59 -1
  111. package/getVirtualMachine.js.map +1 -1
  112. package/getVmfsDisks.js +6 -1
  113. package/getVmfsDisks.js.map +1 -1
  114. package/haVmOverride.d.ts +90 -0
  115. package/haVmOverride.js +90 -0
  116. package/haVmOverride.js.map +1 -1
  117. package/host.d.ts +131 -0
  118. package/host.js +131 -0
  119. package/host.js.map +1 -1
  120. package/hostPortGroup.d.ts +6 -1
  121. package/hostPortGroup.js +6 -1
  122. package/hostPortGroup.js.map +1 -1
  123. package/hostVirtualSwitch.d.ts +33 -0
  124. package/hostVirtualSwitch.js +33 -0
  125. package/hostVirtualSwitch.js.map +1 -1
  126. package/nasDatastore.d.ts +32 -0
  127. package/nasDatastore.js +32 -0
  128. package/nasDatastore.js.map +1 -1
  129. package/package.json +2 -2
  130. package/resourcePool.d.ts +2 -8
  131. package/resourcePool.js +2 -8
  132. package/resourcePool.js.map +1 -1
  133. package/role.d.ts +15 -0
  134. package/role.js +15 -0
  135. package/role.js.map +1 -1
  136. package/storageDrsVmOverride.d.ts +77 -0
  137. package/storageDrsVmOverride.js +77 -0
  138. package/storageDrsVmOverride.js.map +1 -1
  139. package/tag.d.ts +82 -0
  140. package/tag.js +82 -0
  141. package/tag.js.map +1 -1
  142. package/tagCategory.d.ts +41 -0
  143. package/tagCategory.js +41 -0
  144. package/tagCategory.js.map +1 -1
  145. package/vappContainer.d.ts +95 -0
  146. package/vappContainer.js +95 -0
  147. package/vappContainer.js.map +1 -1
  148. package/vappEntity.d.ts +79 -0
  149. package/vappEntity.js +79 -0
  150. package/vappEntity.js.map +1 -1
  151. package/virtualDisk.d.ts +44 -0
  152. package/virtualDisk.js +44 -0
  153. package/virtualDisk.js.map +1 -1
  154. package/virtualMachine.d.ts +25 -0
  155. package/virtualMachine.js +25 -0
  156. package/virtualMachine.js.map +1 -1
  157. package/vmfsDatastore.d.ts +144 -0
  158. package/vmfsDatastore.js +144 -0
  159. package/vmfsDatastore.js.map +1 -1
  160. package/vnic.d.ts +7 -2
  161. package/vnic.js +7 -2
  162. package/vnic.js.map +1 -1
package/tagCategory.js CHANGED
@@ -5,6 +5,47 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.TagCategory = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
+ /**
9
+ * The `vsphere.TagCategory` resource can be used to create and manage tag
10
+ * categories, which determine how tags are grouped together and applied to
11
+ * specific objects.
12
+ *
13
+ * For more information about tags, click [here][ext-tags-general].
14
+ *
15
+ * [ext-tags-general]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-E8E854DD-AA97-4E0C-8419-CE84F93C4058.html
16
+ *
17
+ * ## Example Usage
18
+ *
19
+ * This example creates a tag category named `test-category`, with
20
+ * single cardinality (meaning that only one tag in this category can be assigned
21
+ * to an object at any given time). Tags in this category can only be assigned to
22
+ * VMs and datastores.
23
+ *
24
+ * ```typescript
25
+ * import * as pulumi from "@pulumi/pulumi";
26
+ * import * as vsphere from "@pulumi/vsphere";
27
+ *
28
+ * const category = new vsphere.TagCategory("category", {
29
+ * name: "test-category",
30
+ * description: "Managed by Pulumi",
31
+ * cardinality: "SINGLE",
32
+ * associableTypes: [
33
+ * "VirtualMachine",
34
+ * "Datastore",
35
+ * ],
36
+ * });
37
+ * ```
38
+ *
39
+ * ## Import
40
+ *
41
+ * An existing tag category can be imported into this resource via
42
+ *
43
+ * its name, using the following command:
44
+ *
45
+ * ```sh
46
+ * $ pulumi import vsphere:index/tagCategory:TagCategory category terraform-test-category
47
+ * ```
48
+ */
8
49
  class TagCategory extends pulumi.CustomResource {
9
50
  /**
10
51
  * Get an existing TagCategory resource's state with the given name, ID, and optional extra
@@ -1 +1 @@
1
- {"version":3,"file":"tagCategory.js","sourceRoot":"","sources":["../tagCategory.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC,MAAa,WAAY,SAAQ,MAAM,CAAC,cAAc;IAClD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAwB,EAAE,IAAmC;QACtH,OAAO,IAAI,WAAW,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAClE,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,WAAW,CAAC,YAAY,CAAC;IAC5D,CAAC;IAmCD,YAAY,IAAY,EAAE,WAAgD,EAAE,IAAmC;QAC3G,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA2C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BAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,WAAW,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC;;AArFL,kCAsFC;AAxEG,gBAAgB;AACO,wBAAY,GAAG,uCAAuC,CAAC"}
@@ -1,4 +1,99 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * The `vsphere.VappContainer` resource can be used to create and manage
4
+ * vApps.
5
+ *
6
+ * For more information on vSphere vApps, see the VMware vSphere [product documentation][ref-vsphere-vapp].
7
+ *
8
+ * [ref-vsphere-vapp]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-E6E9D2A9-D358-4996-9BC7-F8D9D9645290.html
9
+ *
10
+ * ## Basic Example
11
+ *
12
+ * The example below sets up a vSphere vApp container in a compute cluster which uses
13
+ * the default settings for CPU and memory reservations, shares, and limits. The compute cluster
14
+ * needs to already exist in vSphere.
15
+ *
16
+ * ```typescript
17
+ * import * as pulumi from "@pulumi/pulumi";
18
+ * import * as vsphere from "@pulumi/vsphere";
19
+ *
20
+ * const datacenter = vsphere.getDatacenter({
21
+ * name: "dc-01",
22
+ * });
23
+ * const computeCluster = datacenter.then(datacenter => vsphere.getComputeCluster({
24
+ * name: "cluster-01",
25
+ * datacenterId: datacenter.id,
26
+ * }));
27
+ * const vappContainer = new vsphere.VappContainer("vapp_container", {
28
+ * name: "vapp-01",
29
+ * parentResourcePoolId: computeCluster.then(computeCluster => computeCluster.resourcePoolId),
30
+ * });
31
+ * ```
32
+ *
33
+ * ### Example with a Virtual Machine
34
+ *
35
+ * The example below builds off the basic example, but includes a virtual machine
36
+ * in the new vApp container. To accomplish this, the `resourcePoolId` of the
37
+ * virtual machine is set to the `id` of the vApp container.
38
+ *
39
+ * ```typescript
40
+ * import * as pulumi from "@pulumi/pulumi";
41
+ * import * as vsphere from "@pulumi/vsphere";
42
+ *
43
+ * const datacenter = vsphere.getDatacenter({
44
+ * name: "dc-01",
45
+ * });
46
+ * const computeCluster = datacenter.then(datacenter => vsphere.getComputeCluster({
47
+ * name: "cluster-01",
48
+ * datacenterId: datacenter.id,
49
+ * }));
50
+ * const datastore = datacenter.then(datacenter => vsphere.getDatastore({
51
+ * name: "datastore-01",
52
+ * datacenterId: datacenter.id,
53
+ * }));
54
+ * const network = datacenter.then(datacenter => vsphere.getNetwork({
55
+ * name: "VM Network",
56
+ * datacenterId: datacenter.id,
57
+ * }));
58
+ * const vappContainer = new vsphere.VappContainer("vapp_container", {
59
+ * name: "vapp-01",
60
+ * parentResourcePoolId: computeCluster.then(computeCluster => computeCluster.resourcePoolId),
61
+ * });
62
+ * const vm = new vsphere.VirtualMachine("vm", {
63
+ * name: "foo",
64
+ * resourcePoolId: vappContainerVsphereVappContainer.id,
65
+ * datastoreId: datastore.then(datastore => datastore.id),
66
+ * numCpus: 1,
67
+ * memory: 1024,
68
+ * guestId: "ubuntu64Guest",
69
+ * networkInterfaces: [{
70
+ * networkId: network.then(network => network.id),
71
+ * }],
72
+ * disks: [{
73
+ * label: "disk0",
74
+ * size: 20,
75
+ * }],
76
+ * });
77
+ * ```
78
+ *
79
+ * ## Import
80
+ *
81
+ * An existing vApp container can be imported into this resource via
82
+ *
83
+ * the path to the vApp container, using the following command:
84
+ *
85
+ * Example:
86
+ *
87
+ * ```sh
88
+ * $ pulumi import vsphere:index/vappContainer:VappContainer vapp_container /dc-01/host/cluster-01/Resources/resource-pool-01/vapp-01
89
+ * ```
90
+ *
91
+ * The example above would import the vApp container named `vapp-01` that is
92
+ *
93
+ * located in the resource pool `resource-pool-01` that is part of the host cluster
94
+ *
95
+ * `cluster-01` in the `dc-01` datacenter.
96
+ */
2
97
  export declare class VappContainer extends pulumi.CustomResource {
3
98
  /**
4
99
  * Get an existing VappContainer resource's state with the given name, ID, and optional extra
package/vappContainer.js CHANGED
@@ -5,6 +5,101 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.VappContainer = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
+ /**
9
+ * The `vsphere.VappContainer` resource can be used to create and manage
10
+ * vApps.
11
+ *
12
+ * For more information on vSphere vApps, see the VMware vSphere [product documentation][ref-vsphere-vapp].
13
+ *
14
+ * [ref-vsphere-vapp]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-E6E9D2A9-D358-4996-9BC7-F8D9D9645290.html
15
+ *
16
+ * ## Basic Example
17
+ *
18
+ * The example below sets up a vSphere vApp container in a compute cluster which uses
19
+ * the default settings for CPU and memory reservations, shares, and limits. The compute cluster
20
+ * needs to already exist in vSphere.
21
+ *
22
+ * ```typescript
23
+ * import * as pulumi from "@pulumi/pulumi";
24
+ * import * as vsphere from "@pulumi/vsphere";
25
+ *
26
+ * const datacenter = vsphere.getDatacenter({
27
+ * name: "dc-01",
28
+ * });
29
+ * const computeCluster = datacenter.then(datacenter => vsphere.getComputeCluster({
30
+ * name: "cluster-01",
31
+ * datacenterId: datacenter.id,
32
+ * }));
33
+ * const vappContainer = new vsphere.VappContainer("vapp_container", {
34
+ * name: "vapp-01",
35
+ * parentResourcePoolId: computeCluster.then(computeCluster => computeCluster.resourcePoolId),
36
+ * });
37
+ * ```
38
+ *
39
+ * ### Example with a Virtual Machine
40
+ *
41
+ * The example below builds off the basic example, but includes a virtual machine
42
+ * in the new vApp container. To accomplish this, the `resourcePoolId` of the
43
+ * virtual machine is set to the `id` of the vApp container.
44
+ *
45
+ * ```typescript
46
+ * import * as pulumi from "@pulumi/pulumi";
47
+ * import * as vsphere from "@pulumi/vsphere";
48
+ *
49
+ * const datacenter = vsphere.getDatacenter({
50
+ * name: "dc-01",
51
+ * });
52
+ * const computeCluster = datacenter.then(datacenter => vsphere.getComputeCluster({
53
+ * name: "cluster-01",
54
+ * datacenterId: datacenter.id,
55
+ * }));
56
+ * const datastore = datacenter.then(datacenter => vsphere.getDatastore({
57
+ * name: "datastore-01",
58
+ * datacenterId: datacenter.id,
59
+ * }));
60
+ * const network = datacenter.then(datacenter => vsphere.getNetwork({
61
+ * name: "VM Network",
62
+ * datacenterId: datacenter.id,
63
+ * }));
64
+ * const vappContainer = new vsphere.VappContainer("vapp_container", {
65
+ * name: "vapp-01",
66
+ * parentResourcePoolId: computeCluster.then(computeCluster => computeCluster.resourcePoolId),
67
+ * });
68
+ * const vm = new vsphere.VirtualMachine("vm", {
69
+ * name: "foo",
70
+ * resourcePoolId: vappContainerVsphereVappContainer.id,
71
+ * datastoreId: datastore.then(datastore => datastore.id),
72
+ * numCpus: 1,
73
+ * memory: 1024,
74
+ * guestId: "ubuntu64Guest",
75
+ * networkInterfaces: [{
76
+ * networkId: network.then(network => network.id),
77
+ * }],
78
+ * disks: [{
79
+ * label: "disk0",
80
+ * size: 20,
81
+ * }],
82
+ * });
83
+ * ```
84
+ *
85
+ * ## Import
86
+ *
87
+ * An existing vApp container can be imported into this resource via
88
+ *
89
+ * the path to the vApp container, using the following command:
90
+ *
91
+ * Example:
92
+ *
93
+ * ```sh
94
+ * $ pulumi import vsphere:index/vappContainer:VappContainer vapp_container /dc-01/host/cluster-01/Resources/resource-pool-01/vapp-01
95
+ * ```
96
+ *
97
+ * The example above would import the vApp container named `vapp-01` that is
98
+ *
99
+ * located in the resource pool `resource-pool-01` that is part of the host cluster
100
+ *
101
+ * `cluster-01` in the `dc-01` datacenter.
102
+ */
8
103
  class VappContainer extends pulumi.CustomResource {
9
104
  /**
10
105
  * Get an existing VappContainer resource's state with the given name, ID, and optional extra
@@ -1 +1 @@
1
- {"version":3,"file":"vappContainer.js","sourceRoot":"","sources":["../vappContainer.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC,MAAa,aAAc,SAAQ,MAAM,CAAC,cAAc;IACpD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA0B,EAAE,I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,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,SAAS,CAAC;YACtF,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;SACzD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAClE,CAAC;;AAxKL,sCAyKC;AA3JG,gBAAgB;AACO,0BAAY,GAAG,2CAA2C,CAAC"}
package/vappEntity.d.ts CHANGED
@@ -1,4 +1,83 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * The `vsphere.VappEntity` resource can be used to describe the behavior of an
4
+ * entity (virtual machine or sub-vApp container) in a vApp container.
5
+ *
6
+ * For more information on vSphere vApps, see [this
7
+ * page][ref-vsphere-vapp].
8
+ *
9
+ * [ref-vsphere-vapp]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-2A95EBB8-1779-40FA-B4FB-4D0845750879.html
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * The basic example below sets up a vApp container and a virtual machine in a
14
+ * compute cluster and then creates a vApp entity to change the virtual machine's
15
+ * power on behavior in the vApp container.
16
+ *
17
+ * ```typescript
18
+ * import * as pulumi from "@pulumi/pulumi";
19
+ * import * as vsphere from "@pulumi/vsphere";
20
+ *
21
+ * const config = new pulumi.Config();
22
+ * const datacenter = config.get("datacenter") || "dc-01";
23
+ * const cluster = config.get("cluster") || "cluster-01";
24
+ * const datacenterGetDatacenter = vsphere.getDatacenter({
25
+ * name: datacenter,
26
+ * });
27
+ * const computeCluster = datacenterGetDatacenter.then(datacenterGetDatacenter => vsphere.getComputeCluster({
28
+ * name: cluster,
29
+ * datacenterId: datacenterGetDatacenter.id,
30
+ * }));
31
+ * const network = datacenterGetDatacenter.then(datacenterGetDatacenter => vsphere.getNetwork({
32
+ * name: "network1",
33
+ * datacenterId: datacenterGetDatacenter.id,
34
+ * }));
35
+ * const datastore = datacenterGetDatacenter.then(datacenterGetDatacenter => vsphere.getDatastore({
36
+ * name: "datastore1",
37
+ * datacenterId: datacenterGetDatacenter.id,
38
+ * }));
39
+ * const vappContainer = new vsphere.VappContainer("vapp_container", {
40
+ * name: "vapp-container-test",
41
+ * parentResourcePoolId: computeCluster.then(computeCluster => computeCluster.id),
42
+ * });
43
+ * const vm = new vsphere.VirtualMachine("vm", {
44
+ * name: "virtual-machine-test",
45
+ * resourcePoolId: vappContainer.id,
46
+ * datastoreId: datastore.then(datastore => datastore.id),
47
+ * numCpus: 2,
48
+ * memory: 1024,
49
+ * guestId: "ubuntu64Guest",
50
+ * disks: [{
51
+ * label: "disk0",
52
+ * size: 1,
53
+ * }],
54
+ * networkInterfaces: [{
55
+ * networkId: network.then(network => network.id),
56
+ * }],
57
+ * });
58
+ * const vappEntity = new vsphere.VappEntity("vapp_entity", {
59
+ * targetId: vm.moid,
60
+ * containerId: vappContainer.id,
61
+ * startAction: "none",
62
+ * });
63
+ * ```
64
+ *
65
+ * ## Import
66
+ *
67
+ * An existing vApp entity can be imported into this resource via
68
+ *
69
+ * the ID of the vApp Entity.
70
+ *
71
+ * ```sh
72
+ * $ pulumi import vsphere:index/vappEntity:VappEntity vapp_entity vm-123:res-456
73
+ * ```
74
+ *
75
+ * The above would import the vApp entity that governs the behavior of the virtual
76
+ *
77
+ * machine with a [managed object ID][docs-about-morefs] of vm-123 in the vApp
78
+ *
79
+ * container with the [managed object ID][docs-about-morefs] res-456.
80
+ */
2
81
  export declare class VappEntity extends pulumi.CustomResource {
3
82
  /**
4
83
  * Get an existing VappEntity resource's state with the given name, ID, and optional extra
package/vappEntity.js CHANGED
@@ -5,6 +5,85 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.VappEntity = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
+ /**
9
+ * The `vsphere.VappEntity` resource can be used to describe the behavior of an
10
+ * entity (virtual machine or sub-vApp container) in a vApp container.
11
+ *
12
+ * For more information on vSphere vApps, see [this
13
+ * page][ref-vsphere-vapp].
14
+ *
15
+ * [ref-vsphere-vapp]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-2A95EBB8-1779-40FA-B4FB-4D0845750879.html
16
+ *
17
+ * ## Example Usage
18
+ *
19
+ * The basic example below sets up a vApp container and a virtual machine in a
20
+ * compute cluster and then creates a vApp entity to change the virtual machine's
21
+ * power on behavior in the vApp container.
22
+ *
23
+ * ```typescript
24
+ * import * as pulumi from "@pulumi/pulumi";
25
+ * import * as vsphere from "@pulumi/vsphere";
26
+ *
27
+ * const config = new pulumi.Config();
28
+ * const datacenter = config.get("datacenter") || "dc-01";
29
+ * const cluster = config.get("cluster") || "cluster-01";
30
+ * const datacenterGetDatacenter = vsphere.getDatacenter({
31
+ * name: datacenter,
32
+ * });
33
+ * const computeCluster = datacenterGetDatacenter.then(datacenterGetDatacenter => vsphere.getComputeCluster({
34
+ * name: cluster,
35
+ * datacenterId: datacenterGetDatacenter.id,
36
+ * }));
37
+ * const network = datacenterGetDatacenter.then(datacenterGetDatacenter => vsphere.getNetwork({
38
+ * name: "network1",
39
+ * datacenterId: datacenterGetDatacenter.id,
40
+ * }));
41
+ * const datastore = datacenterGetDatacenter.then(datacenterGetDatacenter => vsphere.getDatastore({
42
+ * name: "datastore1",
43
+ * datacenterId: datacenterGetDatacenter.id,
44
+ * }));
45
+ * const vappContainer = new vsphere.VappContainer("vapp_container", {
46
+ * name: "vapp-container-test",
47
+ * parentResourcePoolId: computeCluster.then(computeCluster => computeCluster.id),
48
+ * });
49
+ * const vm = new vsphere.VirtualMachine("vm", {
50
+ * name: "virtual-machine-test",
51
+ * resourcePoolId: vappContainer.id,
52
+ * datastoreId: datastore.then(datastore => datastore.id),
53
+ * numCpus: 2,
54
+ * memory: 1024,
55
+ * guestId: "ubuntu64Guest",
56
+ * disks: [{
57
+ * label: "disk0",
58
+ * size: 1,
59
+ * }],
60
+ * networkInterfaces: [{
61
+ * networkId: network.then(network => network.id),
62
+ * }],
63
+ * });
64
+ * const vappEntity = new vsphere.VappEntity("vapp_entity", {
65
+ * targetId: vm.moid,
66
+ * containerId: vappContainer.id,
67
+ * startAction: "none",
68
+ * });
69
+ * ```
70
+ *
71
+ * ## Import
72
+ *
73
+ * An existing vApp entity can be imported into this resource via
74
+ *
75
+ * the ID of the vApp Entity.
76
+ *
77
+ * ```sh
78
+ * $ pulumi import vsphere:index/vappEntity:VappEntity vapp_entity vm-123:res-456
79
+ * ```
80
+ *
81
+ * The above would import the vApp entity that governs the behavior of the virtual
82
+ *
83
+ * machine with a [managed object ID][docs-about-morefs] of vm-123 in the vApp
84
+ *
85
+ * container with the [managed object ID][docs-about-morefs] res-456.
86
+ */
8
87
  class VappEntity extends pulumi.CustomResource {
9
88
  /**
10
89
  * Get an existing VappEntity resource's state with the given name, ID, and optional extra
package/vappEntity.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"vappEntity.js","sourceRoot":"","sources":["../vappEntity.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC,MAAa,UAAW,SAAQ,MAAM,CAAC,cAAc;IACjD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAuB,EAAE,IAAmC;QACrH,OAAO,IAAI,UAAU,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACjE,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB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GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;YAChE,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YACtD,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9D,cAAc,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC;SACzE;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,UAAU,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC/D,CAAC;;AA5HL,gCA6HC;AA/GG,gBAAgB;AACO,uBAAY,GAAG,qCAAqC,CAAC"}
package/virtualDisk.d.ts CHANGED
@@ -1,4 +1,48 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * The `vsphere.VirtualDisk` resource can be used to create virtual disks outside
4
+ * of any given `vsphere.VirtualMachine`
5
+ * resource. These disks can be attached to a virtual machine by creating a disk
6
+ * block with the `attach` parameter.
7
+ *
8
+ * ## Example Usage
9
+ *
10
+ * ```typescript
11
+ * import * as pulumi from "@pulumi/pulumi";
12
+ * import * as vsphere from "@pulumi/vsphere";
13
+ *
14
+ * const datacenter = vsphere.getDatacenter({
15
+ * name: "dc-01",
16
+ * });
17
+ * const datastore = vsphere.getDatacenter({
18
+ * name: "datastore-01",
19
+ * });
20
+ * const virtualDisk = new vsphere.VirtualDisk("virtual_disk", {
21
+ * size: 40,
22
+ * type: "thin",
23
+ * vmdkPath: "/foo/foo.vmdk",
24
+ * createDirectories: true,
25
+ * datacenter: datacenter.then(datacenter => datacenter.name),
26
+ * datastore: datastoreVsphereDatastore.name,
27
+ * });
28
+ * ```
29
+ *
30
+ * ## Import
31
+ *
32
+ * An existing virtual disk can be imported into this resource
33
+ *
34
+ * via supplying the full datastore path to the virtual disk. An example is below:
35
+ *
36
+ * ```sh
37
+ * $ pulumi import vsphere:index/virtualDisk:VirtualDisk virtual_disk \
38
+ * ```
39
+ *
40
+ * '{"virtual_disk_path": "/dc-01/[datastore-01]foo/bar.vmdk", \ "create_directories": "true"}'
41
+ *
42
+ * The above would import the virtual disk located at `foo/bar.vmdk` in the `datastore-01`
43
+ *
44
+ * datastore of the `dc-01` datacenter with `create_directories` set as `true`.
45
+ */
2
46
  export declare class VirtualDisk extends pulumi.CustomResource {
3
47
  /**
4
48
  * Get an existing VirtualDisk resource's state with the given name, ID, and optional extra
package/virtualDisk.js CHANGED
@@ -5,6 +5,50 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.VirtualDisk = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
+ /**
9
+ * The `vsphere.VirtualDisk` resource can be used to create virtual disks outside
10
+ * of any given `vsphere.VirtualMachine`
11
+ * resource. These disks can be attached to a virtual machine by creating a disk
12
+ * block with the `attach` parameter.
13
+ *
14
+ * ## Example Usage
15
+ *
16
+ * ```typescript
17
+ * import * as pulumi from "@pulumi/pulumi";
18
+ * import * as vsphere from "@pulumi/vsphere";
19
+ *
20
+ * const datacenter = vsphere.getDatacenter({
21
+ * name: "dc-01",
22
+ * });
23
+ * const datastore = vsphere.getDatacenter({
24
+ * name: "datastore-01",
25
+ * });
26
+ * const virtualDisk = new vsphere.VirtualDisk("virtual_disk", {
27
+ * size: 40,
28
+ * type: "thin",
29
+ * vmdkPath: "/foo/foo.vmdk",
30
+ * createDirectories: true,
31
+ * datacenter: datacenter.then(datacenter => datacenter.name),
32
+ * datastore: datastoreVsphereDatastore.name,
33
+ * });
34
+ * ```
35
+ *
36
+ * ## Import
37
+ *
38
+ * An existing virtual disk can be imported into this resource
39
+ *
40
+ * via supplying the full datastore path to the virtual disk. An example is below:
41
+ *
42
+ * ```sh
43
+ * $ pulumi import vsphere:index/virtualDisk:VirtualDisk virtual_disk \
44
+ * ```
45
+ *
46
+ * '{"virtual_disk_path": "/dc-01/[datastore-01]foo/bar.vmdk", \ "create_directories": "true"}'
47
+ *
48
+ * The above would import the virtual disk located at `foo/bar.vmdk` in the `datastore-01`
49
+ *
50
+ * datastore of the `dc-01` datacenter with `create_directories` set as `true`.
51
+ */
8
52
  class VirtualDisk extends pulumi.CustomResource {
9
53
  /**
10
54
  * Get an existing VirtualDisk resource's state with the given name, ID, and optional extra
@@ -1 +1 @@
1
- {"version":3,"file":"virtualDisk.js","sourceRoot":"","sources":["../virtualDisk.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC,MAAa,WAAY,SAAQ,MAAM,CAAC,cAAc;IAClD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAwB,EAAE,IAAmC;QACtH,OAAO,IAAI,WAAW,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAClE,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,WAAW,CAAC,YAAY,CAAC;IAC5D,CAAC;IAkED,YAAY,IAAY,EAAE,WAAgD,EAAE,IAAmC;QAC3G,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA2C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C,CAAC,CAAC,SAAS,CAAC;YAChE,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YACtD,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YACtD,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;SACjE;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,WAAW,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC;;AA7HL,kCA8HC;AAhHG,gBAAgB;AACO,wBAAY,GAAG,uCAAuC,CAAC"}
@@ -1,6 +1,31 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
2
  import * as inputs from "./types/input";
3
3
  import * as outputs from "./types/output";
4
+ /**
5
+ * ## Import
6
+ *
7
+ * ### Additional Importing Requirements
8
+ *
9
+ * Many of the requirements for [cloning](#additional-requirements-and-notes-for-cloning) apply to importing. Although importing writes directly to the Terraform state, some rules can not be enforced during import time, so every effort should be made to ensure the correctness of the configuration before the import.
10
+ *
11
+ * The following requirements apply to import:
12
+ *
13
+ * * The disks must have a [`label`](#label) argument assigned in a convention matching `diskN`, starting with disk number 0, based on each virtual disk order on the SCSI bus. As an example, a disk on SCSI controller `0` with a unit number of `0` would be labeled as `disk0`, a disk on the same controller with a unit number of `1` would be `disk1`, but the next disk, which is on SCSI controller `1` with a unit number of `0`, still becomes `disk2`.
14
+ *
15
+ * * Disks are always imported with [`keep_on_remove`](#keep_on_remove) enabled until the first `pulumi up` run which will remove the setting for known disks. This process safeguards against naming or accounting mistakes in the disk configuration.
16
+ *
17
+ * * The storage controller count for the resource is set to the number of contiguous storage controllers found, starting with the controller at SCSI bus number `0`. If no storage controllers are discovered, the virtual machine is not eligible for import. For maximum compatibility, ensure that the virtual machine has the exact number of storage controllers needed and set the storage controller count accordingly.
18
+ *
19
+ * After importing, you should run `pulumi preview`. Unless you have changed anything else in the configuration that would cause other attributes to change. The only difference should be configuration-only changes, which are typically comprised of:
20
+ *
21
+ * * The [`imported`](#imported) flag will transition from `true` to `false`.
22
+ *
23
+ * * The [`keep_on_remove`](#keep_on_remove) of known disks will transition from `true` to `false`.
24
+ *
25
+ * * Configuration supplied in the [`clone`](#clone) block, if present, will be persisted to state. This initial persistence operation does not perform any cloning or customization actions, nor does it force a new resource. After the first apply operation, further changes to `clone` will force the creation of a new resource.
26
+ *
27
+ * These changes only update Terraform state when applied. Hence, it is safe to run when the virtual machine is running. If more settings are modified, you may need to plan maintenance accordingly for any necessary virtual machine re-configurations.
28
+ */
4
29
  export declare class VirtualMachine extends pulumi.CustomResource {
5
30
  /**
6
31
  * Get an existing VirtualMachine resource's state with the given name, ID, and optional extra
package/virtualMachine.js CHANGED
@@ -5,6 +5,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.VirtualMachine = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
+ /**
9
+ * ## Import
10
+ *
11
+ * ### Additional Importing Requirements
12
+ *
13
+ * Many of the requirements for [cloning](#additional-requirements-and-notes-for-cloning) apply to importing. Although importing writes directly to the Terraform state, some rules can not be enforced during import time, so every effort should be made to ensure the correctness of the configuration before the import.
14
+ *
15
+ * The following requirements apply to import:
16
+ *
17
+ * * The disks must have a [`label`](#label) argument assigned in a convention matching `diskN`, starting with disk number 0, based on each virtual disk order on the SCSI bus. As an example, a disk on SCSI controller `0` with a unit number of `0` would be labeled as `disk0`, a disk on the same controller with a unit number of `1` would be `disk1`, but the next disk, which is on SCSI controller `1` with a unit number of `0`, still becomes `disk2`.
18
+ *
19
+ * * Disks are always imported with [`keep_on_remove`](#keep_on_remove) enabled until the first `pulumi up` run which will remove the setting for known disks. This process safeguards against naming or accounting mistakes in the disk configuration.
20
+ *
21
+ * * The storage controller count for the resource is set to the number of contiguous storage controllers found, starting with the controller at SCSI bus number `0`. If no storage controllers are discovered, the virtual machine is not eligible for import. For maximum compatibility, ensure that the virtual machine has the exact number of storage controllers needed and set the storage controller count accordingly.
22
+ *
23
+ * After importing, you should run `pulumi preview`. Unless you have changed anything else in the configuration that would cause other attributes to change. The only difference should be configuration-only changes, which are typically comprised of:
24
+ *
25
+ * * The [`imported`](#imported) flag will transition from `true` to `false`.
26
+ *
27
+ * * The [`keep_on_remove`](#keep_on_remove) of known disks will transition from `true` to `false`.
28
+ *
29
+ * * Configuration supplied in the [`clone`](#clone) block, if present, will be persisted to state. This initial persistence operation does not perform any cloning or customization actions, nor does it force a new resource. After the first apply operation, further changes to `clone` will force the creation of a new resource.
30
+ *
31
+ * These changes only update Terraform state when applied. Hence, it is safe to run when the virtual machine is running. If more settings are modified, you may need to plan maintenance accordingly for any necessary virtual machine re-configurations.
32
+ */
8
33
  class VirtualMachine extends pulumi.CustomResource {
9
34
  /**
10
35
  * Get an existing VirtualMachine resource's state with the given name, ID, and optional extra