/
instance.go
920 lines (829 loc) · 42.9 KB
/
instance.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
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package opsworks
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides an OpsWorks instance resource.
//
// ## Example Usage
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opsworks"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := opsworks.NewInstance(ctx, "my-instance", &opsworks.InstanceArgs{
// StackId: pulumi.Any(main.Id),
// LayerIds: pulumi.StringArray{
// my_layer.Id,
// },
// InstanceType: pulumi.String("t2.micro"),
// Os: pulumi.String("Amazon Linux 2015.09"),
// State: pulumi.String("stopped"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
//
// ## Block devices
//
// Each of the `*_block_device` attributes controls a portion of the AWS
// Instance's "Block Device Mapping". It's a good idea to familiarize yourself with [AWS's Block Device
// Mapping docs](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html)
// to understand the implications of using these attributes.
//
// ### `ebsBlockDevice`
//
// * `deleteOnTermination` - (Optional) Whether the volume should be destroyed on instance termination. Default is `true`.
// * `deviceName` - (Required) Name of the device to mount.
// * `iops` - (Optional) Amount of provisioned [IOPS](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-io-characteristics.html). This must be set with a `volumeType` of `io1`.
// * `snapshotId` - (Optional) Snapshot ID to mount.
// * `volumeSize` - (Optional) Size of the volume in gigabytes.
// * `volumeType` - (Optional) Type of volume. Valid values are `standard`, `gp2`, or `io1`. Default is `standard`.
//
// Modifying any `ebsBlockDevice` currently requires resource replacement.
//
// ### `ephemeralBlockDevice`
//
// * `deviceName` - Name of the block device to mount on the instance.
// * `virtualName` - The [Instance Store Device Name](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html#InstanceStoreDeviceNames) (e.g., `ephemeral0`).
//
// Each AWS Instance type has a different set of Instance Store block devices
// available for attachment. AWS [publishes a
// list](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html#StorageOnInstanceTypes)
// of which ephemeral devices are available on each type. The devices are always
// identified by the `virtualName` in the format `ephemeral{0..N}`.
//
// ### `rootBlockDevice`
//
// * `deleteOnTermination` - (Optional) Whether the volume should be destroyed on instance termination. Default is `true`.
// * `iops` - (Optional) Amount of provisioned [IOPS](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-io-characteristics.html). This must be set with a `volumeType` of `io1`.
// * `volumeSize` - (Optional) Size of the volume in gigabytes.
// * `volumeType` - (Optional) Type of volume. Valid values are `standard`, `gp2`, or `io1`. Default is `standard`.
//
// Modifying any of the `rootBlockDevice` settings requires resource
// replacement.
//
// > **NOTE:** Currently, changes to `*_block_device` configuration of _existing_
// resources cannot be automatically detected by this provider. After making updates
// to block device configuration, resource recreation can be manually triggered by
// using the [`up` command with the --replace argument](https://www.pulumi.com/docs/reference/cli/pulumi_up/).
//
// ## Import
//
// Using `pulumi import`, import Opsworks Instances using the instance `id`. For example:
//
// ```sh
// $ pulumi import aws:opsworks/instance:Instance my_instance 4d6d1710-ded9-42a1-b08e-b043ad7af1e2
// ```
type Instance struct {
pulumi.CustomResourceState
// OpsWorks agent to install. Default is `INHERIT`.
AgentVersion pulumi.StringPtrOutput `pulumi:"agentVersion"`
// AMI to use for the instance. If an AMI is specified, `os` must be `Custom`.
AmiId pulumi.StringOutput `pulumi:"amiId"`
// Machine architecture for created instances. Valid values are `x8664` or `i386`. The default is `x8664`.
Architecture pulumi.StringPtrOutput `pulumi:"architecture"`
// Creates load-based or time-based instances. Valid values are `load`, `timer`.
AutoScalingType pulumi.StringPtrOutput `pulumi:"autoScalingType"`
// Name of the availability zone where instances will be created by default.
AvailabilityZone pulumi.StringOutput `pulumi:"availabilityZone"`
// Time that the instance was created.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// Whether to delete EBS volume on deletion. Default is `true`.
DeleteEbs pulumi.BoolPtrOutput `pulumi:"deleteEbs"`
// Whether to delete the Elastic IP on deletion.
DeleteEip pulumi.BoolPtrOutput `pulumi:"deleteEip"`
// Configuration block for additional EBS block devices to attach to the instance. See Block Devices below.
EbsBlockDevices InstanceEbsBlockDeviceArrayOutput `pulumi:"ebsBlockDevices"`
// Whether the launched EC2 instance will be EBS-optimized.
EbsOptimized pulumi.BoolPtrOutput `pulumi:"ebsOptimized"`
// EC2 instance ID.
Ec2InstanceId pulumi.StringOutput `pulumi:"ec2InstanceId"`
// ECS cluster's ARN for container instances.
EcsClusterArn pulumi.StringOutput `pulumi:"ecsClusterArn"`
// Instance Elastic IP address.
ElasticIp pulumi.StringOutput `pulumi:"elasticIp"`
// Configuration block for ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below.
EphemeralBlockDevices InstanceEphemeralBlockDeviceArrayOutput `pulumi:"ephemeralBlockDevices"`
// Instance's host name.
Hostname pulumi.StringOutput `pulumi:"hostname"`
// For registered instances, infrastructure class: ec2 or on-premises.
InfrastructureClass pulumi.StringOutput `pulumi:"infrastructureClass"`
// Controls where to install OS and package updates when the instance boots. Default is `true`.
InstallUpdatesOnBoot pulumi.BoolPtrOutput `pulumi:"installUpdatesOnBoot"`
// ARN of the instance's IAM profile.
InstanceProfileArn pulumi.StringOutput `pulumi:"instanceProfileArn"`
// Type of instance to start.
InstanceType pulumi.StringPtrOutput `pulumi:"instanceType"`
// ID of the last service error.
LastServiceErrorId pulumi.StringOutput `pulumi:"lastServiceErrorId"`
// List of the layers the instance will belong to.
LayerIds pulumi.StringArrayOutput `pulumi:"layerIds"`
// Name of operating system that will be installed.
Os pulumi.StringOutput `pulumi:"os"`
// Instance's platform.
Platform pulumi.StringOutput `pulumi:"platform"`
// Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
PrivateDns pulumi.StringOutput `pulumi:"privateDns"`
// Private IP address assigned to the instance.
PrivateIp pulumi.StringOutput `pulumi:"privateIp"`
// Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
PublicDns pulumi.StringOutput `pulumi:"publicDns"`
// Public IP address assigned to the instance, if applicable.
PublicIp pulumi.StringOutput `pulumi:"publicIp"`
// For registered instances, who performed the registration.
RegisteredBy pulumi.StringOutput `pulumi:"registeredBy"`
// Instance's reported AWS OpsWorks Stacks agent version.
ReportedAgentVersion pulumi.StringOutput `pulumi:"reportedAgentVersion"`
// For registered instances, the reported operating system family.
ReportedOsFamily pulumi.StringOutput `pulumi:"reportedOsFamily"`
// For registered instances, the reported operating system name.
ReportedOsName pulumi.StringOutput `pulumi:"reportedOsName"`
// For registered instances, the reported operating system version.
ReportedOsVersion pulumi.StringOutput `pulumi:"reportedOsVersion"`
// Configuration block for the root block device of the instance. See Block Devices below.
RootBlockDevices InstanceRootBlockDeviceArrayOutput `pulumi:"rootBlockDevices"`
// Name of the type of root device instances will have by default. Valid values are `ebs` or `instance-store`.
RootDeviceType pulumi.StringOutput `pulumi:"rootDeviceType"`
// Root device volume ID.
RootDeviceVolumeId pulumi.StringOutput `pulumi:"rootDeviceVolumeId"`
// Associated security groups.
SecurityGroupIds pulumi.StringArrayOutput `pulumi:"securityGroupIds"`
// SSH key's Deep Security Agent (DSA) fingerprint.
SshHostDsaKeyFingerprint pulumi.StringOutput `pulumi:"sshHostDsaKeyFingerprint"`
// SSH key's RSA fingerprint.
SshHostRsaKeyFingerprint pulumi.StringOutput `pulumi:"sshHostRsaKeyFingerprint"`
// Name of the SSH keypair that instances will have by default.
SshKeyName pulumi.StringOutput `pulumi:"sshKeyName"`
// Identifier of the stack the instance will belong to.
//
// The following arguments are optional:
StackId pulumi.StringOutput `pulumi:"stackId"`
// Desired state of the instance. Valid values are `running` or `stopped`.
State pulumi.StringPtrOutput `pulumi:"state"`
// Instance status. Will be one of `booting`, `connectionLost`, `online`, `pending`, `rebooting`, `requested`, `runningSetup`, `setupFailed`, `shuttingDown`, `startFailed`, `stopFailed`, `stopped`, `stopping`, `terminated`, or `terminating`.
Status pulumi.StringOutput `pulumi:"status"`
// Subnet ID to attach to.
SubnetId pulumi.StringOutput `pulumi:"subnetId"`
// Instance tenancy to use. Valid values are `default`, `dedicated` or `host`.
Tenancy pulumi.StringOutput `pulumi:"tenancy"`
// Keyword to choose what virtualization mode created instances will use. Valid values are `paravirtual` or `hvm`.
VirtualizationType pulumi.StringOutput `pulumi:"virtualizationType"`
}
// NewInstance registers a new resource with the given unique name, arguments, and options.
func NewInstance(ctx *pulumi.Context,
name string, args *InstanceArgs, opts ...pulumi.ResourceOption) (*Instance, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.LayerIds == nil {
return nil, errors.New("invalid value for required argument 'LayerIds'")
}
if args.StackId == nil {
return nil, errors.New("invalid value for required argument 'StackId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Instance
err := ctx.RegisterResource("aws:opsworks/instance:Instance", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetInstance gets an existing Instance 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 GetInstance(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *InstanceState, opts ...pulumi.ResourceOption) (*Instance, error) {
var resource Instance
err := ctx.ReadResource("aws:opsworks/instance:Instance", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Instance resources.
type instanceState struct {
// OpsWorks agent to install. Default is `INHERIT`.
AgentVersion *string `pulumi:"agentVersion"`
// AMI to use for the instance. If an AMI is specified, `os` must be `Custom`.
AmiId *string `pulumi:"amiId"`
// Machine architecture for created instances. Valid values are `x8664` or `i386`. The default is `x8664`.
Architecture *string `pulumi:"architecture"`
// Creates load-based or time-based instances. Valid values are `load`, `timer`.
AutoScalingType *string `pulumi:"autoScalingType"`
// Name of the availability zone where instances will be created by default.
AvailabilityZone *string `pulumi:"availabilityZone"`
// Time that the instance was created.
CreatedAt *string `pulumi:"createdAt"`
// Whether to delete EBS volume on deletion. Default is `true`.
DeleteEbs *bool `pulumi:"deleteEbs"`
// Whether to delete the Elastic IP on deletion.
DeleteEip *bool `pulumi:"deleteEip"`
// Configuration block for additional EBS block devices to attach to the instance. See Block Devices below.
EbsBlockDevices []InstanceEbsBlockDevice `pulumi:"ebsBlockDevices"`
// Whether the launched EC2 instance will be EBS-optimized.
EbsOptimized *bool `pulumi:"ebsOptimized"`
// EC2 instance ID.
Ec2InstanceId *string `pulumi:"ec2InstanceId"`
// ECS cluster's ARN for container instances.
EcsClusterArn *string `pulumi:"ecsClusterArn"`
// Instance Elastic IP address.
ElasticIp *string `pulumi:"elasticIp"`
// Configuration block for ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below.
EphemeralBlockDevices []InstanceEphemeralBlockDevice `pulumi:"ephemeralBlockDevices"`
// Instance's host name.
Hostname *string `pulumi:"hostname"`
// For registered instances, infrastructure class: ec2 or on-premises.
InfrastructureClass *string `pulumi:"infrastructureClass"`
// Controls where to install OS and package updates when the instance boots. Default is `true`.
InstallUpdatesOnBoot *bool `pulumi:"installUpdatesOnBoot"`
// ARN of the instance's IAM profile.
InstanceProfileArn *string `pulumi:"instanceProfileArn"`
// Type of instance to start.
InstanceType *string `pulumi:"instanceType"`
// ID of the last service error.
LastServiceErrorId *string `pulumi:"lastServiceErrorId"`
// List of the layers the instance will belong to.
LayerIds []string `pulumi:"layerIds"`
// Name of operating system that will be installed.
Os *string `pulumi:"os"`
// Instance's platform.
Platform *string `pulumi:"platform"`
// Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
PrivateDns *string `pulumi:"privateDns"`
// Private IP address assigned to the instance.
PrivateIp *string `pulumi:"privateIp"`
// Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
PublicDns *string `pulumi:"publicDns"`
// Public IP address assigned to the instance, if applicable.
PublicIp *string `pulumi:"publicIp"`
// For registered instances, who performed the registration.
RegisteredBy *string `pulumi:"registeredBy"`
// Instance's reported AWS OpsWorks Stacks agent version.
ReportedAgentVersion *string `pulumi:"reportedAgentVersion"`
// For registered instances, the reported operating system family.
ReportedOsFamily *string `pulumi:"reportedOsFamily"`
// For registered instances, the reported operating system name.
ReportedOsName *string `pulumi:"reportedOsName"`
// For registered instances, the reported operating system version.
ReportedOsVersion *string `pulumi:"reportedOsVersion"`
// Configuration block for the root block device of the instance. See Block Devices below.
RootBlockDevices []InstanceRootBlockDevice `pulumi:"rootBlockDevices"`
// Name of the type of root device instances will have by default. Valid values are `ebs` or `instance-store`.
RootDeviceType *string `pulumi:"rootDeviceType"`
// Root device volume ID.
RootDeviceVolumeId *string `pulumi:"rootDeviceVolumeId"`
// Associated security groups.
SecurityGroupIds []string `pulumi:"securityGroupIds"`
// SSH key's Deep Security Agent (DSA) fingerprint.
SshHostDsaKeyFingerprint *string `pulumi:"sshHostDsaKeyFingerprint"`
// SSH key's RSA fingerprint.
SshHostRsaKeyFingerprint *string `pulumi:"sshHostRsaKeyFingerprint"`
// Name of the SSH keypair that instances will have by default.
SshKeyName *string `pulumi:"sshKeyName"`
// Identifier of the stack the instance will belong to.
//
// The following arguments are optional:
StackId *string `pulumi:"stackId"`
// Desired state of the instance. Valid values are `running` or `stopped`.
State *string `pulumi:"state"`
// Instance status. Will be one of `booting`, `connectionLost`, `online`, `pending`, `rebooting`, `requested`, `runningSetup`, `setupFailed`, `shuttingDown`, `startFailed`, `stopFailed`, `stopped`, `stopping`, `terminated`, or `terminating`.
Status *string `pulumi:"status"`
// Subnet ID to attach to.
SubnetId *string `pulumi:"subnetId"`
// Instance tenancy to use. Valid values are `default`, `dedicated` or `host`.
Tenancy *string `pulumi:"tenancy"`
// Keyword to choose what virtualization mode created instances will use. Valid values are `paravirtual` or `hvm`.
VirtualizationType *string `pulumi:"virtualizationType"`
}
type InstanceState struct {
// OpsWorks agent to install. Default is `INHERIT`.
AgentVersion pulumi.StringPtrInput
// AMI to use for the instance. If an AMI is specified, `os` must be `Custom`.
AmiId pulumi.StringPtrInput
// Machine architecture for created instances. Valid values are `x8664` or `i386`. The default is `x8664`.
Architecture pulumi.StringPtrInput
// Creates load-based or time-based instances. Valid values are `load`, `timer`.
AutoScalingType pulumi.StringPtrInput
// Name of the availability zone where instances will be created by default.
AvailabilityZone pulumi.StringPtrInput
// Time that the instance was created.
CreatedAt pulumi.StringPtrInput
// Whether to delete EBS volume on deletion. Default is `true`.
DeleteEbs pulumi.BoolPtrInput
// Whether to delete the Elastic IP on deletion.
DeleteEip pulumi.BoolPtrInput
// Configuration block for additional EBS block devices to attach to the instance. See Block Devices below.
EbsBlockDevices InstanceEbsBlockDeviceArrayInput
// Whether the launched EC2 instance will be EBS-optimized.
EbsOptimized pulumi.BoolPtrInput
// EC2 instance ID.
Ec2InstanceId pulumi.StringPtrInput
// ECS cluster's ARN for container instances.
EcsClusterArn pulumi.StringPtrInput
// Instance Elastic IP address.
ElasticIp pulumi.StringPtrInput
// Configuration block for ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below.
EphemeralBlockDevices InstanceEphemeralBlockDeviceArrayInput
// Instance's host name.
Hostname pulumi.StringPtrInput
// For registered instances, infrastructure class: ec2 or on-premises.
InfrastructureClass pulumi.StringPtrInput
// Controls where to install OS and package updates when the instance boots. Default is `true`.
InstallUpdatesOnBoot pulumi.BoolPtrInput
// ARN of the instance's IAM profile.
InstanceProfileArn pulumi.StringPtrInput
// Type of instance to start.
InstanceType pulumi.StringPtrInput
// ID of the last service error.
LastServiceErrorId pulumi.StringPtrInput
// List of the layers the instance will belong to.
LayerIds pulumi.StringArrayInput
// Name of operating system that will be installed.
Os pulumi.StringPtrInput
// Instance's platform.
Platform pulumi.StringPtrInput
// Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
PrivateDns pulumi.StringPtrInput
// Private IP address assigned to the instance.
PrivateIp pulumi.StringPtrInput
// Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
PublicDns pulumi.StringPtrInput
// Public IP address assigned to the instance, if applicable.
PublicIp pulumi.StringPtrInput
// For registered instances, who performed the registration.
RegisteredBy pulumi.StringPtrInput
// Instance's reported AWS OpsWorks Stacks agent version.
ReportedAgentVersion pulumi.StringPtrInput
// For registered instances, the reported operating system family.
ReportedOsFamily pulumi.StringPtrInput
// For registered instances, the reported operating system name.
ReportedOsName pulumi.StringPtrInput
// For registered instances, the reported operating system version.
ReportedOsVersion pulumi.StringPtrInput
// Configuration block for the root block device of the instance. See Block Devices below.
RootBlockDevices InstanceRootBlockDeviceArrayInput
// Name of the type of root device instances will have by default. Valid values are `ebs` or `instance-store`.
RootDeviceType pulumi.StringPtrInput
// Root device volume ID.
RootDeviceVolumeId pulumi.StringPtrInput
// Associated security groups.
SecurityGroupIds pulumi.StringArrayInput
// SSH key's Deep Security Agent (DSA) fingerprint.
SshHostDsaKeyFingerprint pulumi.StringPtrInput
// SSH key's RSA fingerprint.
SshHostRsaKeyFingerprint pulumi.StringPtrInput
// Name of the SSH keypair that instances will have by default.
SshKeyName pulumi.StringPtrInput
// Identifier of the stack the instance will belong to.
//
// The following arguments are optional:
StackId pulumi.StringPtrInput
// Desired state of the instance. Valid values are `running` or `stopped`.
State pulumi.StringPtrInput
// Instance status. Will be one of `booting`, `connectionLost`, `online`, `pending`, `rebooting`, `requested`, `runningSetup`, `setupFailed`, `shuttingDown`, `startFailed`, `stopFailed`, `stopped`, `stopping`, `terminated`, or `terminating`.
Status pulumi.StringPtrInput
// Subnet ID to attach to.
SubnetId pulumi.StringPtrInput
// Instance tenancy to use. Valid values are `default`, `dedicated` or `host`.
Tenancy pulumi.StringPtrInput
// Keyword to choose what virtualization mode created instances will use. Valid values are `paravirtual` or `hvm`.
VirtualizationType pulumi.StringPtrInput
}
func (InstanceState) ElementType() reflect.Type {
return reflect.TypeOf((*instanceState)(nil)).Elem()
}
type instanceArgs struct {
// OpsWorks agent to install. Default is `INHERIT`.
AgentVersion *string `pulumi:"agentVersion"`
// AMI to use for the instance. If an AMI is specified, `os` must be `Custom`.
AmiId *string `pulumi:"amiId"`
// Machine architecture for created instances. Valid values are `x8664` or `i386`. The default is `x8664`.
Architecture *string `pulumi:"architecture"`
// Creates load-based or time-based instances. Valid values are `load`, `timer`.
AutoScalingType *string `pulumi:"autoScalingType"`
// Name of the availability zone where instances will be created by default.
AvailabilityZone *string `pulumi:"availabilityZone"`
// Time that the instance was created.
CreatedAt *string `pulumi:"createdAt"`
// Whether to delete EBS volume on deletion. Default is `true`.
DeleteEbs *bool `pulumi:"deleteEbs"`
// Whether to delete the Elastic IP on deletion.
DeleteEip *bool `pulumi:"deleteEip"`
// Configuration block for additional EBS block devices to attach to the instance. See Block Devices below.
EbsBlockDevices []InstanceEbsBlockDevice `pulumi:"ebsBlockDevices"`
// Whether the launched EC2 instance will be EBS-optimized.
EbsOptimized *bool `pulumi:"ebsOptimized"`
// ECS cluster's ARN for container instances.
EcsClusterArn *string `pulumi:"ecsClusterArn"`
// Instance Elastic IP address.
ElasticIp *string `pulumi:"elasticIp"`
// Configuration block for ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below.
EphemeralBlockDevices []InstanceEphemeralBlockDevice `pulumi:"ephemeralBlockDevices"`
// Instance's host name.
Hostname *string `pulumi:"hostname"`
// For registered instances, infrastructure class: ec2 or on-premises.
InfrastructureClass *string `pulumi:"infrastructureClass"`
// Controls where to install OS and package updates when the instance boots. Default is `true`.
InstallUpdatesOnBoot *bool `pulumi:"installUpdatesOnBoot"`
// ARN of the instance's IAM profile.
InstanceProfileArn *string `pulumi:"instanceProfileArn"`
// Type of instance to start.
InstanceType *string `pulumi:"instanceType"`
// List of the layers the instance will belong to.
LayerIds []string `pulumi:"layerIds"`
// Name of operating system that will be installed.
Os *string `pulumi:"os"`
// Configuration block for the root block device of the instance. See Block Devices below.
RootBlockDevices []InstanceRootBlockDevice `pulumi:"rootBlockDevices"`
// Name of the type of root device instances will have by default. Valid values are `ebs` or `instance-store`.
RootDeviceType *string `pulumi:"rootDeviceType"`
// Associated security groups.
SecurityGroupIds []string `pulumi:"securityGroupIds"`
// Name of the SSH keypair that instances will have by default.
SshKeyName *string `pulumi:"sshKeyName"`
// Identifier of the stack the instance will belong to.
//
// The following arguments are optional:
StackId string `pulumi:"stackId"`
// Desired state of the instance. Valid values are `running` or `stopped`.
State *string `pulumi:"state"`
// Instance status. Will be one of `booting`, `connectionLost`, `online`, `pending`, `rebooting`, `requested`, `runningSetup`, `setupFailed`, `shuttingDown`, `startFailed`, `stopFailed`, `stopped`, `stopping`, `terminated`, or `terminating`.
Status *string `pulumi:"status"`
// Subnet ID to attach to.
SubnetId *string `pulumi:"subnetId"`
// Instance tenancy to use. Valid values are `default`, `dedicated` or `host`.
Tenancy *string `pulumi:"tenancy"`
// Keyword to choose what virtualization mode created instances will use. Valid values are `paravirtual` or `hvm`.
VirtualizationType *string `pulumi:"virtualizationType"`
}
// The set of arguments for constructing a Instance resource.
type InstanceArgs struct {
// OpsWorks agent to install. Default is `INHERIT`.
AgentVersion pulumi.StringPtrInput
// AMI to use for the instance. If an AMI is specified, `os` must be `Custom`.
AmiId pulumi.StringPtrInput
// Machine architecture for created instances. Valid values are `x8664` or `i386`. The default is `x8664`.
Architecture pulumi.StringPtrInput
// Creates load-based or time-based instances. Valid values are `load`, `timer`.
AutoScalingType pulumi.StringPtrInput
// Name of the availability zone where instances will be created by default.
AvailabilityZone pulumi.StringPtrInput
// Time that the instance was created.
CreatedAt pulumi.StringPtrInput
// Whether to delete EBS volume on deletion. Default is `true`.
DeleteEbs pulumi.BoolPtrInput
// Whether to delete the Elastic IP on deletion.
DeleteEip pulumi.BoolPtrInput
// Configuration block for additional EBS block devices to attach to the instance. See Block Devices below.
EbsBlockDevices InstanceEbsBlockDeviceArrayInput
// Whether the launched EC2 instance will be EBS-optimized.
EbsOptimized pulumi.BoolPtrInput
// ECS cluster's ARN for container instances.
EcsClusterArn pulumi.StringPtrInput
// Instance Elastic IP address.
ElasticIp pulumi.StringPtrInput
// Configuration block for ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below.
EphemeralBlockDevices InstanceEphemeralBlockDeviceArrayInput
// Instance's host name.
Hostname pulumi.StringPtrInput
// For registered instances, infrastructure class: ec2 or on-premises.
InfrastructureClass pulumi.StringPtrInput
// Controls where to install OS and package updates when the instance boots. Default is `true`.
InstallUpdatesOnBoot pulumi.BoolPtrInput
// ARN of the instance's IAM profile.
InstanceProfileArn pulumi.StringPtrInput
// Type of instance to start.
InstanceType pulumi.StringPtrInput
// List of the layers the instance will belong to.
LayerIds pulumi.StringArrayInput
// Name of operating system that will be installed.
Os pulumi.StringPtrInput
// Configuration block for the root block device of the instance. See Block Devices below.
RootBlockDevices InstanceRootBlockDeviceArrayInput
// Name of the type of root device instances will have by default. Valid values are `ebs` or `instance-store`.
RootDeviceType pulumi.StringPtrInput
// Associated security groups.
SecurityGroupIds pulumi.StringArrayInput
// Name of the SSH keypair that instances will have by default.
SshKeyName pulumi.StringPtrInput
// Identifier of the stack the instance will belong to.
//
// The following arguments are optional:
StackId pulumi.StringInput
// Desired state of the instance. Valid values are `running` or `stopped`.
State pulumi.StringPtrInput
// Instance status. Will be one of `booting`, `connectionLost`, `online`, `pending`, `rebooting`, `requested`, `runningSetup`, `setupFailed`, `shuttingDown`, `startFailed`, `stopFailed`, `stopped`, `stopping`, `terminated`, or `terminating`.
Status pulumi.StringPtrInput
// Subnet ID to attach to.
SubnetId pulumi.StringPtrInput
// Instance tenancy to use. Valid values are `default`, `dedicated` or `host`.
Tenancy pulumi.StringPtrInput
// Keyword to choose what virtualization mode created instances will use. Valid values are `paravirtual` or `hvm`.
VirtualizationType pulumi.StringPtrInput
}
func (InstanceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*instanceArgs)(nil)).Elem()
}
type InstanceInput interface {
pulumi.Input
ToInstanceOutput() InstanceOutput
ToInstanceOutputWithContext(ctx context.Context) InstanceOutput
}
func (*Instance) ElementType() reflect.Type {
return reflect.TypeOf((**Instance)(nil)).Elem()
}
func (i *Instance) ToInstanceOutput() InstanceOutput {
return i.ToInstanceOutputWithContext(context.Background())
}
func (i *Instance) ToInstanceOutputWithContext(ctx context.Context) InstanceOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceOutput)
}
// InstanceArrayInput is an input type that accepts InstanceArray and InstanceArrayOutput values.
// You can construct a concrete instance of `InstanceArrayInput` via:
//
// InstanceArray{ InstanceArgs{...} }
type InstanceArrayInput interface {
pulumi.Input
ToInstanceArrayOutput() InstanceArrayOutput
ToInstanceArrayOutputWithContext(context.Context) InstanceArrayOutput
}
type InstanceArray []InstanceInput
func (InstanceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Instance)(nil)).Elem()
}
func (i InstanceArray) ToInstanceArrayOutput() InstanceArrayOutput {
return i.ToInstanceArrayOutputWithContext(context.Background())
}
func (i InstanceArray) ToInstanceArrayOutputWithContext(ctx context.Context) InstanceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceArrayOutput)
}
// InstanceMapInput is an input type that accepts InstanceMap and InstanceMapOutput values.
// You can construct a concrete instance of `InstanceMapInput` via:
//
// InstanceMap{ "key": InstanceArgs{...} }
type InstanceMapInput interface {
pulumi.Input
ToInstanceMapOutput() InstanceMapOutput
ToInstanceMapOutputWithContext(context.Context) InstanceMapOutput
}
type InstanceMap map[string]InstanceInput
func (InstanceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Instance)(nil)).Elem()
}
func (i InstanceMap) ToInstanceMapOutput() InstanceMapOutput {
return i.ToInstanceMapOutputWithContext(context.Background())
}
func (i InstanceMap) ToInstanceMapOutputWithContext(ctx context.Context) InstanceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceMapOutput)
}
type InstanceOutput struct{ *pulumi.OutputState }
func (InstanceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Instance)(nil)).Elem()
}
func (o InstanceOutput) ToInstanceOutput() InstanceOutput {
return o
}
func (o InstanceOutput) ToInstanceOutputWithContext(ctx context.Context) InstanceOutput {
return o
}
// OpsWorks agent to install. Default is `INHERIT`.
func (o InstanceOutput) AgentVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Instance) pulumi.StringPtrOutput { return v.AgentVersion }).(pulumi.StringPtrOutput)
}
// AMI to use for the instance. If an AMI is specified, `os` must be `Custom`.
func (o InstanceOutput) AmiId() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.AmiId }).(pulumi.StringOutput)
}
// Machine architecture for created instances. Valid values are `x8664` or `i386`. The default is `x8664`.
func (o InstanceOutput) Architecture() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Instance) pulumi.StringPtrOutput { return v.Architecture }).(pulumi.StringPtrOutput)
}
// Creates load-based or time-based instances. Valid values are `load`, `timer`.
func (o InstanceOutput) AutoScalingType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Instance) pulumi.StringPtrOutput { return v.AutoScalingType }).(pulumi.StringPtrOutput)
}
// Name of the availability zone where instances will be created by default.
func (o InstanceOutput) AvailabilityZone() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.AvailabilityZone }).(pulumi.StringOutput)
}
// Time that the instance was created.
func (o InstanceOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// Whether to delete EBS volume on deletion. Default is `true`.
func (o InstanceOutput) DeleteEbs() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Instance) pulumi.BoolPtrOutput { return v.DeleteEbs }).(pulumi.BoolPtrOutput)
}
// Whether to delete the Elastic IP on deletion.
func (o InstanceOutput) DeleteEip() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Instance) pulumi.BoolPtrOutput { return v.DeleteEip }).(pulumi.BoolPtrOutput)
}
// Configuration block for additional EBS block devices to attach to the instance. See Block Devices below.
func (o InstanceOutput) EbsBlockDevices() InstanceEbsBlockDeviceArrayOutput {
return o.ApplyT(func(v *Instance) InstanceEbsBlockDeviceArrayOutput { return v.EbsBlockDevices }).(InstanceEbsBlockDeviceArrayOutput)
}
// Whether the launched EC2 instance will be EBS-optimized.
func (o InstanceOutput) EbsOptimized() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Instance) pulumi.BoolPtrOutput { return v.EbsOptimized }).(pulumi.BoolPtrOutput)
}
// EC2 instance ID.
func (o InstanceOutput) Ec2InstanceId() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.Ec2InstanceId }).(pulumi.StringOutput)
}
// ECS cluster's ARN for container instances.
func (o InstanceOutput) EcsClusterArn() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.EcsClusterArn }).(pulumi.StringOutput)
}
// Instance Elastic IP address.
func (o InstanceOutput) ElasticIp() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.ElasticIp }).(pulumi.StringOutput)
}
// Configuration block for ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below.
func (o InstanceOutput) EphemeralBlockDevices() InstanceEphemeralBlockDeviceArrayOutput {
return o.ApplyT(func(v *Instance) InstanceEphemeralBlockDeviceArrayOutput { return v.EphemeralBlockDevices }).(InstanceEphemeralBlockDeviceArrayOutput)
}
// Instance's host name.
func (o InstanceOutput) Hostname() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.Hostname }).(pulumi.StringOutput)
}
// For registered instances, infrastructure class: ec2 or on-premises.
func (o InstanceOutput) InfrastructureClass() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.InfrastructureClass }).(pulumi.StringOutput)
}
// Controls where to install OS and package updates when the instance boots. Default is `true`.
func (o InstanceOutput) InstallUpdatesOnBoot() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Instance) pulumi.BoolPtrOutput { return v.InstallUpdatesOnBoot }).(pulumi.BoolPtrOutput)
}
// ARN of the instance's IAM profile.
func (o InstanceOutput) InstanceProfileArn() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.InstanceProfileArn }).(pulumi.StringOutput)
}
// Type of instance to start.
func (o InstanceOutput) InstanceType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Instance) pulumi.StringPtrOutput { return v.InstanceType }).(pulumi.StringPtrOutput)
}
// ID of the last service error.
func (o InstanceOutput) LastServiceErrorId() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.LastServiceErrorId }).(pulumi.StringOutput)
}
// List of the layers the instance will belong to.
func (o InstanceOutput) LayerIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Instance) pulumi.StringArrayOutput { return v.LayerIds }).(pulumi.StringArrayOutput)
}
// Name of operating system that will be installed.
func (o InstanceOutput) Os() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.Os }).(pulumi.StringOutput)
}
// Instance's platform.
func (o InstanceOutput) Platform() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.Platform }).(pulumi.StringOutput)
}
// Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
func (o InstanceOutput) PrivateDns() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.PrivateDns }).(pulumi.StringOutput)
}
// Private IP address assigned to the instance.
func (o InstanceOutput) PrivateIp() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.PrivateIp }).(pulumi.StringOutput)
}
// Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
func (o InstanceOutput) PublicDns() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.PublicDns }).(pulumi.StringOutput)
}
// Public IP address assigned to the instance, if applicable.
func (o InstanceOutput) PublicIp() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.PublicIp }).(pulumi.StringOutput)
}
// For registered instances, who performed the registration.
func (o InstanceOutput) RegisteredBy() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.RegisteredBy }).(pulumi.StringOutput)
}
// Instance's reported AWS OpsWorks Stacks agent version.
func (o InstanceOutput) ReportedAgentVersion() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.ReportedAgentVersion }).(pulumi.StringOutput)
}
// For registered instances, the reported operating system family.
func (o InstanceOutput) ReportedOsFamily() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.ReportedOsFamily }).(pulumi.StringOutput)
}
// For registered instances, the reported operating system name.
func (o InstanceOutput) ReportedOsName() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.ReportedOsName }).(pulumi.StringOutput)
}
// For registered instances, the reported operating system version.
func (o InstanceOutput) ReportedOsVersion() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.ReportedOsVersion }).(pulumi.StringOutput)
}
// Configuration block for the root block device of the instance. See Block Devices below.
func (o InstanceOutput) RootBlockDevices() InstanceRootBlockDeviceArrayOutput {
return o.ApplyT(func(v *Instance) InstanceRootBlockDeviceArrayOutput { return v.RootBlockDevices }).(InstanceRootBlockDeviceArrayOutput)
}
// Name of the type of root device instances will have by default. Valid values are `ebs` or `instance-store`.
func (o InstanceOutput) RootDeviceType() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.RootDeviceType }).(pulumi.StringOutput)
}
// Root device volume ID.
func (o InstanceOutput) RootDeviceVolumeId() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.RootDeviceVolumeId }).(pulumi.StringOutput)
}
// Associated security groups.
func (o InstanceOutput) SecurityGroupIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Instance) pulumi.StringArrayOutput { return v.SecurityGroupIds }).(pulumi.StringArrayOutput)
}
// SSH key's Deep Security Agent (DSA) fingerprint.
func (o InstanceOutput) SshHostDsaKeyFingerprint() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.SshHostDsaKeyFingerprint }).(pulumi.StringOutput)
}
// SSH key's RSA fingerprint.
func (o InstanceOutput) SshHostRsaKeyFingerprint() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.SshHostRsaKeyFingerprint }).(pulumi.StringOutput)
}
// Name of the SSH keypair that instances will have by default.
func (o InstanceOutput) SshKeyName() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.SshKeyName }).(pulumi.StringOutput)
}
// Identifier of the stack the instance will belong to.
//
// The following arguments are optional:
func (o InstanceOutput) StackId() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.StackId }).(pulumi.StringOutput)
}
// Desired state of the instance. Valid values are `running` or `stopped`.
func (o InstanceOutput) State() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Instance) pulumi.StringPtrOutput { return v.State }).(pulumi.StringPtrOutput)
}
// Instance status. Will be one of `booting`, `connectionLost`, `online`, `pending`, `rebooting`, `requested`, `runningSetup`, `setupFailed`, `shuttingDown`, `startFailed`, `stopFailed`, `stopped`, `stopping`, `terminated`, or `terminating`.
func (o InstanceOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
// Subnet ID to attach to.
func (o InstanceOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput)
}
// Instance tenancy to use. Valid values are `default`, `dedicated` or `host`.
func (o InstanceOutput) Tenancy() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.Tenancy }).(pulumi.StringOutput)
}
// Keyword to choose what virtualization mode created instances will use. Valid values are `paravirtual` or `hvm`.
func (o InstanceOutput) VirtualizationType() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.VirtualizationType }).(pulumi.StringOutput)
}
type InstanceArrayOutput struct{ *pulumi.OutputState }
func (InstanceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Instance)(nil)).Elem()
}
func (o InstanceArrayOutput) ToInstanceArrayOutput() InstanceArrayOutput {
return o
}
func (o InstanceArrayOutput) ToInstanceArrayOutputWithContext(ctx context.Context) InstanceArrayOutput {
return o
}
func (o InstanceArrayOutput) Index(i pulumi.IntInput) InstanceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Instance {
return vs[0].([]*Instance)[vs[1].(int)]
}).(InstanceOutput)
}
type InstanceMapOutput struct{ *pulumi.OutputState }
func (InstanceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Instance)(nil)).Elem()
}
func (o InstanceMapOutput) ToInstanceMapOutput() InstanceMapOutput {
return o
}
func (o InstanceMapOutput) ToInstanceMapOutputWithContext(ctx context.Context) InstanceMapOutput {
return o
}
func (o InstanceMapOutput) MapIndex(k pulumi.StringInput) InstanceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Instance {
return vs[0].(map[string]*Instance)[vs[1].(string)]
}).(InstanceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*InstanceInput)(nil)).Elem(), &Instance{})
pulumi.RegisterInputType(reflect.TypeOf((*InstanceArrayInput)(nil)).Elem(), InstanceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*InstanceMapInput)(nil)).Elem(), InstanceMap{})
pulumi.RegisterOutputType(InstanceOutput{})
pulumi.RegisterOutputType(InstanceArrayOutput{})
pulumi.RegisterOutputType(InstanceMapOutput{})
}