@pulumi/vsphere 4.10.0 → 4.10.2-alpha.1720054582
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.
- package/computeCluster.d.ts +309 -633
- package/computeCluster.js +2 -0
- package/computeCluster.js.map +1 -1
- package/computeClusterVmAffinityRule.d.ts +14 -10
- package/computeClusterVmAffinityRule.js +14 -10
- package/computeClusterVmAffinityRule.js.map +1 -1
- package/datacenter.d.ts +14 -15
- package/datacenter.js +14 -6
- package/datacenter.js.map +1 -1
- package/datastoreCluster.d.ts +72 -162
- package/datastoreCluster.js.map +1 -1
- package/distributedPortGroup.d.ts +54 -78
- package/distributedPortGroup.js.map +1 -1
- package/distributedVirtualSwitch.d.ts +129 -351
- package/distributedVirtualSwitch.js.map +1 -1
- package/entityPermissions.d.ts +24 -15
- package/entityPermissions.js.map +1 -1
- package/file.d.ts +8 -12
- package/file.js +8 -12
- package/file.js.map +1 -1
- package/folder.d.ts +0 -9
- package/folder.js.map +1 -1
- package/getComputeCluster.d.ts +0 -4
- package/getComputeCluster.js +0 -4
- package/getComputeCluster.js.map +1 -1
- package/getComputeClusterHostGroup.d.ts +22 -22
- package/getComputeClusterHostGroup.js +16 -18
- package/getComputeClusterHostGroup.js.map +1 -1
- package/getContentLibrary.d.ts +10 -10
- package/getContentLibrary.js +10 -10
- package/getContentLibraryItem.d.ts +12 -8
- package/getContentLibraryItem.js +4 -4
- package/getContentLibraryItem.js.map +1 -1
- package/getCustomAttribute.d.ts +0 -4
- package/getCustomAttribute.js +0 -4
- package/getCustomAttribute.js.map +1 -1
- package/getDatacenter.d.ts +0 -4
- package/getDatacenter.js +0 -4
- package/getDatacenter.js.map +1 -1
- package/getDatastore.d.ts +9 -13
- package/getDatastore.js +0 -4
- package/getDatastore.js.map +1 -1
- package/getDatastoreCluster.d.ts +0 -4
- package/getDatastoreCluster.js +0 -4
- package/getDatastoreCluster.js.map +1 -1
- package/getDatastoreStats.d.ts +38 -44
- package/getDatastoreStats.js +16 -24
- package/getDatastoreStats.js.map +1 -1
- package/getDistributedVirtualSwitch.d.ts +2 -4
- package/getDistributedVirtualSwitch.js +2 -4
- package/getDistributedVirtualSwitch.js.map +1 -1
- package/getDynamic.d.ts +18 -20
- package/getDynamic.js +12 -14
- package/getDynamic.js.map +1 -1
- package/getFolder.d.ts +10 -6
- package/getFolder.js +10 -6
- package/getFolder.js.map +1 -1
- package/getGuestOsCustomization.d.ts +8 -51
- package/getGuestOsCustomization.js +4 -34
- package/getGuestOsCustomization.js.map +1 -1
- package/getHost.d.ts +0 -4
- package/getHost.js +0 -4
- package/getHost.js.map +1 -1
- package/getHostBaseImages.d.ts +42 -0
- package/getHostBaseImages.js +43 -0
- package/getHostBaseImages.js.map +1 -0
- package/getHostPciDevice.d.ts +14 -20
- package/getHostPciDevice.js +10 -18
- package/getHostPciDevice.js.map +1 -1
- package/getHostThumbprint.d.ts +12 -16
- package/getHostThumbprint.js +8 -12
- package/getHostThumbprint.js.map +1 -1
- package/getHostVgpuProfile.d.ts +4 -10
- package/getHostVgpuProfile.js +0 -8
- package/getHostVgpuProfile.js.map +1 -1
- package/getLicense.d.ts +2 -5
- package/getLicense.js +0 -4
- package/getLicense.js.map +1 -1
- package/getNetwork.d.ts +14 -18
- package/getNetwork.js +10 -14
- package/getNetwork.js.map +1 -1
- package/getPolicy.d.ts +0 -4
- package/getPolicy.js +0 -4
- package/getPolicy.js.map +1 -1
- package/getResourcePool.d.ts +14 -18
- package/getResourcePool.js +14 -18
- package/getResourcePool.js.map +1 -1
- package/getRole.d.ts +4 -8
- package/getRole.js +4 -8
- package/getRole.js.map +1 -1
- package/getTag.d.ts +0 -4
- package/getTag.js +0 -4
- package/getTag.js.map +1 -1
- package/getTagCategory.d.ts +0 -4
- package/getTagCategory.js +0 -4
- package/getTagCategory.js.map +1 -1
- package/getVappContainer.d.ts +0 -4
- package/getVappContainer.js +0 -4
- package/getVappContainer.js.map +1 -1
- package/getVirtualMachine.d.ts +48 -40
- package/getVirtualMachine.js +6 -12
- package/getVirtualMachine.js.map +1 -1
- package/getVmfsDisks.d.ts +0 -4
- package/getVmfsDisks.js +0 -4
- package/getVmfsDisks.js.map +1 -1
- package/guestOsCustomization.d.ts +26 -0
- package/guestOsCustomization.js +26 -0
- package/guestOsCustomization.js.map +1 -1
- package/haVmOverride.d.ts +81 -162
- package/haVmOverride.js.map +1 -1
- package/host.d.ts +0 -10
- package/host.js +0 -10
- package/host.js.map +1 -1
- package/hostPortGroup.d.ts +6 -12
- package/hostPortGroup.js +6 -12
- package/hostPortGroup.js.map +1 -1
- package/hostVirtualSwitch.d.ts +60 -123
- package/hostVirtualSwitch.js.map +1 -1
- package/index.d.ts +12 -0
- package/index.js +21 -2
- package/index.js.map +1 -1
- package/license.d.ts +0 -17
- package/license.js +0 -17
- package/license.js.map +1 -1
- package/nasDatastore.d.ts +3 -3
- package/offlineSoftwareDepot.d.ts +63 -0
- package/offlineSoftwareDepot.js +59 -0
- package/offlineSoftwareDepot.js.map +1 -0
- package/package.json +3 -2
- package/resourcePool.d.ts +28 -12
- package/resourcePool.js +28 -12
- package/resourcePool.js.map +1 -1
- package/supervisor.d.ts +292 -0
- package/supervisor.js +178 -0
- package/supervisor.js.map +1 -0
- package/types/input.d.ts +172 -119
- package/types/output.d.ts +192 -134
- package/virtualDisk.d.ts +6 -6
- package/virtualMachine.d.ts +250 -361
- package/virtualMachine.js.map +1 -1
- package/virtualMachineClass.d.ts +143 -0
- package/virtualMachineClass.js +100 -0
- package/virtualMachineClass.js.map +1 -0
- package/virtualMachineSnapshot.d.ts +4 -6
- package/virtualMachineSnapshot.js +4 -6
- package/virtualMachineSnapshot.js.map +1 -1
- package/vmStoragePolicy.d.ts +29 -35
- package/vmStoragePolicy.js +29 -35
- package/vmStoragePolicy.js.map +1 -1
- package/vnic.d.ts +34 -42
- package/vnic.js +31 -39
- package/vnic.js.map +1 -1
- package/package.json.bak +0 -29
package/vmStoragePolicy.js
CHANGED
|
@@ -16,7 +16,6 @@ const utilities = require("./utilities");
|
|
|
16
16
|
*
|
|
17
17
|
* In this example, tags are first applied to datastores.
|
|
18
18
|
*
|
|
19
|
-
* <!--Start PulumiCodeChooser -->
|
|
20
19
|
* ```typescript
|
|
21
20
|
* import * as pulumi from "@pulumi/pulumi";
|
|
22
21
|
* import * as vsphere from "@pulumi/vsphere";
|
|
@@ -31,103 +30,101 @@ const utilities = require("./utilities");
|
|
|
31
30
|
* name: "replication",
|
|
32
31
|
* });
|
|
33
32
|
* const production = vsphere.getTag({
|
|
34
|
-
* categoryId: "data.vsphere_tag_category.environment.id",
|
|
35
33
|
* name: "production",
|
|
34
|
+
* categoryId: "data.vsphere_tag_category.environment.id",
|
|
36
35
|
* });
|
|
37
36
|
* const development = vsphere.getTag({
|
|
38
|
-
* categoryId: "data.vsphere_tag_category.environment.id",
|
|
39
37
|
* name: "development",
|
|
38
|
+
* categoryId: "data.vsphere_tag_category.environment.id",
|
|
40
39
|
* });
|
|
41
40
|
* const platinum = vsphere.getTag({
|
|
42
|
-
* categoryId: "data.vsphere_tag_category.service_level.id",
|
|
43
41
|
* name: "platinum",
|
|
42
|
+
* categoryId: "data.vsphere_tag_category.service_level.id",
|
|
44
43
|
* });
|
|
45
44
|
* const gold = vsphere.getTag({
|
|
46
|
-
* categoryId: "data.vsphere_tag_category.service_level.id",
|
|
47
45
|
* name: "platinum",
|
|
46
|
+
* categoryId: "data.vsphere_tag_category.service_level.id",
|
|
48
47
|
* });
|
|
49
48
|
* const silver = vsphere.getTag({
|
|
50
|
-
* categoryId: "data.vsphere_tag_category.service_level.id",
|
|
51
49
|
* name: "silver",
|
|
50
|
+
* categoryId: "data.vsphere_tag_category.service_level.id",
|
|
52
51
|
* });
|
|
53
52
|
* const bronze = vsphere.getTag({
|
|
54
|
-
* categoryId: "data.vsphere_tag_category.service_level.id",
|
|
55
53
|
* name: "bronze",
|
|
54
|
+
* categoryId: "data.vsphere_tag_category.service_level.id",
|
|
56
55
|
* });
|
|
57
56
|
* const replicated = vsphere.getTag({
|
|
58
|
-
* categoryId: "data.vsphere_tag_category.replication.id",
|
|
59
57
|
* name: "replicated",
|
|
58
|
+
* categoryId: "data.vsphere_tag_category.replication.id",
|
|
60
59
|
* });
|
|
61
60
|
* const nonReplicated = vsphere.getTag({
|
|
62
|
-
* categoryId: "data.vsphere_tag_category.replication.id",
|
|
63
61
|
* name: "non_replicated",
|
|
62
|
+
* categoryId: "data.vsphere_tag_category.replication.id",
|
|
64
63
|
* });
|
|
65
|
-
* const prodDatastore = new vsphere.VmfsDatastore("
|
|
64
|
+
* const prodDatastore = new vsphere.VmfsDatastore("prod_datastore", {tags: [
|
|
66
65
|
* "data.vsphere_tag.production.id",
|
|
67
66
|
* "data.vsphere_tag.platinum.id",
|
|
68
67
|
* "data.vsphere_tag.replicated.id",
|
|
69
68
|
* ]});
|
|
70
|
-
* const devDatastore = new vsphere.NasDatastore("
|
|
69
|
+
* const devDatastore = new vsphere.NasDatastore("dev_datastore", {tags: [
|
|
71
70
|
* "data.vsphere_tag.development.id",
|
|
72
71
|
* "data.vsphere_tag.silver.id",
|
|
73
72
|
* "data.vsphere_tag.non_replicated.id",
|
|
74
73
|
* ]});
|
|
75
74
|
* ```
|
|
76
|
-
* <!--End PulumiCodeChooser -->
|
|
77
75
|
*
|
|
78
76
|
* Next, storage policies are created and `tagRules` are applied.
|
|
79
77
|
*
|
|
80
|
-
* <!--Start PulumiCodeChooser -->
|
|
81
78
|
* ```typescript
|
|
82
79
|
* import * as pulumi from "@pulumi/pulumi";
|
|
83
80
|
* import * as vsphere from "@pulumi/vsphere";
|
|
84
81
|
*
|
|
85
|
-
* const prodPlatinumReplicated = new vsphere.VmStoragePolicy("
|
|
82
|
+
* const prodPlatinumReplicated = new vsphere.VmStoragePolicy("prod_platinum_replicated", {
|
|
83
|
+
* name: "prod_platinum_replicated",
|
|
86
84
|
* description: "prod_platinum_replicated",
|
|
87
85
|
* tagRules: [
|
|
88
86
|
* {
|
|
89
|
-
* tagCategory:
|
|
90
|
-
* tags: [
|
|
87
|
+
* tagCategory: environment.name,
|
|
88
|
+
* tags: [production.name],
|
|
91
89
|
* includeDatastoresWithTags: true,
|
|
92
90
|
* },
|
|
93
91
|
* {
|
|
94
|
-
* tagCategory:
|
|
95
|
-
* tags: [
|
|
92
|
+
* tagCategory: serviceLevel.name,
|
|
93
|
+
* tags: [platinum.name],
|
|
96
94
|
* includeDatastoresWithTags: true,
|
|
97
95
|
* },
|
|
98
96
|
* {
|
|
99
|
-
* tagCategory:
|
|
100
|
-
* tags: [
|
|
97
|
+
* tagCategory: replication.name,
|
|
98
|
+
* tags: [replicated.name],
|
|
101
99
|
* includeDatastoresWithTags: true,
|
|
102
100
|
* },
|
|
103
101
|
* ],
|
|
104
102
|
* });
|
|
105
|
-
* const devSilverNonreplicated = new vsphere.VmStoragePolicy("
|
|
103
|
+
* const devSilverNonreplicated = new vsphere.VmStoragePolicy("dev_silver_nonreplicated", {
|
|
104
|
+
* name: "dev_silver_nonreplicated",
|
|
106
105
|
* description: "dev_silver_nonreplicated",
|
|
107
106
|
* tagRules: [
|
|
108
107
|
* {
|
|
109
|
-
* tagCategory:
|
|
110
|
-
* tags: [
|
|
108
|
+
* tagCategory: environment.name,
|
|
109
|
+
* tags: [development.name],
|
|
111
110
|
* includeDatastoresWithTags: true,
|
|
112
111
|
* },
|
|
113
112
|
* {
|
|
114
|
-
* tagCategory:
|
|
115
|
-
* tags: [
|
|
113
|
+
* tagCategory: serviceLevel.name,
|
|
114
|
+
* tags: [silver.name],
|
|
116
115
|
* includeDatastoresWithTags: true,
|
|
117
116
|
* },
|
|
118
117
|
* {
|
|
119
|
-
* tagCategory:
|
|
120
|
-
* tags: [
|
|
118
|
+
* tagCategory: replication.name,
|
|
119
|
+
* tags: [nonReplicated.name],
|
|
121
120
|
* includeDatastoresWithTags: true,
|
|
122
121
|
* },
|
|
123
122
|
* ],
|
|
124
123
|
* });
|
|
125
124
|
* ```
|
|
126
|
-
* <!--End PulumiCodeChooser -->
|
|
127
125
|
*
|
|
128
|
-
*
|
|
126
|
+
* Lastly, when creating a virtual machine resource, a storage policy can be specified to direct virtual machine placement to a datastore which matches the policy's `tagsRules`.
|
|
129
127
|
*
|
|
130
|
-
* <!--Start PulumiCodeChooser -->
|
|
131
128
|
* ```typescript
|
|
132
129
|
* import * as pulumi from "@pulumi/pulumi";
|
|
133
130
|
* import * as vsphere from "@pulumi/vsphere";
|
|
@@ -138,12 +135,9 @@ const utilities = require("./utilities");
|
|
|
138
135
|
* const devSilverNonreplicated = vsphere.getPolicy({
|
|
139
136
|
* name: "dev_silver_nonreplicated",
|
|
140
137
|
* });
|
|
141
|
-
* const prodVm = new vsphere.VirtualMachine("
|
|
142
|
-
*
|
|
143
|
-
* const devVm = new vsphere.VirtualMachine("devVm", {storagePolicyId: data.vsphere_storage_policy.storage_policy.dev_silver_nonreplicated.id});
|
|
144
|
-
* // ... other configuration ...
|
|
138
|
+
* const prodVm = new vsphere.VirtualMachine("prod_vm", {storagePolicyId: storagePolicy.prodPlatinumReplicated.id});
|
|
139
|
+
* const devVm = new vsphere.VirtualMachine("dev_vm", {storagePolicyId: storagePolicy.devSilverNonreplicated.id});
|
|
145
140
|
* ```
|
|
146
|
-
* <!--End PulumiCodeChooser -->
|
|
147
141
|
*/
|
|
148
142
|
class VmStoragePolicy extends pulumi.CustomResource {
|
|
149
143
|
/**
|
package/vmStoragePolicy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vmStoragePolicy.js","sourceRoot":"","sources":["../vmStoragePolicy.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC
|
|
1
|
+
{"version":3,"file":"vmStoragePolicy.js","sourceRoot":"","sources":["../vmStoragePolicy.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;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,QAAQ,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBACrD,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;aAC3D;YACD,cAAc,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;YACpE,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,eAAe,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACpE,CAAC;;AApEL,0CAqEC;AAvDG,gBAAgB;AACO,4BAAY,GAAG,+CAA+C,CAAC"}
|
package/vnic.d.ts
CHANGED
|
@@ -6,61 +6,59 @@ import * as outputs from "./types/output";
|
|
|
6
6
|
*
|
|
7
7
|
* ## Example Usage
|
|
8
8
|
*
|
|
9
|
-
* ### S
|
|
10
|
-
*
|
|
11
9
|
* ### Create a vnic attached to a distributed virtual switch using the vmotion TCP/IP stack
|
|
12
10
|
*
|
|
13
|
-
* <!--Start PulumiCodeChooser -->
|
|
14
11
|
* ```typescript
|
|
15
12
|
* import * as pulumi from "@pulumi/pulumi";
|
|
16
13
|
* import * as vsphere from "@pulumi/vsphere";
|
|
17
14
|
*
|
|
18
|
-
* const
|
|
19
|
-
* name: "
|
|
15
|
+
* const datacenter = vsphere.getDatacenter({
|
|
16
|
+
* name: "dc-01",
|
|
20
17
|
* });
|
|
21
|
-
* const
|
|
22
|
-
* name: "
|
|
23
|
-
* datacenterId:
|
|
18
|
+
* const host = datacenter.then(datacenter => vsphere.getHost({
|
|
19
|
+
* name: "esxi-01.example.com",
|
|
20
|
+
* datacenterId: datacenter.id,
|
|
24
21
|
* }));
|
|
25
|
-
* const
|
|
26
|
-
*
|
|
22
|
+
* const vds = new vsphere.DistributedVirtualSwitch("vds", {
|
|
23
|
+
* name: "vds-01",
|
|
24
|
+
* datacenterId: datacenter.then(datacenter => datacenter.id),
|
|
27
25
|
* hosts: [{
|
|
28
|
-
* hostSystemId:
|
|
26
|
+
* hostSystemId: host.then(host => host.id),
|
|
29
27
|
* devices: ["vnic3"],
|
|
30
28
|
* }],
|
|
31
29
|
* });
|
|
32
|
-
* const
|
|
30
|
+
* const pg = new vsphere.DistributedPortGroup("pg", {
|
|
31
|
+
* name: "pg-01",
|
|
33
32
|
* vlanId: 1234,
|
|
34
|
-
* distributedVirtualSwitchUuid:
|
|
33
|
+
* distributedVirtualSwitchUuid: vds.id,
|
|
35
34
|
* });
|
|
36
|
-
* const
|
|
37
|
-
* host:
|
|
38
|
-
* distributedSwitchPort:
|
|
39
|
-
* distributedPortGroup:
|
|
35
|
+
* const vnic = new vsphere.Vnic("vnic", {
|
|
36
|
+
* host: host.then(host => host.id),
|
|
37
|
+
* distributedSwitchPort: vds.id,
|
|
38
|
+
* distributedPortGroup: pg.id,
|
|
40
39
|
* ipv4: {
|
|
41
40
|
* dhcp: true,
|
|
42
41
|
* },
|
|
43
42
|
* netstack: "vmotion",
|
|
44
43
|
* });
|
|
45
44
|
* ```
|
|
46
|
-
* <!--End PulumiCodeChooser -->
|
|
47
45
|
*
|
|
48
46
|
* ### Create a vnic attached to a portgroup using the default TCP/IP stack
|
|
49
47
|
*
|
|
50
|
-
* <!--Start PulumiCodeChooser -->
|
|
51
48
|
* ```typescript
|
|
52
49
|
* import * as pulumi from "@pulumi/pulumi";
|
|
53
50
|
* import * as vsphere from "@pulumi/vsphere";
|
|
54
51
|
*
|
|
55
|
-
* const
|
|
56
|
-
* name: "
|
|
52
|
+
* const datacenter = vsphere.getDatacenter({
|
|
53
|
+
* name: "dc-01",
|
|
57
54
|
* });
|
|
58
|
-
* const
|
|
59
|
-
* name: "
|
|
60
|
-
* datacenterId:
|
|
55
|
+
* const host = datacenter.then(datacenter => vsphere.getHost({
|
|
56
|
+
* name: "esxi-01.example.com",
|
|
57
|
+
* datacenterId: datacenter.id,
|
|
61
58
|
* }));
|
|
62
|
-
* const
|
|
63
|
-
*
|
|
59
|
+
* const hvs = new vsphere.HostVirtualSwitch("hvs", {
|
|
60
|
+
* name: "hvs-01",
|
|
61
|
+
* hostSystemId: host.then(host => host.id),
|
|
64
62
|
* networkAdapters: [
|
|
65
63
|
* "vmnic3",
|
|
66
64
|
* "vmnic4",
|
|
@@ -68,13 +66,14 @@ import * as outputs from "./types/output";
|
|
|
68
66
|
* activeNics: ["vmnic3"],
|
|
69
67
|
* standbyNics: ["vmnic4"],
|
|
70
68
|
* });
|
|
71
|
-
* const
|
|
72
|
-
*
|
|
73
|
-
*
|
|
69
|
+
* const pg = new vsphere.HostPortGroup("pg", {
|
|
70
|
+
* name: "pg-01",
|
|
71
|
+
* virtualSwitchName: hvs.name,
|
|
72
|
+
* hostSystemId: host.then(host => host.id),
|
|
74
73
|
* });
|
|
75
|
-
* const
|
|
76
|
-
* host:
|
|
77
|
-
* portgroup:
|
|
74
|
+
* const vnic = new vsphere.Vnic("vnic", {
|
|
75
|
+
* host: host.then(host => host.id),
|
|
76
|
+
* portgroup: pg.name,
|
|
78
77
|
* ipv4: {
|
|
79
78
|
* dhcp: true,
|
|
80
79
|
* },
|
|
@@ -84,7 +83,6 @@ import * as outputs from "./types/output";
|
|
|
84
83
|
* ],
|
|
85
84
|
* });
|
|
86
85
|
* ```
|
|
87
|
-
* <!--End PulumiCodeChooser -->
|
|
88
86
|
*
|
|
89
87
|
* ## Importing
|
|
90
88
|
*
|
|
@@ -93,12 +91,6 @@ import * as outputs from "./types/output";
|
|
|
93
91
|
*
|
|
94
92
|
* [docs-import]: /docs/import/index.html
|
|
95
93
|
*
|
|
96
|
-
* <!--Start PulumiCodeChooser -->
|
|
97
|
-
* ```typescript
|
|
98
|
-
* import * as pulumi from "@pulumi/pulumi";
|
|
99
|
-
* ```
|
|
100
|
-
* <!--End PulumiCodeChooser -->
|
|
101
|
-
*
|
|
102
94
|
* The above would import the vnic `vmk2` from host with ID `host-123`.
|
|
103
95
|
*/
|
|
104
96
|
export declare class Vnic extends pulumi.CustomResource {
|
|
@@ -122,7 +114,7 @@ export declare class Vnic extends pulumi.CustomResource {
|
|
|
122
114
|
*/
|
|
123
115
|
readonly distributedPortGroup: pulumi.Output<string | undefined>;
|
|
124
116
|
/**
|
|
125
|
-
* UUID of the
|
|
117
|
+
* UUID of the vdswitch the nic will be attached to. Do not set if you set portgroup.
|
|
126
118
|
*/
|
|
127
119
|
readonly distributedSwitchPort: pulumi.Output<string | undefined>;
|
|
128
120
|
/**
|
|
@@ -175,7 +167,7 @@ export interface VnicState {
|
|
|
175
167
|
*/
|
|
176
168
|
distributedPortGroup?: pulumi.Input<string>;
|
|
177
169
|
/**
|
|
178
|
-
* UUID of the
|
|
170
|
+
* UUID of the vdswitch the nic will be attached to. Do not set if you set portgroup.
|
|
179
171
|
*/
|
|
180
172
|
distributedSwitchPort?: pulumi.Input<string>;
|
|
181
173
|
/**
|
|
@@ -220,7 +212,7 @@ export interface VnicArgs {
|
|
|
220
212
|
*/
|
|
221
213
|
distributedPortGroup?: pulumi.Input<string>;
|
|
222
214
|
/**
|
|
223
|
-
* UUID of the
|
|
215
|
+
* UUID of the vdswitch the nic will be attached to. Do not set if you set portgroup.
|
|
224
216
|
*/
|
|
225
217
|
distributedSwitchPort?: pulumi.Input<string>;
|
|
226
218
|
/**
|
package/vnic.js
CHANGED
|
@@ -10,61 +10,59 @@ const utilities = require("./utilities");
|
|
|
10
10
|
*
|
|
11
11
|
* ## Example Usage
|
|
12
12
|
*
|
|
13
|
-
* ### S
|
|
14
|
-
*
|
|
15
13
|
* ### Create a vnic attached to a distributed virtual switch using the vmotion TCP/IP stack
|
|
16
14
|
*
|
|
17
|
-
* <!--Start PulumiCodeChooser -->
|
|
18
15
|
* ```typescript
|
|
19
16
|
* import * as pulumi from "@pulumi/pulumi";
|
|
20
17
|
* import * as vsphere from "@pulumi/vsphere";
|
|
21
18
|
*
|
|
22
|
-
* const
|
|
23
|
-
* name: "
|
|
19
|
+
* const datacenter = vsphere.getDatacenter({
|
|
20
|
+
* name: "dc-01",
|
|
24
21
|
* });
|
|
25
|
-
* const
|
|
26
|
-
* name: "
|
|
27
|
-
* datacenterId:
|
|
22
|
+
* const host = datacenter.then(datacenter => vsphere.getHost({
|
|
23
|
+
* name: "esxi-01.example.com",
|
|
24
|
+
* datacenterId: datacenter.id,
|
|
28
25
|
* }));
|
|
29
|
-
* const
|
|
30
|
-
*
|
|
26
|
+
* const vds = new vsphere.DistributedVirtualSwitch("vds", {
|
|
27
|
+
* name: "vds-01",
|
|
28
|
+
* datacenterId: datacenter.then(datacenter => datacenter.id),
|
|
31
29
|
* hosts: [{
|
|
32
|
-
* hostSystemId:
|
|
30
|
+
* hostSystemId: host.then(host => host.id),
|
|
33
31
|
* devices: ["vnic3"],
|
|
34
32
|
* }],
|
|
35
33
|
* });
|
|
36
|
-
* const
|
|
34
|
+
* const pg = new vsphere.DistributedPortGroup("pg", {
|
|
35
|
+
* name: "pg-01",
|
|
37
36
|
* vlanId: 1234,
|
|
38
|
-
* distributedVirtualSwitchUuid:
|
|
37
|
+
* distributedVirtualSwitchUuid: vds.id,
|
|
39
38
|
* });
|
|
40
|
-
* const
|
|
41
|
-
* host:
|
|
42
|
-
* distributedSwitchPort:
|
|
43
|
-
* distributedPortGroup:
|
|
39
|
+
* const vnic = new vsphere.Vnic("vnic", {
|
|
40
|
+
* host: host.then(host => host.id),
|
|
41
|
+
* distributedSwitchPort: vds.id,
|
|
42
|
+
* distributedPortGroup: pg.id,
|
|
44
43
|
* ipv4: {
|
|
45
44
|
* dhcp: true,
|
|
46
45
|
* },
|
|
47
46
|
* netstack: "vmotion",
|
|
48
47
|
* });
|
|
49
48
|
* ```
|
|
50
|
-
* <!--End PulumiCodeChooser -->
|
|
51
49
|
*
|
|
52
50
|
* ### Create a vnic attached to a portgroup using the default TCP/IP stack
|
|
53
51
|
*
|
|
54
|
-
* <!--Start PulumiCodeChooser -->
|
|
55
52
|
* ```typescript
|
|
56
53
|
* import * as pulumi from "@pulumi/pulumi";
|
|
57
54
|
* import * as vsphere from "@pulumi/vsphere";
|
|
58
55
|
*
|
|
59
|
-
* const
|
|
60
|
-
* name: "
|
|
56
|
+
* const datacenter = vsphere.getDatacenter({
|
|
57
|
+
* name: "dc-01",
|
|
61
58
|
* });
|
|
62
|
-
* const
|
|
63
|
-
* name: "
|
|
64
|
-
* datacenterId:
|
|
59
|
+
* const host = datacenter.then(datacenter => vsphere.getHost({
|
|
60
|
+
* name: "esxi-01.example.com",
|
|
61
|
+
* datacenterId: datacenter.id,
|
|
65
62
|
* }));
|
|
66
|
-
* const
|
|
67
|
-
*
|
|
63
|
+
* const hvs = new vsphere.HostVirtualSwitch("hvs", {
|
|
64
|
+
* name: "hvs-01",
|
|
65
|
+
* hostSystemId: host.then(host => host.id),
|
|
68
66
|
* networkAdapters: [
|
|
69
67
|
* "vmnic3",
|
|
70
68
|
* "vmnic4",
|
|
@@ -72,13 +70,14 @@ const utilities = require("./utilities");
|
|
|
72
70
|
* activeNics: ["vmnic3"],
|
|
73
71
|
* standbyNics: ["vmnic4"],
|
|
74
72
|
* });
|
|
75
|
-
* const
|
|
76
|
-
*
|
|
77
|
-
*
|
|
73
|
+
* const pg = new vsphere.HostPortGroup("pg", {
|
|
74
|
+
* name: "pg-01",
|
|
75
|
+
* virtualSwitchName: hvs.name,
|
|
76
|
+
* hostSystemId: host.then(host => host.id),
|
|
78
77
|
* });
|
|
79
|
-
* const
|
|
80
|
-
* host:
|
|
81
|
-
* portgroup:
|
|
78
|
+
* const vnic = new vsphere.Vnic("vnic", {
|
|
79
|
+
* host: host.then(host => host.id),
|
|
80
|
+
* portgroup: pg.name,
|
|
82
81
|
* ipv4: {
|
|
83
82
|
* dhcp: true,
|
|
84
83
|
* },
|
|
@@ -88,7 +87,6 @@ const utilities = require("./utilities");
|
|
|
88
87
|
* ],
|
|
89
88
|
* });
|
|
90
89
|
* ```
|
|
91
|
-
* <!--End PulumiCodeChooser -->
|
|
92
90
|
*
|
|
93
91
|
* ## Importing
|
|
94
92
|
*
|
|
@@ -97,12 +95,6 @@ const utilities = require("./utilities");
|
|
|
97
95
|
*
|
|
98
96
|
* [docs-import]: /docs/import/index.html
|
|
99
97
|
*
|
|
100
|
-
* <!--Start PulumiCodeChooser -->
|
|
101
|
-
* ```typescript
|
|
102
|
-
* import * as pulumi from "@pulumi/pulumi";
|
|
103
|
-
* ```
|
|
104
|
-
* <!--End PulumiCodeChooser -->
|
|
105
|
-
*
|
|
106
98
|
* The above would import the vnic `vmk2` from host with ID `host-123`.
|
|
107
99
|
*/
|
|
108
100
|
class Vnic extends pulumi.CustomResource {
|
package/vnic.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vnic.js","sourceRoot":"","sources":["../vnic.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC
|
|
1
|
+
{"version":3,"file":"vnic.js","sourceRoot":"","sources":["../vnic.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AACH,MAAa,IAAK,SAAQ,MAAM,CAAC,cAAc;IAC3C;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAiB,EAAE,IAAmC;QAC/G,OAAO,IAAI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AC,SAAS,CAAC;YACpD,cAAc,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;YACpD,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9D,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;YAChE,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,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACzD,CAAC;;AA9GL,oBA+GC;AAjGG,gBAAgB;AACO,iBAAY,GAAG,yBAAyB,CAAC"}
|
package/package.json.bak
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@pulumi/vsphere",
|
|
3
|
-
"version": "${VERSION}",
|
|
4
|
-
"description": "A Pulumi package for creating vsphere resources",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"pulumi",
|
|
7
|
-
"vsphere"
|
|
8
|
-
],
|
|
9
|
-
"homepage": "https://pulumi.io",
|
|
10
|
-
"repository": "https://github.com/pulumi/pulumi-vsphere",
|
|
11
|
-
"license": "Apache-2.0",
|
|
12
|
-
"scripts": {
|
|
13
|
-
"build": "tsc"
|
|
14
|
-
},
|
|
15
|
-
"dependencies": {
|
|
16
|
-
"@pulumi/pulumi": "^3.0.0",
|
|
17
|
-
"builtin-modules": "3.0.0",
|
|
18
|
-
"read-package-tree": "^5.2.1",
|
|
19
|
-
"resolve": "^1.8.1"
|
|
20
|
-
},
|
|
21
|
-
"devDependencies": {
|
|
22
|
-
"@types/node": "^10.9.2",
|
|
23
|
-
"typescript": "^4.3.5"
|
|
24
|
-
},
|
|
25
|
-
"pulumi": {
|
|
26
|
-
"resource": true,
|
|
27
|
-
"name": "vsphere"
|
|
28
|
-
}
|
|
29
|
-
}
|