-
Notifications
You must be signed in to change notification settings - Fork 151
/
amiFromInstance.go
493 lines (433 loc) · 21.1 KB
/
amiFromInstance.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package ec2
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// The "AMI from instance" resource allows the creation of an Amazon Machine
// Image (AMI) modelled after an existing EBS-backed EC2 instance.
//
// The created AMI will refer to implicitly-created snapshots of the instance's
// EBS volumes and mimick its assigned block device configuration at the time
// the resource is created.
//
// This resource is best applied to an instance that is stopped when this instance
// is created, so that the contents of the created image are predictable. When
// applied to an instance that is running, *the instance will be stopped before taking
// the snapshots and then started back up again*, resulting in a period of
// downtime.
//
// Note that the source instance is inspected only at the initial creation of this
// resource. Ongoing updates to the referenced instance will not be propagated into
// the generated AMI. Users may taint or otherwise recreate the resource in order
// to produce a fresh snapshot.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := ec2.NewAmiFromInstance(ctx, "example", &ec2.AmiFromInstanceArgs{
// SourceInstanceId: pulumi.String("i-xxxxxxxx"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
type AmiFromInstance struct {
pulumi.CustomResourceState
// Machine architecture for created instances. Defaults to "x8664".
Architecture pulumi.StringOutput `pulumi:"architecture"`
// The ARN of the AMI.
Arn pulumi.StringOutput `pulumi:"arn"`
// A longer, human-readable description for the AMI.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Nested block describing an EBS block device that should be
// attached to created instances. The structure of this block is described below.
EbsBlockDevices AmiFromInstanceEbsBlockDeviceArrayOutput `pulumi:"ebsBlockDevices"`
// Specifies whether enhanced networking with ENA is enabled. Defaults to `false`.
EnaSupport pulumi.BoolOutput `pulumi:"enaSupport"`
// Nested block describing an ephemeral block device that
// should be attached to created instances. The structure of this block is described below.
EphemeralBlockDevices AmiFromInstanceEphemeralBlockDeviceArrayOutput `pulumi:"ephemeralBlockDevices"`
Hypervisor pulumi.StringOutput `pulumi:"hypervisor"`
// Path to an S3 object containing an image manifest, e.g. created
// by the `ec2-upload-bundle` command in the EC2 command line tools.
ImageLocation pulumi.StringOutput `pulumi:"imageLocation"`
ImageOwnerAlias pulumi.StringOutput `pulumi:"imageOwnerAlias"`
ImageType pulumi.StringOutput `pulumi:"imageType"`
// The id of the kernel image (AKI) that will be used as the paravirtual
// kernel in created instances.
KernelId pulumi.StringOutput `pulumi:"kernelId"`
ManageEbsSnapshots pulumi.BoolOutput `pulumi:"manageEbsSnapshots"`
// A region-unique name for the AMI.
Name pulumi.StringOutput `pulumi:"name"`
OwnerId pulumi.StringOutput `pulumi:"ownerId"`
Platform pulumi.StringOutput `pulumi:"platform"`
PlatformDetails pulumi.StringOutput `pulumi:"platformDetails"`
Public pulumi.BoolOutput `pulumi:"public"`
// The id of an initrd image (ARI) that will be used when booting the
// created instances.
RamdiskId pulumi.StringOutput `pulumi:"ramdiskId"`
// The name of the root device (for example, `/dev/sda1`, or `/dev/xvda`).
RootDeviceName pulumi.StringOutput `pulumi:"rootDeviceName"`
RootSnapshotId pulumi.StringOutput `pulumi:"rootSnapshotId"`
// Boolean that overrides the behavior of stopping
// the instance before snapshotting. This is risky since it may cause a snapshot of an
// inconsistent filesystem state, but can be used to avoid downtime if the user otherwise
// guarantees that no filesystem writes will be underway at the time of snapshot.
SnapshotWithoutReboot pulumi.BoolPtrOutput `pulumi:"snapshotWithoutReboot"`
// The id of the instance to use as the basis of the AMI.
SourceInstanceId pulumi.StringOutput `pulumi:"sourceInstanceId"`
// When set to "simple" (the default), enables enhanced networking
// for created instances. No other value is supported at this time.
SriovNetSupport pulumi.StringOutput `pulumi:"sriovNetSupport"`
// A map of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
UsageOperation pulumi.StringOutput `pulumi:"usageOperation"`
// Keyword to choose what virtualization mode created instances
// will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type
// changes the set of further arguments that are required, as described below.
VirtualizationType pulumi.StringOutput `pulumi:"virtualizationType"`
}
// NewAmiFromInstance registers a new resource with the given unique name, arguments, and options.
func NewAmiFromInstance(ctx *pulumi.Context,
name string, args *AmiFromInstanceArgs, opts ...pulumi.ResourceOption) (*AmiFromInstance, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.SourceInstanceId == nil {
return nil, errors.New("invalid value for required argument 'SourceInstanceId'")
}
var resource AmiFromInstance
err := ctx.RegisterResource("aws:ec2/amiFromInstance:AmiFromInstance", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAmiFromInstance gets an existing AmiFromInstance resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAmiFromInstance(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AmiFromInstanceState, opts ...pulumi.ResourceOption) (*AmiFromInstance, error) {
var resource AmiFromInstance
err := ctx.ReadResource("aws:ec2/amiFromInstance:AmiFromInstance", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AmiFromInstance resources.
type amiFromInstanceState struct {
// Machine architecture for created instances. Defaults to "x8664".
Architecture *string `pulumi:"architecture"`
// The ARN of the AMI.
Arn *string `pulumi:"arn"`
// A longer, human-readable description for the AMI.
Description *string `pulumi:"description"`
// Nested block describing an EBS block device that should be
// attached to created instances. The structure of this block is described below.
EbsBlockDevices []AmiFromInstanceEbsBlockDevice `pulumi:"ebsBlockDevices"`
// Specifies whether enhanced networking with ENA is enabled. Defaults to `false`.
EnaSupport *bool `pulumi:"enaSupport"`
// Nested block describing an ephemeral block device that
// should be attached to created instances. The structure of this block is described below.
EphemeralBlockDevices []AmiFromInstanceEphemeralBlockDevice `pulumi:"ephemeralBlockDevices"`
Hypervisor *string `pulumi:"hypervisor"`
// Path to an S3 object containing an image manifest, e.g. created
// by the `ec2-upload-bundle` command in the EC2 command line tools.
ImageLocation *string `pulumi:"imageLocation"`
ImageOwnerAlias *string `pulumi:"imageOwnerAlias"`
ImageType *string `pulumi:"imageType"`
// The id of the kernel image (AKI) that will be used as the paravirtual
// kernel in created instances.
KernelId *string `pulumi:"kernelId"`
ManageEbsSnapshots *bool `pulumi:"manageEbsSnapshots"`
// A region-unique name for the AMI.
Name *string `pulumi:"name"`
OwnerId *string `pulumi:"ownerId"`
Platform *string `pulumi:"platform"`
PlatformDetails *string `pulumi:"platformDetails"`
Public *bool `pulumi:"public"`
// The id of an initrd image (ARI) that will be used when booting the
// created instances.
RamdiskId *string `pulumi:"ramdiskId"`
// The name of the root device (for example, `/dev/sda1`, or `/dev/xvda`).
RootDeviceName *string `pulumi:"rootDeviceName"`
RootSnapshotId *string `pulumi:"rootSnapshotId"`
// Boolean that overrides the behavior of stopping
// the instance before snapshotting. This is risky since it may cause a snapshot of an
// inconsistent filesystem state, but can be used to avoid downtime if the user otherwise
// guarantees that no filesystem writes will be underway at the time of snapshot.
SnapshotWithoutReboot *bool `pulumi:"snapshotWithoutReboot"`
// The id of the instance to use as the basis of the AMI.
SourceInstanceId *string `pulumi:"sourceInstanceId"`
// When set to "simple" (the default), enables enhanced networking
// for created instances. No other value is supported at this time.
SriovNetSupport *string `pulumi:"sriovNetSupport"`
// A map of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
UsageOperation *string `pulumi:"usageOperation"`
// Keyword to choose what virtualization mode created instances
// will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type
// changes the set of further arguments that are required, as described below.
VirtualizationType *string `pulumi:"virtualizationType"`
}
type AmiFromInstanceState struct {
// Machine architecture for created instances. Defaults to "x8664".
Architecture pulumi.StringPtrInput
// The ARN of the AMI.
Arn pulumi.StringPtrInput
// A longer, human-readable description for the AMI.
Description pulumi.StringPtrInput
// Nested block describing an EBS block device that should be
// attached to created instances. The structure of this block is described below.
EbsBlockDevices AmiFromInstanceEbsBlockDeviceArrayInput
// Specifies whether enhanced networking with ENA is enabled. Defaults to `false`.
EnaSupport pulumi.BoolPtrInput
// Nested block describing an ephemeral block device that
// should be attached to created instances. The structure of this block is described below.
EphemeralBlockDevices AmiFromInstanceEphemeralBlockDeviceArrayInput
Hypervisor pulumi.StringPtrInput
// Path to an S3 object containing an image manifest, e.g. created
// by the `ec2-upload-bundle` command in the EC2 command line tools.
ImageLocation pulumi.StringPtrInput
ImageOwnerAlias pulumi.StringPtrInput
ImageType pulumi.StringPtrInput
// The id of the kernel image (AKI) that will be used as the paravirtual
// kernel in created instances.
KernelId pulumi.StringPtrInput
ManageEbsSnapshots pulumi.BoolPtrInput
// A region-unique name for the AMI.
Name pulumi.StringPtrInput
OwnerId pulumi.StringPtrInput
Platform pulumi.StringPtrInput
PlatformDetails pulumi.StringPtrInput
Public pulumi.BoolPtrInput
// The id of an initrd image (ARI) that will be used when booting the
// created instances.
RamdiskId pulumi.StringPtrInput
// The name of the root device (for example, `/dev/sda1`, or `/dev/xvda`).
RootDeviceName pulumi.StringPtrInput
RootSnapshotId pulumi.StringPtrInput
// Boolean that overrides the behavior of stopping
// the instance before snapshotting. This is risky since it may cause a snapshot of an
// inconsistent filesystem state, but can be used to avoid downtime if the user otherwise
// guarantees that no filesystem writes will be underway at the time of snapshot.
SnapshotWithoutReboot pulumi.BoolPtrInput
// The id of the instance to use as the basis of the AMI.
SourceInstanceId pulumi.StringPtrInput
// When set to "simple" (the default), enables enhanced networking
// for created instances. No other value is supported at this time.
SriovNetSupport pulumi.StringPtrInput
// A map of tags to assign to the resource.
Tags pulumi.StringMapInput
UsageOperation pulumi.StringPtrInput
// Keyword to choose what virtualization mode created instances
// will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type
// changes the set of further arguments that are required, as described below.
VirtualizationType pulumi.StringPtrInput
}
func (AmiFromInstanceState) ElementType() reflect.Type {
return reflect.TypeOf((*amiFromInstanceState)(nil)).Elem()
}
type amiFromInstanceArgs struct {
// A longer, human-readable description for the AMI.
Description *string `pulumi:"description"`
// Nested block describing an EBS block device that should be
// attached to created instances. The structure of this block is described below.
EbsBlockDevices []AmiFromInstanceEbsBlockDevice `pulumi:"ebsBlockDevices"`
// Nested block describing an ephemeral block device that
// should be attached to created instances. The structure of this block is described below.
EphemeralBlockDevices []AmiFromInstanceEphemeralBlockDevice `pulumi:"ephemeralBlockDevices"`
// A region-unique name for the AMI.
Name *string `pulumi:"name"`
// Boolean that overrides the behavior of stopping
// the instance before snapshotting. This is risky since it may cause a snapshot of an
// inconsistent filesystem state, but can be used to avoid downtime if the user otherwise
// guarantees that no filesystem writes will be underway at the time of snapshot.
SnapshotWithoutReboot *bool `pulumi:"snapshotWithoutReboot"`
// The id of the instance to use as the basis of the AMI.
SourceInstanceId string `pulumi:"sourceInstanceId"`
// A map of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a AmiFromInstance resource.
type AmiFromInstanceArgs struct {
// A longer, human-readable description for the AMI.
Description pulumi.StringPtrInput
// Nested block describing an EBS block device that should be
// attached to created instances. The structure of this block is described below.
EbsBlockDevices AmiFromInstanceEbsBlockDeviceArrayInput
// Nested block describing an ephemeral block device that
// should be attached to created instances. The structure of this block is described below.
EphemeralBlockDevices AmiFromInstanceEphemeralBlockDeviceArrayInput
// A region-unique name for the AMI.
Name pulumi.StringPtrInput
// Boolean that overrides the behavior of stopping
// the instance before snapshotting. This is risky since it may cause a snapshot of an
// inconsistent filesystem state, but can be used to avoid downtime if the user otherwise
// guarantees that no filesystem writes will be underway at the time of snapshot.
SnapshotWithoutReboot pulumi.BoolPtrInput
// The id of the instance to use as the basis of the AMI.
SourceInstanceId pulumi.StringInput
// A map of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (AmiFromInstanceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*amiFromInstanceArgs)(nil)).Elem()
}
type AmiFromInstanceInput interface {
pulumi.Input
ToAmiFromInstanceOutput() AmiFromInstanceOutput
ToAmiFromInstanceOutputWithContext(ctx context.Context) AmiFromInstanceOutput
}
func (*AmiFromInstance) ElementType() reflect.Type {
return reflect.TypeOf((*AmiFromInstance)(nil))
}
func (i *AmiFromInstance) ToAmiFromInstanceOutput() AmiFromInstanceOutput {
return i.ToAmiFromInstanceOutputWithContext(context.Background())
}
func (i *AmiFromInstance) ToAmiFromInstanceOutputWithContext(ctx context.Context) AmiFromInstanceOutput {
return pulumi.ToOutputWithContext(ctx, i).(AmiFromInstanceOutput)
}
func (i *AmiFromInstance) ToAmiFromInstancePtrOutput() AmiFromInstancePtrOutput {
return i.ToAmiFromInstancePtrOutputWithContext(context.Background())
}
func (i *AmiFromInstance) ToAmiFromInstancePtrOutputWithContext(ctx context.Context) AmiFromInstancePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AmiFromInstancePtrOutput)
}
type AmiFromInstancePtrInput interface {
pulumi.Input
ToAmiFromInstancePtrOutput() AmiFromInstancePtrOutput
ToAmiFromInstancePtrOutputWithContext(ctx context.Context) AmiFromInstancePtrOutput
}
type amiFromInstancePtrType AmiFromInstanceArgs
func (*amiFromInstancePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AmiFromInstance)(nil))
}
func (i *amiFromInstancePtrType) ToAmiFromInstancePtrOutput() AmiFromInstancePtrOutput {
return i.ToAmiFromInstancePtrOutputWithContext(context.Background())
}
func (i *amiFromInstancePtrType) ToAmiFromInstancePtrOutputWithContext(ctx context.Context) AmiFromInstancePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AmiFromInstancePtrOutput)
}
// AmiFromInstanceArrayInput is an input type that accepts AmiFromInstanceArray and AmiFromInstanceArrayOutput values.
// You can construct a concrete instance of `AmiFromInstanceArrayInput` via:
//
// AmiFromInstanceArray{ AmiFromInstanceArgs{...} }
type AmiFromInstanceArrayInput interface {
pulumi.Input
ToAmiFromInstanceArrayOutput() AmiFromInstanceArrayOutput
ToAmiFromInstanceArrayOutputWithContext(context.Context) AmiFromInstanceArrayOutput
}
type AmiFromInstanceArray []AmiFromInstanceInput
func (AmiFromInstanceArray) ElementType() reflect.Type {
return reflect.TypeOf(([]*AmiFromInstance)(nil))
}
func (i AmiFromInstanceArray) ToAmiFromInstanceArrayOutput() AmiFromInstanceArrayOutput {
return i.ToAmiFromInstanceArrayOutputWithContext(context.Background())
}
func (i AmiFromInstanceArray) ToAmiFromInstanceArrayOutputWithContext(ctx context.Context) AmiFromInstanceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AmiFromInstanceArrayOutput)
}
// AmiFromInstanceMapInput is an input type that accepts AmiFromInstanceMap and AmiFromInstanceMapOutput values.
// You can construct a concrete instance of `AmiFromInstanceMapInput` via:
//
// AmiFromInstanceMap{ "key": AmiFromInstanceArgs{...} }
type AmiFromInstanceMapInput interface {
pulumi.Input
ToAmiFromInstanceMapOutput() AmiFromInstanceMapOutput
ToAmiFromInstanceMapOutputWithContext(context.Context) AmiFromInstanceMapOutput
}
type AmiFromInstanceMap map[string]AmiFromInstanceInput
func (AmiFromInstanceMap) ElementType() reflect.Type {
return reflect.TypeOf((map[string]*AmiFromInstance)(nil))
}
func (i AmiFromInstanceMap) ToAmiFromInstanceMapOutput() AmiFromInstanceMapOutput {
return i.ToAmiFromInstanceMapOutputWithContext(context.Background())
}
func (i AmiFromInstanceMap) ToAmiFromInstanceMapOutputWithContext(ctx context.Context) AmiFromInstanceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AmiFromInstanceMapOutput)
}
type AmiFromInstanceOutput struct {
*pulumi.OutputState
}
func (AmiFromInstanceOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AmiFromInstance)(nil))
}
func (o AmiFromInstanceOutput) ToAmiFromInstanceOutput() AmiFromInstanceOutput {
return o
}
func (o AmiFromInstanceOutput) ToAmiFromInstanceOutputWithContext(ctx context.Context) AmiFromInstanceOutput {
return o
}
func (o AmiFromInstanceOutput) ToAmiFromInstancePtrOutput() AmiFromInstancePtrOutput {
return o.ToAmiFromInstancePtrOutputWithContext(context.Background())
}
func (o AmiFromInstanceOutput) ToAmiFromInstancePtrOutputWithContext(ctx context.Context) AmiFromInstancePtrOutput {
return o.ApplyT(func(v AmiFromInstance) *AmiFromInstance {
return &v
}).(AmiFromInstancePtrOutput)
}
type AmiFromInstancePtrOutput struct {
*pulumi.OutputState
}
func (AmiFromInstancePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AmiFromInstance)(nil))
}
func (o AmiFromInstancePtrOutput) ToAmiFromInstancePtrOutput() AmiFromInstancePtrOutput {
return o
}
func (o AmiFromInstancePtrOutput) ToAmiFromInstancePtrOutputWithContext(ctx context.Context) AmiFromInstancePtrOutput {
return o
}
type AmiFromInstanceArrayOutput struct{ *pulumi.OutputState }
func (AmiFromInstanceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]AmiFromInstance)(nil))
}
func (o AmiFromInstanceArrayOutput) ToAmiFromInstanceArrayOutput() AmiFromInstanceArrayOutput {
return o
}
func (o AmiFromInstanceArrayOutput) ToAmiFromInstanceArrayOutputWithContext(ctx context.Context) AmiFromInstanceArrayOutput {
return o
}
func (o AmiFromInstanceArrayOutput) Index(i pulumi.IntInput) AmiFromInstanceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) AmiFromInstance {
return vs[0].([]AmiFromInstance)[vs[1].(int)]
}).(AmiFromInstanceOutput)
}
type AmiFromInstanceMapOutput struct{ *pulumi.OutputState }
func (AmiFromInstanceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]AmiFromInstance)(nil))
}
func (o AmiFromInstanceMapOutput) ToAmiFromInstanceMapOutput() AmiFromInstanceMapOutput {
return o
}
func (o AmiFromInstanceMapOutput) ToAmiFromInstanceMapOutputWithContext(ctx context.Context) AmiFromInstanceMapOutput {
return o
}
func (o AmiFromInstanceMapOutput) MapIndex(k pulumi.StringInput) AmiFromInstanceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) AmiFromInstance {
return vs[0].(map[string]AmiFromInstance)[vs[1].(string)]
}).(AmiFromInstanceOutput)
}
func init() {
pulumi.RegisterOutputType(AmiFromInstanceOutput{})
pulumi.RegisterOutputType(AmiFromInstancePtrOutput{})
pulumi.RegisterOutputType(AmiFromInstanceArrayOutput{})
pulumi.RegisterOutputType(AmiFromInstanceMapOutput{})
}