@pulumi/openstack 5.4.1 → 5.4.2-alpha.1775837740

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 (100) hide show
  1. package/bgpvpn/networkAssociateV2.d.ts +0 -12
  2. package/bgpvpn/networkAssociateV2.js +0 -12
  3. package/bgpvpn/networkAssociateV2.js.map +1 -1
  4. package/bgpvpn/portAssociateV2.d.ts +0 -12
  5. package/bgpvpn/portAssociateV2.js +0 -12
  6. package/bgpvpn/portAssociateV2.js.map +1 -1
  7. package/bgpvpn/routerAssociateV2.d.ts +0 -12
  8. package/bgpvpn/routerAssociateV2.js +0 -12
  9. package/bgpvpn/routerAssociateV2.js.map +1 -1
  10. package/bgpvpn/v2.d.ts +0 -10
  11. package/bgpvpn/v2.js +0 -10
  12. package/bgpvpn/v2.js.map +1 -1
  13. package/bgpvpnNetworkAssociateV2.d.ts +0 -12
  14. package/bgpvpnNetworkAssociateV2.js +0 -12
  15. package/bgpvpnNetworkAssociateV2.js.map +1 -1
  16. package/bgpvpnPortAssociateV2.d.ts +0 -12
  17. package/bgpvpnPortAssociateV2.js +0 -12
  18. package/bgpvpnPortAssociateV2.js.map +1 -1
  19. package/bgpvpnRouterAssociateV2.d.ts +0 -12
  20. package/bgpvpnRouterAssociateV2.js +0 -12
  21. package/bgpvpnRouterAssociateV2.js.map +1 -1
  22. package/bgpvpnV2.d.ts +0 -10
  23. package/bgpvpnV2.js +0 -10
  24. package/bgpvpnV2.js.map +1 -1
  25. package/blockstorage/qosV3.d.ts +1 -1
  26. package/blockstorage/qosV3.js +1 -1
  27. package/blockstorage/volumeTypeV3.d.ts +1 -1
  28. package/blockstorage/volumeTypeV3.js +1 -1
  29. package/compute/aggregateV2.d.ts +2 -7
  30. package/compute/aggregateV2.js +2 -7
  31. package/compute/aggregateV2.js.map +1 -1
  32. package/compute/instance.d.ts +600 -0
  33. package/compute/instance.js +592 -0
  34. package/compute/instance.js.map +1 -1
  35. package/compute/keypair.d.ts +8 -0
  36. package/compute/keypair.js +8 -0
  37. package/compute/keypair.js.map +1 -1
  38. package/compute/volumeAttach.d.ts +24 -0
  39. package/compute/volumeAttach.js.map +1 -1
  40. package/database/configuration.d.ts +30 -0
  41. package/database/configuration.js +30 -0
  42. package/database/configuration.js.map +1 -1
  43. package/dns/recordSet.d.ts +0 -3
  44. package/dns/recordSet.js +0 -3
  45. package/dns/recordSet.js.map +1 -1
  46. package/dns/zone.d.ts +0 -3
  47. package/dns/zone.js +0 -3
  48. package/dns/zone.js.map +1 -1
  49. package/dns/zoneShareV2.d.ts +0 -5
  50. package/dns/zoneShareV2.js +0 -5
  51. package/dns/zoneShareV2.js.map +1 -1
  52. package/identity/getAuthScope.d.ts +96 -0
  53. package/identity/getAuthScope.js +96 -0
  54. package/identity/getAuthScope.js.map +1 -1
  55. package/images/image.d.ts +15 -0
  56. package/images/image.js.map +1 -1
  57. package/images/imageAccess.d.ts +2 -3
  58. package/images/imageAccess.js +2 -3
  59. package/images/imageAccess.js.map +1 -1
  60. package/images/imageAccessAccept.d.ts +2 -2
  61. package/images/imageAccessAccept.js +2 -2
  62. package/keymanager/getSecret.d.ts +16 -0
  63. package/keymanager/getSecret.js +16 -0
  64. package/keymanager/getSecret.js.map +1 -1
  65. package/keymanager/secretV1.d.ts +7 -0
  66. package/keymanager/secretV1.js +7 -0
  67. package/keymanager/secretV1.js.map +1 -1
  68. package/lbFlavorprofileV2.d.ts +0 -1
  69. package/lbFlavorprofileV2.js +0 -1
  70. package/lbFlavorprofileV2.js.map +1 -1
  71. package/loadbalancer/flavorprofileV2.d.ts +0 -1
  72. package/loadbalancer/flavorprofileV2.js +0 -1
  73. package/loadbalancer/flavorprofileV2.js.map +1 -1
  74. package/loadbalancer/monitor.d.ts +1 -0
  75. package/loadbalancer/monitor.js +1 -0
  76. package/loadbalancer/monitor.js.map +1 -1
  77. package/loadbalancer/quota.d.ts +1 -1
  78. package/loadbalancer/quota.js +1 -1
  79. package/networking/floatingIp.d.ts +37 -0
  80. package/networking/floatingIp.js +37 -0
  81. package/networking/floatingIp.js.map +1 -1
  82. package/networking/portSecGroupAssociate.d.ts +12 -0
  83. package/networking/portSecGroupAssociate.js +12 -0
  84. package/networking/portSecGroupAssociate.js.map +1 -1
  85. package/networking/routerInterface.d.ts +1 -2
  86. package/networking/routerInterface.js +1 -2
  87. package/networking/routerInterface.js.map +1 -1
  88. package/networking/routerRoute.d.ts +1 -1
  89. package/networking/routerRoute.js +1 -1
  90. package/networking/secGroup.d.ts +46 -0
  91. package/networking/secGroup.js +46 -0
  92. package/networking/secGroup.js.map +1 -1
  93. package/networking/subnetRoute.d.ts +1 -1
  94. package/networking/subnetRoute.js +1 -1
  95. package/objectstorage/container.d.ts +4 -4
  96. package/objectstorage/container.js +4 -4
  97. package/package.json +2 -2
  98. package/sharedfilesystem/shareAccess.d.ts +8 -0
  99. package/sharedfilesystem/shareAccess.js +8 -0
  100. package/sharedfilesystem/shareAccess.js.map +1 -1
@@ -1,6 +1,598 @@
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
+ * Manages a V2 VM instance resource within OpenStack.
6
+ *
7
+ * > **Note:** All arguments including the instance admin password will be stored
8
+ * in the raw state as plain-text. Read more about sensitive data in
9
+ * state.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ### Basic Instance
14
+ *
15
+ * ```typescript
16
+ * import * as pulumi from "@pulumi/pulumi";
17
+ * import * as openstack from "@pulumi/openstack";
18
+ *
19
+ * const basic = new openstack.compute.Instance("basic", {
20
+ * name: "basic",
21
+ * imageId: "ad091b52-742f-469e-8f3c-fd81cadf0743",
22
+ * flavorId: "3",
23
+ * keyPair: "my_key_pair_name",
24
+ * securityGroups: ["default"],
25
+ * metadata: {
26
+ * "this": "that",
27
+ * },
28
+ * networks: [{
29
+ * name: "my_network",
30
+ * }],
31
+ * });
32
+ * ```
33
+ *
34
+ * ### Instance With Attached Volume
35
+ *
36
+ * ```typescript
37
+ * import * as pulumi from "@pulumi/pulumi";
38
+ * import * as openstack from "@pulumi/openstack";
39
+ *
40
+ * const myvol = new openstack.blockstorage.Volume("myvol", {
41
+ * name: "myvol",
42
+ * size: 1,
43
+ * });
44
+ * const myinstance = new openstack.compute.Instance("myinstance", {
45
+ * name: "myinstance",
46
+ * imageId: "ad091b52-742f-469e-8f3c-fd81cadf0743",
47
+ * flavorId: "3",
48
+ * keyPair: "my_key_pair_name",
49
+ * securityGroups: ["default"],
50
+ * networks: [{
51
+ * name: "my_network",
52
+ * }],
53
+ * });
54
+ * const attached = new openstack.compute.VolumeAttach("attached", {
55
+ * instanceId: myinstance.id,
56
+ * volumeId: myvol.id,
57
+ * });
58
+ * ```
59
+ *
60
+ * ### Boot From Volume
61
+ *
62
+ * ```typescript
63
+ * import * as pulumi from "@pulumi/pulumi";
64
+ * import * as openstack from "@pulumi/openstack";
65
+ *
66
+ * const boot_from_volume = new openstack.compute.Instance("boot-from-volume", {
67
+ * name: "boot-from-volume",
68
+ * flavorId: "3",
69
+ * keyPair: "my_key_pair_name",
70
+ * securityGroups: ["default"],
71
+ * blockDevices: [{
72
+ * uuid: "<image-id>",
73
+ * sourceType: "image",
74
+ * volumeSize: 5,
75
+ * bootIndex: 0,
76
+ * destinationType: "volume",
77
+ * deleteOnTermination: true,
78
+ * }],
79
+ * networks: [{
80
+ * name: "my_network",
81
+ * }],
82
+ * });
83
+ * ```
84
+ *
85
+ * ### Boot From an Existing Volume
86
+ *
87
+ * ```typescript
88
+ * import * as pulumi from "@pulumi/pulumi";
89
+ * import * as openstack from "@pulumi/openstack";
90
+ *
91
+ * const myvol = new openstack.blockstorage.Volume("myvol", {
92
+ * name: "myvol",
93
+ * size: 5,
94
+ * imageId: "<image-id>",
95
+ * });
96
+ * const boot_from_volume = new openstack.compute.Instance("boot-from-volume", {
97
+ * name: "bootfromvolume",
98
+ * flavorId: "3",
99
+ * keyPair: "my_key_pair_name",
100
+ * securityGroups: ["default"],
101
+ * blockDevices: [{
102
+ * uuid: myvol.id,
103
+ * sourceType: "volume",
104
+ * bootIndex: 0,
105
+ * destinationType: "volume",
106
+ * deleteOnTermination: true,
107
+ * }],
108
+ * networks: [{
109
+ * name: "my_network",
110
+ * }],
111
+ * });
112
+ * ```
113
+ *
114
+ * ### Boot Instance, Create Volume, and Attach Volume as a Block Device
115
+ *
116
+ * ```typescript
117
+ * import * as pulumi from "@pulumi/pulumi";
118
+ * import * as openstack from "@pulumi/openstack";
119
+ *
120
+ * const instance1 = new openstack.compute.Instance("instance_1", {
121
+ * name: "instance_1",
122
+ * imageId: "<image-id>",
123
+ * flavorId: "3",
124
+ * keyPair: "my_key_pair_name",
125
+ * securityGroups: ["default"],
126
+ * blockDevices: [
127
+ * {
128
+ * uuid: "<image-id>",
129
+ * sourceType: "image",
130
+ * destinationType: "local",
131
+ * bootIndex: 0,
132
+ * deleteOnTermination: true,
133
+ * },
134
+ * {
135
+ * sourceType: "blank",
136
+ * destinationType: "volume",
137
+ * volumeSize: 1,
138
+ * bootIndex: 1,
139
+ * deleteOnTermination: true,
140
+ * },
141
+ * ],
142
+ * });
143
+ * ```
144
+ *
145
+ * ### Boot Instance and Attach Existing Volume as a Block Device
146
+ *
147
+ * ```typescript
148
+ * import * as pulumi from "@pulumi/pulumi";
149
+ * import * as openstack from "@pulumi/openstack";
150
+ *
151
+ * const volume1 = new openstack.blockstorage.Volume("volume_1", {
152
+ * name: "volume_1",
153
+ * size: 1,
154
+ * });
155
+ * const instance1 = new openstack.compute.Instance("instance_1", {
156
+ * name: "instance_1",
157
+ * imageId: "<image-id>",
158
+ * flavorId: "3",
159
+ * keyPair: "my_key_pair_name",
160
+ * securityGroups: ["default"],
161
+ * blockDevices: [
162
+ * {
163
+ * uuid: "<image-id>",
164
+ * sourceType: "image",
165
+ * destinationType: "local",
166
+ * bootIndex: 0,
167
+ * deleteOnTermination: true,
168
+ * },
169
+ * {
170
+ * uuid: volume1.id,
171
+ * sourceType: "volume",
172
+ * destinationType: "volume",
173
+ * bootIndex: 1,
174
+ * deleteOnTermination: true,
175
+ * },
176
+ * ],
177
+ * });
178
+ * ```
179
+ *
180
+ * ### Instance With Multiple Networks
181
+ *
182
+ * ```typescript
183
+ * import * as pulumi from "@pulumi/pulumi";
184
+ * import * as openstack from "@pulumi/openstack";
185
+ *
186
+ * const myip = new openstack.networking.FloatingIp("myip", {pool: "my_pool"});
187
+ * const multi_net = new openstack.compute.Instance("multi-net", {
188
+ * name: "multi-net",
189
+ * imageId: "ad091b52-742f-469e-8f3c-fd81cadf0743",
190
+ * flavorId: "3",
191
+ * keyPair: "my_key_pair_name",
192
+ * securityGroups: ["default"],
193
+ * networks: [
194
+ * {
195
+ * name: "my_first_network",
196
+ * },
197
+ * {
198
+ * name: "my_second_network",
199
+ * },
200
+ * ],
201
+ * });
202
+ * const vm_port = pulumi.all([multi_net.id, multi_net.networks]).apply(([id, networks]) => openstack.networking.getPortOutput({
203
+ * deviceId: id,
204
+ * networkId: networks[1].uuid,
205
+ * }));
206
+ * const fipVm = new openstack.networking.FloatingIpAssociate("fip_vm", {
207
+ * floatingIp: myip.address,
208
+ * portId: vm_port.apply(vm_port => vm_port.id),
209
+ * });
210
+ * ```
211
+ *
212
+ * ### Instance With Personality
213
+ *
214
+ * ```typescript
215
+ * import * as pulumi from "@pulumi/pulumi";
216
+ * import * as openstack from "@pulumi/openstack";
217
+ *
218
+ * const personality = new openstack.compute.Instance("personality", {
219
+ * name: "personality",
220
+ * imageId: "ad091b52-742f-469e-8f3c-fd81cadf0743",
221
+ * flavorId: "3",
222
+ * keyPair: "my_key_pair_name",
223
+ * securityGroups: ["default"],
224
+ * personalities: [{
225
+ * file: "/path/to/file/on/instance.txt",
226
+ * content: "contents of file",
227
+ * }],
228
+ * networks: [{
229
+ * name: "my_network",
230
+ * }],
231
+ * });
232
+ * ```
233
+ *
234
+ * ### Instance with Multiple Ephemeral Disks
235
+ *
236
+ * ```typescript
237
+ * import * as pulumi from "@pulumi/pulumi";
238
+ * import * as openstack from "@pulumi/openstack";
239
+ *
240
+ * const multi_eph = new openstack.compute.Instance("multi-eph", {
241
+ * name: "multi_eph",
242
+ * imageId: "ad091b52-742f-469e-8f3c-fd81cadf0743",
243
+ * flavorId: "3",
244
+ * keyPair: "my_key_pair_name",
245
+ * securityGroups: ["default"],
246
+ * blockDevices: [
247
+ * {
248
+ * bootIndex: 0,
249
+ * deleteOnTermination: true,
250
+ * destinationType: "local",
251
+ * sourceType: "image",
252
+ * uuid: "<image-id>",
253
+ * },
254
+ * {
255
+ * bootIndex: -1,
256
+ * deleteOnTermination: true,
257
+ * destinationType: "local",
258
+ * sourceType: "blank",
259
+ * volumeSize: 1,
260
+ * guestFormat: "ext4",
261
+ * },
262
+ * {
263
+ * bootIndex: -1,
264
+ * deleteOnTermination: true,
265
+ * destinationType: "local",
266
+ * sourceType: "blank",
267
+ * volumeSize: 1,
268
+ * },
269
+ * ],
270
+ * });
271
+ * ```
272
+ *
273
+ * ### Instance with Boot Disk and Swap Disk
274
+ *
275
+ * ```typescript
276
+ * import * as pulumi from "@pulumi/pulumi";
277
+ * import * as openstack from "@pulumi/openstack";
278
+ *
279
+ * const flavor_with_swap = new openstack.compute.Flavor("flavor-with-swap", {
280
+ * name: "flavor-with-swap",
281
+ * ram: 8096,
282
+ * vcpus: 2,
283
+ * disk: 20,
284
+ * swap: 4096,
285
+ * });
286
+ * const vm_swap = new openstack.compute.Instance("vm-swap", {
287
+ * name: "vm_swap",
288
+ * flavorId: flavor_with_swap.id,
289
+ * keyPair: "my_key_pair_name",
290
+ * securityGroups: ["default"],
291
+ * blockDevices: [
292
+ * {
293
+ * bootIndex: 0,
294
+ * deleteOnTermination: true,
295
+ * destinationType: "local",
296
+ * sourceType: "image",
297
+ * uuid: "<image-id>",
298
+ * },
299
+ * {
300
+ * bootIndex: -1,
301
+ * deleteOnTermination: true,
302
+ * destinationType: "local",
303
+ * sourceType: "blank",
304
+ * guestFormat: "swap",
305
+ * volumeSize: 4,
306
+ * },
307
+ * ],
308
+ * });
309
+ * ```
310
+ *
311
+ * ### Instance with User Data (cloud-init)
312
+ *
313
+ * ```typescript
314
+ * import * as pulumi from "@pulumi/pulumi";
315
+ * import * as openstack from "@pulumi/openstack";
316
+ *
317
+ * const instance1 = new openstack.compute.Instance("instance_1", {
318
+ * name: "basic",
319
+ * imageId: "ad091b52-742f-469e-8f3c-fd81cadf0743",
320
+ * flavorId: "3",
321
+ * keyPair: "my_key_pair_name",
322
+ * securityGroups: ["default"],
323
+ * userData: `#cloud-config
324
+ * hostname: instance_1.example.com
325
+ * fqdn: instance_1.example.com`,
326
+ * networks: [{
327
+ * name: "my_network",
328
+ * }],
329
+ * });
330
+ * ```
331
+ *
332
+ * `userData` can come from a variety of sources: inline, read in from the `file`
333
+ * function, or the `templateCloudinitConfig` resource.
334
+ *
335
+ * ## Notes
336
+ *
337
+ * ### Multiple Ephemeral Disks
338
+ *
339
+ * It's possible to specify multiple `blockDevice` entries to create an instance
340
+ * with multiple ephemeral (local) disks. In order to create multiple ephemeral
341
+ * disks, the sum of the total amount of ephemeral space must be less than or
342
+ * equal to what the chosen flavor supports.
343
+ *
344
+ * The following example shows how to create an instance with multiple ephemeral
345
+ * disks:
346
+ *
347
+ * ```typescript
348
+ * import * as pulumi from "@pulumi/pulumi";
349
+ * import * as openstack from "@pulumi/openstack";
350
+ *
351
+ * const foo = new openstack.compute.Instance("foo", {
352
+ * name: "terraform-test",
353
+ * securityGroups: ["default"],
354
+ * blockDevices: [
355
+ * {
356
+ * bootIndex: 0,
357
+ * deleteOnTermination: true,
358
+ * destinationType: "local",
359
+ * sourceType: "image",
360
+ * uuid: "<image uuid>",
361
+ * },
362
+ * {
363
+ * bootIndex: -1,
364
+ * deleteOnTermination: true,
365
+ * destinationType: "local",
366
+ * sourceType: "blank",
367
+ * volumeSize: 1,
368
+ * },
369
+ * {
370
+ * bootIndex: -1,
371
+ * deleteOnTermination: true,
372
+ * destinationType: "local",
373
+ * sourceType: "blank",
374
+ * volumeSize: 1,
375
+ * },
376
+ * ],
377
+ * });
378
+ * ```
379
+ *
380
+ * ### Instances and Security Groups
381
+ *
382
+ * When referencing a security group resource in an instance resource, always
383
+ * use the _name_ of the security group. If you specify the ID of the security
384
+ * group, Terraform will remove and reapply the security group upon each call.
385
+ * This is because the OpenStack Compute API returns the names of the associated
386
+ * security groups and not their IDs.
387
+ *
388
+ * Note the following example:
389
+ *
390
+ * ```typescript
391
+ * import * as pulumi from "@pulumi/pulumi";
392
+ * import * as openstack from "@pulumi/openstack";
393
+ *
394
+ * const sg1 = new openstack.networking.SecGroup("sg_1", {name: "sg_1"});
395
+ * const foo = new openstack.compute.Instance("foo", {
396
+ * name: "terraform-test",
397
+ * securityGroups: [sg1.name],
398
+ * });
399
+ * ```
400
+ *
401
+ * ### Instances and Ports
402
+ *
403
+ * Neutron Ports are a great feature and provide a lot of functionality. However,
404
+ * there are some notes to be aware of when mixing Instances and Ports:
405
+ *
406
+ * * In OpenStack environments prior to the Kilo release, deleting or recreating
407
+ * an Instance will cause the Instance's Port(s) to be deleted. One way of working
408
+ * around this is to taint any Port(s) used in Instances which are to be recreated.
409
+ * See [here](https://review.openstack.org/#/c/126309/) for further information.
410
+ *
411
+ * * When attaching an Instance to one or more networks using Ports, place the
412
+ * security groups on the Port and not the Instance. If you place the security
413
+ * groups on the Instance, the security groups will not be applied upon creation,
414
+ * but they will be applied upon a refresh. This is a known OpenStack bug.
415
+ *
416
+ * * Network IP information is not available within an instance for networks that
417
+ * are attached with Ports. This is mostly due to the flexibility Neutron Ports
418
+ * provide when it comes to IP addresses. For example, a Neutron Port can have
419
+ * multiple Fixed IP addresses associated with it. It's not possible to know which
420
+ * single IP address the user would want returned to the Instance's state
421
+ * information. Therefore, in order for a Provisioner to connect to an Instance
422
+ * via it's network Port, customize the `connection` information:
423
+ *
424
+ * ```typescript
425
+ * import * as pulumi from "@pulumi/pulumi";
426
+ * import * as openstack from "@pulumi/openstack";
427
+ *
428
+ * const port1 = new openstack.networking.Port("port_1", {
429
+ * name: "port_1",
430
+ * adminStateUp: true,
431
+ * networkId: "0a1d0a27-cffa-4de3-92c5-9d3fd3f2e74d",
432
+ * securityGroupIds: [
433
+ * "2f02d20a-8dca-49b7-b26f-b6ce9fddaf4f",
434
+ * "ca1e5ed7-dae8-4605-987b-fadaeeb30461",
435
+ * ],
436
+ * });
437
+ * const instance1 = new openstack.compute.Instance("instance_1", {
438
+ * name: "instance_1",
439
+ * networks: [{
440
+ * port: port1.id,
441
+ * }],
442
+ * });
443
+ * ```
444
+ *
445
+ * ### Instances and Networks
446
+ *
447
+ * Instances almost always require a network. Here are some notes to be aware of
448
+ * with how Instances and Networks relate:
449
+ *
450
+ * * In scenarios where you only have one network available, you can create an
451
+ * instance without specifying a `network` block. OpenStack will automatically
452
+ * launch the instance on this network.
453
+ *
454
+ * * If you have access to more than one network, you will need to specify a network
455
+ * with a `network` block. Not specifying a network will result in the following
456
+ * error:
457
+ *
458
+ * * If you intend to use the `openstack.compute.InterfaceAttach` resource,
459
+ * you still need to make sure one of the above points is satisfied. An instance
460
+ * cannot be created without a valid network configuration even if you intend to
461
+ * use `openstack.compute.InterfaceAttach` after the instance has been created.
462
+ *
463
+ * ## Importing instances
464
+ *
465
+ * Importing instances can be tricky, since the nova api does not offer all
466
+ * information provided at creation time for later retrieval.
467
+ * Network interface attachment order, and number and sizes of ephemeral
468
+ * disks are examples of this.
469
+ *
470
+ * ### Importing basic instance
471
+ * Assume you want to import an instance with one ephemeral root disk,
472
+ * and one network interface.
473
+ *
474
+ * Your configuration would look like the following:
475
+ *
476
+ * ```typescript
477
+ * import * as pulumi from "@pulumi/pulumi";
478
+ * import * as openstack from "@pulumi/openstack";
479
+ *
480
+ * const basicInstance = new openstack.compute.Instance("basic_instance", {
481
+ * name: "basic",
482
+ * flavorId: "<flavor_id>",
483
+ * keyPair: "<keyname>",
484
+ * securityGroups: ["default"],
485
+ * imageId: "<image_id>",
486
+ * networks: [{
487
+ * name: "<network_name>",
488
+ * }],
489
+ * });
490
+ * ```
491
+ * Then you execute
492
+ *
493
+ * ### Importing an instance with multiple emphemeral disks
494
+ *
495
+ * The importer cannot read the emphemeral disk configuration
496
+ * of an instance, so just specify imageId as in the configuration
497
+ * of the basic instance example.
498
+ *
499
+ * ### Importing instance with multiple network interfaces.
500
+ *
501
+ * Nova returns the network interfaces grouped by network, thus not in creation
502
+ * order.
503
+ * That means that if you have multiple network interfaces you must take
504
+ * care of the order of networks in your configuration.
505
+ *
506
+ * As example we want to import an instance with one ephemeral root disk,
507
+ * and 3 network interfaces.
508
+ *
509
+ * Examples
510
+ *
511
+ * ```typescript
512
+ * import * as pulumi from "@pulumi/pulumi";
513
+ * import * as openstack from "@pulumi/openstack";
514
+ *
515
+ * const boot_from_volume = new openstack.compute.Instance("boot-from-volume", {
516
+ * name: "boot-from-volume",
517
+ * flavorId: "<flavor_id",
518
+ * keyPair: "<keyname>",
519
+ * imageId: "<image_id>",
520
+ * securityGroups: ["default"],
521
+ * networks: [
522
+ * {
523
+ * name: "<network1>",
524
+ * },
525
+ * {
526
+ * name: "<network2>",
527
+ * },
528
+ * {
529
+ * name: "<network1>",
530
+ * fixedIpV4: "<fixed_ip_v4>",
531
+ * },
532
+ * ],
533
+ * });
534
+ * ```
535
+ *
536
+ * In the above configuration the networks are out of order compared to what nova
537
+ * and thus the import code returns, which means the plan will not
538
+ * be empty after import.
539
+ *
540
+ * So either with care check the plan and modify configuration, or read the
541
+ * network order in the state file after import and modify your
542
+ * configuration accordingly.
543
+ *
544
+ * * A note on ports. If you have created a neutron port independent of an
545
+ * instance, then the import code has no way to detect that the port is created
546
+ * idenpendently, and therefore on deletion of imported instances you might have
547
+ * port resources in your project, which you expected to be created by the
548
+ * instance and thus to also be deleted with the instance.
549
+ *
550
+ * ### Importing instances with multiple block storage volumes.
551
+ *
552
+ * We have an instance with two block storage volumes, one bootable and one
553
+ * non-bootable.
554
+ * Note that we only configure the bootable device as block_device.
555
+ * The other volumes can be specified as `openstack.blockstorage.Volume`
556
+ *
557
+ * ```typescript
558
+ * import * as pulumi from "@pulumi/pulumi";
559
+ * import * as openstack from "@pulumi/openstack";
560
+ *
561
+ * const instance2 = new openstack.compute.Instance("instance_2", {
562
+ * name: "instance_2",
563
+ * imageId: "<image_id>",
564
+ * flavorId: "<flavor_id>",
565
+ * keyPair: "<keyname>",
566
+ * securityGroups: ["default"],
567
+ * blockDevices: [{
568
+ * uuid: "<image_id>",
569
+ * sourceType: "image",
570
+ * destinationType: "volume",
571
+ * bootIndex: 0,
572
+ * deleteOnTermination: true,
573
+ * }],
574
+ * networks: [{
575
+ * name: "<network_name>",
576
+ * }],
577
+ * });
578
+ * const volume1 = new openstack.blockstorage.Volume("volume_1", {
579
+ * size: 1,
580
+ * name: "<vol_name>",
581
+ * });
582
+ * const va1 = new openstack.compute.VolumeAttach("va_1", {
583
+ * volumeId: volume1.id,
584
+ * instanceId: instance2.id,
585
+ * });
586
+ * ```
587
+ * To import the instance outlined in the above configuration
588
+ * do the following:
589
+ *
590
+ * * A note on block storage volumes, the importer does not read
591
+ * deleteOnTermination flag, and always assumes true. If you
592
+ * import an instance created with deleteOnTermination false,
593
+ * you end up with "orphaned" volumes after destruction of
594
+ * instances.
595
+ */
4
596
  export declare class Instance extends pulumi.CustomResource {
5
597
  /**
6
598
  * Get an existing Instance resource's state with the given name, ID, and optional extra
@@ -30,6 +622,10 @@ export declare class Instance extends pulumi.CustomResource {
30
622
  * Changing this changes the root password on the existing server.
31
623
  */
32
624
  readonly adminPass: pulumi.Output<string | undefined>;
625
+ /**
626
+ * Contains all instance metadata, even metadata not set
627
+ * by Terraform.
628
+ */
33
629
  readonly allMetadata: pulumi.Output<{
34
630
  [key: string]: string;
35
631
  }>;
@@ -224,6 +820,10 @@ export interface InstanceState {
224
820
  * Changing this changes the root password on the existing server.
225
821
  */
226
822
  adminPass?: pulumi.Input<string>;
823
+ /**
824
+ * Contains all instance metadata, even metadata not set
825
+ * by Terraform.
826
+ */
227
827
  allMetadata?: pulumi.Input<{
228
828
  [key: string]: pulumi.Input<string>;
229
829
  }>;