/
spotInstanceRequest.go
694 lines (681 loc) · 51.5 KB
/
spotInstanceRequest.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
// *** 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 (
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Provides an EC2 Spot Instance Request resource. This allows instances to be
// requested on the spot market.
//
// By default this provider creates Spot Instance Requests with a `persistent` type,
// which means that for the duration of their lifetime, AWS will launch an
// instance with the configured details if and when the spot market will accept
// the requested price.
//
// On destruction, this provider will make an attempt to terminate the associated Spot
// Instance if there is one present.
//
// Spot Instances requests with a `one-time` type will close the spot request
// when the instance is terminated either by the request being below the current spot
// price availability or by a user.
//
// > **NOTE:** Because their behavior depends on the live status of the spot
// market, Spot Instance Requests have a unique lifecycle that makes them behave
// differently than other resources. Most importantly: there is __no
// guarantee__ that a Spot Instance exists to fulfill the request at any given
// point in time. See the [AWS Spot Instance
// documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances.html)
// for more information.
type SpotInstanceRequest struct {
pulumi.CustomResourceState
// The AMI to use for the instance.
Ami pulumi.StringOutput `pulumi:"ami"`
Arn pulumi.StringOutput `pulumi:"arn"`
// Associate a public ip address with an instance in a VPC. Boolean value.
AssociatePublicIpAddress pulumi.BoolOutput `pulumi:"associatePublicIpAddress"`
// The AZ to start the instance in.
AvailabilityZone pulumi.StringOutput `pulumi:"availabilityZone"`
// The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
// The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
// Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
BlockDurationMinutes pulumi.IntPtrOutput `pulumi:"blockDurationMinutes"`
// Sets the number of CPU cores for an instance. This option is
// only supported on creation of instance type that support CPU Options
// [CPU Cores and Threads Per CPU Core Per Instance Type](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html#cpu-options-supported-instances-values) - specifying this option for unsupported instance types will return an error from the EC2 API.
CpuCoreCount pulumi.IntOutput `pulumi:"cpuCoreCount"`
// If set to to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See [Optimizing CPU Options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) for more information.
CpuThreadsPerCore pulumi.IntOutput `pulumi:"cpuThreadsPerCore"`
// Customize the credit specification of the instance. See Credit Specification below for more details.
CreditSpecification SpotInstanceRequestCreditSpecificationPtrOutput `pulumi:"creditSpecification"`
// If true, enables [EC2 Instance
// Termination Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingDisableAPITermination)
DisableApiTermination pulumi.BoolPtrOutput `pulumi:"disableApiTermination"`
// Additional EBS block devices to attach to the
// instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection.
EbsBlockDevices SpotInstanceRequestEbsBlockDeviceArrayOutput `pulumi:"ebsBlockDevices"`
// If true, the launched EC2 instance will be EBS-optimized.
// Note that if this is not set on an instance type that is optimized by default then
// this will show as disabled but if the instance type is optimized by default then
// there is no need to set this and there is no effect to disabling it.
// See the [EBS Optimized section](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) of the AWS User Guide for more information.
EbsOptimized pulumi.BoolPtrOutput `pulumi:"ebsOptimized"`
// Customize Ephemeral (also known as
// "Instance Store") volumes on the instance. See Block Devices below for details.
EphemeralBlockDevices SpotInstanceRequestEphemeralBlockDeviceArrayOutput `pulumi:"ephemeralBlockDevices"`
// If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the `passwordData` attribute. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordData.html) for more information.
GetPasswordData pulumi.BoolPtrOutput `pulumi:"getPasswordData"`
// If true, the launched EC2 instance will support hibernation.
Hibernation pulumi.BoolPtrOutput `pulumi:"hibernation"`
// The Id of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
HostId pulumi.StringOutput `pulumi:"hostId"`
// The IAM Instance Profile to
// launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the [EC2 documentation](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html#roles-usingrole-ec2instance-permissions), notably `iam:PassRole`.
// * `ipv6AddressCount`- (Optional) A number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
IamInstanceProfile pulumi.StringPtrOutput `pulumi:"iamInstanceProfile"`
// Shutdown behavior for the
// instance. Amazon defaults this to `stop` for EBS-backed instances and
// `terminate` for instance-store instances. Cannot be set on instance-store
// instances. See [Shutdown Behavior](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingInstanceInitiatedShutdownBehavior) for more information.
InstanceInitiatedShutdownBehavior pulumi.StringPtrOutput `pulumi:"instanceInitiatedShutdownBehavior"`
// Indicates whether a Spot instance stops or terminates when it is interrupted. Default is `terminate` as this is the current AWS behaviour.
InstanceInterruptionBehaviour pulumi.StringPtrOutput `pulumi:"instanceInterruptionBehaviour"`
InstanceState pulumi.StringOutput `pulumi:"instanceState"`
// The type of instance to start. Updates to this field will trigger a stop/start of the EC2 instance.
InstanceType pulumi.StringOutput `pulumi:"instanceType"`
Ipv6AddressCount pulumi.IntOutput `pulumi:"ipv6AddressCount"`
// Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
Ipv6Addresses pulumi.StringArrayOutput `pulumi:"ipv6Addresses"`
// The key name of the Key Pair to use for the instance; which can be managed using the `ec2.KeyPair` resource.
KeyName pulumi.StringOutput `pulumi:"keyName"`
// A launch group is a group of spot instances that launch together and terminate together.
// If left empty instances are launched and terminated individually.
LaunchGroup pulumi.StringPtrOutput `pulumi:"launchGroup"`
// Customize the metadata options of the instance. See Metadata Options below for more details.
MetadataOptions SpotInstanceRequestMetadataOptionsOutput `pulumi:"metadataOptions"`
// If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
Monitoring pulumi.BoolPtrOutput `pulumi:"monitoring"`
// Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
NetworkInterfaces SpotInstanceRequestNetworkInterfaceArrayOutput `pulumi:"networkInterfaces"`
PasswordData pulumi.StringOutput `pulumi:"passwordData"`
// The Placement Group to start the instance in.
PlacementGroup pulumi.StringOutput `pulumi:"placementGroup"`
PrimaryNetworkInterfaceId pulumi.StringOutput `pulumi:"primaryNetworkInterfaceId"`
// The 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 to associate with the
// instance in a VPC.
PrivateIp pulumi.StringOutput `pulumi:"privateIp"`
// The 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"`
// The public IP address assigned to the instance, if applicable.
PublicIp pulumi.StringOutput `pulumi:"publicIp"`
// Customize details about the root block
// device of the instance. See Block Devices below for details.
RootBlockDevice SpotInstanceRequestRootBlockDeviceOutput `pulumi:"rootBlockDevice"`
// A list of security group names (EC2-Classic) or IDs (default VPC) to associate with.
SecurityGroups pulumi.StringArrayOutput `pulumi:"securityGroups"`
// Controls if traffic is routed to the instance when
// the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
SourceDestCheck pulumi.BoolPtrOutput `pulumi:"sourceDestCheck"`
// The current [bid
// status](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html)
// of the Spot Instance Request.
// * `spotRequestState` The current [request
// state](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html#creating-spot-request-status)
// of the Spot Instance Request.
SpotBidStatus pulumi.StringOutput `pulumi:"spotBidStatus"`
// The Instance ID (if any) that is currently fulfilling
// the Spot Instance request.
SpotInstanceId pulumi.StringOutput `pulumi:"spotInstanceId"`
// The maximum price to request on the spot market.
SpotPrice pulumi.StringPtrOutput `pulumi:"spotPrice"`
SpotRequestState pulumi.StringOutput `pulumi:"spotRequestState"`
// If set to `one-time`, after
// the instance is terminated, the spot request will be closed.
SpotType pulumi.StringPtrOutput `pulumi:"spotType"`
// The VPC Subnet ID to launch in.
SubnetId pulumi.StringOutput `pulumi:"subnetId"`
// A mapping of tags to assign to the resource.
Tags pulumi.MapOutput `pulumi:"tags"`
// The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command.
Tenancy pulumi.StringOutput `pulumi:"tenancy"`
// The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see `userDataBase64` instead.
UserData pulumi.StringPtrOutput `pulumi:"userData"`
// Can be used instead of `userData` to pass base64-encoded binary data directly. Use this instead of `userData` whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption.
UserDataBase64 pulumi.StringPtrOutput `pulumi:"userDataBase64"`
// The start date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
ValidFrom pulumi.StringOutput `pulumi:"validFrom"`
// The end date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
ValidUntil pulumi.StringOutput `pulumi:"validUntil"`
// A mapping of tags to assign to the devices created by the instance at launch time.
VolumeTags pulumi.MapOutput `pulumi:"volumeTags"`
// A list of security group IDs to associate with.
VpcSecurityGroupIds pulumi.StringArrayOutput `pulumi:"vpcSecurityGroupIds"`
// If set, this provider will
// wait for the Spot Request to be fulfilled, and will throw an error if the
// timeout of 10m is reached.
WaitForFulfillment pulumi.BoolPtrOutput `pulumi:"waitForFulfillment"`
}
// NewSpotInstanceRequest registers a new resource with the given unique name, arguments, and options.
func NewSpotInstanceRequest(ctx *pulumi.Context,
name string, args *SpotInstanceRequestArgs, opts ...pulumi.ResourceOption) (*SpotInstanceRequest, error) {
if args == nil || args.Ami == nil {
return nil, errors.New("missing required argument 'Ami'")
}
if args == nil || args.InstanceType == nil {
return nil, errors.New("missing required argument 'InstanceType'")
}
if args == nil {
args = &SpotInstanceRequestArgs{}
}
var resource SpotInstanceRequest
err := ctx.RegisterResource("aws:ec2/spotInstanceRequest:SpotInstanceRequest", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpotInstanceRequest gets an existing SpotInstanceRequest 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 GetSpotInstanceRequest(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpotInstanceRequestState, opts ...pulumi.ResourceOption) (*SpotInstanceRequest, error) {
var resource SpotInstanceRequest
err := ctx.ReadResource("aws:ec2/spotInstanceRequest:SpotInstanceRequest", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpotInstanceRequest resources.
type spotInstanceRequestState struct {
// The AMI to use for the instance.
Ami *string `pulumi:"ami"`
Arn *string `pulumi:"arn"`
// Associate a public ip address with an instance in a VPC. Boolean value.
AssociatePublicIpAddress *bool `pulumi:"associatePublicIpAddress"`
// The AZ to start the instance in.
AvailabilityZone *string `pulumi:"availabilityZone"`
// The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
// The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
// Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
BlockDurationMinutes *int `pulumi:"blockDurationMinutes"`
// Sets the number of CPU cores for an instance. This option is
// only supported on creation of instance type that support CPU Options
// [CPU Cores and Threads Per CPU Core Per Instance Type](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html#cpu-options-supported-instances-values) - specifying this option for unsupported instance types will return an error from the EC2 API.
CpuCoreCount *int `pulumi:"cpuCoreCount"`
// If set to to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See [Optimizing CPU Options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) for more information.
CpuThreadsPerCore *int `pulumi:"cpuThreadsPerCore"`
// Customize the credit specification of the instance. See Credit Specification below for more details.
CreditSpecification *SpotInstanceRequestCreditSpecification `pulumi:"creditSpecification"`
// If true, enables [EC2 Instance
// Termination Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingDisableAPITermination)
DisableApiTermination *bool `pulumi:"disableApiTermination"`
// Additional EBS block devices to attach to the
// instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection.
EbsBlockDevices []SpotInstanceRequestEbsBlockDevice `pulumi:"ebsBlockDevices"`
// If true, the launched EC2 instance will be EBS-optimized.
// Note that if this is not set on an instance type that is optimized by default then
// this will show as disabled but if the instance type is optimized by default then
// there is no need to set this and there is no effect to disabling it.
// See the [EBS Optimized section](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) of the AWS User Guide for more information.
EbsOptimized *bool `pulumi:"ebsOptimized"`
// Customize Ephemeral (also known as
// "Instance Store") volumes on the instance. See Block Devices below for details.
EphemeralBlockDevices []SpotInstanceRequestEphemeralBlockDevice `pulumi:"ephemeralBlockDevices"`
// If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the `passwordData` attribute. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordData.html) for more information.
GetPasswordData *bool `pulumi:"getPasswordData"`
// If true, the launched EC2 instance will support hibernation.
Hibernation *bool `pulumi:"hibernation"`
// The Id of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
HostId *string `pulumi:"hostId"`
// The IAM Instance Profile to
// launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the [EC2 documentation](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html#roles-usingrole-ec2instance-permissions), notably `iam:PassRole`.
// * `ipv6AddressCount`- (Optional) A number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
IamInstanceProfile *string `pulumi:"iamInstanceProfile"`
// Shutdown behavior for the
// instance. Amazon defaults this to `stop` for EBS-backed instances and
// `terminate` for instance-store instances. Cannot be set on instance-store
// instances. See [Shutdown Behavior](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingInstanceInitiatedShutdownBehavior) for more information.
InstanceInitiatedShutdownBehavior *string `pulumi:"instanceInitiatedShutdownBehavior"`
// Indicates whether a Spot instance stops or terminates when it is interrupted. Default is `terminate` as this is the current AWS behaviour.
InstanceInterruptionBehaviour *string `pulumi:"instanceInterruptionBehaviour"`
InstanceState *string `pulumi:"instanceState"`
// The type of instance to start. Updates to this field will trigger a stop/start of the EC2 instance.
InstanceType *string `pulumi:"instanceType"`
Ipv6AddressCount *int `pulumi:"ipv6AddressCount"`
// Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
Ipv6Addresses []string `pulumi:"ipv6Addresses"`
// The key name of the Key Pair to use for the instance; which can be managed using the `ec2.KeyPair` resource.
KeyName *string `pulumi:"keyName"`
// A launch group is a group of spot instances that launch together and terminate together.
// If left empty instances are launched and terminated individually.
LaunchGroup *string `pulumi:"launchGroup"`
// Customize the metadata options of the instance. See Metadata Options below for more details.
MetadataOptions *SpotInstanceRequestMetadataOptions `pulumi:"metadataOptions"`
// If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
Monitoring *bool `pulumi:"monitoring"`
// Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
NetworkInterfaces []SpotInstanceRequestNetworkInterface `pulumi:"networkInterfaces"`
PasswordData *string `pulumi:"passwordData"`
// The Placement Group to start the instance in.
PlacementGroup *string `pulumi:"placementGroup"`
PrimaryNetworkInterfaceId *string `pulumi:"primaryNetworkInterfaceId"`
// The 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 to associate with the
// instance in a VPC.
PrivateIp *string `pulumi:"privateIp"`
// The 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"`
// The public IP address assigned to the instance, if applicable.
PublicIp *string `pulumi:"publicIp"`
// Customize details about the root block
// device of the instance. See Block Devices below for details.
RootBlockDevice *SpotInstanceRequestRootBlockDevice `pulumi:"rootBlockDevice"`
// A list of security group names (EC2-Classic) or IDs (default VPC) to associate with.
SecurityGroups []string `pulumi:"securityGroups"`
// Controls if traffic is routed to the instance when
// the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
SourceDestCheck *bool `pulumi:"sourceDestCheck"`
// The current [bid
// status](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html)
// of the Spot Instance Request.
// * `spotRequestState` The current [request
// state](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html#creating-spot-request-status)
// of the Spot Instance Request.
SpotBidStatus *string `pulumi:"spotBidStatus"`
// The Instance ID (if any) that is currently fulfilling
// the Spot Instance request.
SpotInstanceId *string `pulumi:"spotInstanceId"`
// The maximum price to request on the spot market.
SpotPrice *string `pulumi:"spotPrice"`
SpotRequestState *string `pulumi:"spotRequestState"`
// If set to `one-time`, after
// the instance is terminated, the spot request will be closed.
SpotType *string `pulumi:"spotType"`
// The VPC Subnet ID to launch in.
SubnetId *string `pulumi:"subnetId"`
// A mapping of tags to assign to the resource.
Tags map[string]interface{} `pulumi:"tags"`
// The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command.
Tenancy *string `pulumi:"tenancy"`
// The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see `userDataBase64` instead.
UserData *string `pulumi:"userData"`
// Can be used instead of `userData` to pass base64-encoded binary data directly. Use this instead of `userData` whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption.
UserDataBase64 *string `pulumi:"userDataBase64"`
// The start date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
ValidFrom *string `pulumi:"validFrom"`
// The end date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
ValidUntil *string `pulumi:"validUntil"`
// A mapping of tags to assign to the devices created by the instance at launch time.
VolumeTags map[string]interface{} `pulumi:"volumeTags"`
// A list of security group IDs to associate with.
VpcSecurityGroupIds []string `pulumi:"vpcSecurityGroupIds"`
// If set, this provider will
// wait for the Spot Request to be fulfilled, and will throw an error if the
// timeout of 10m is reached.
WaitForFulfillment *bool `pulumi:"waitForFulfillment"`
}
type SpotInstanceRequestState struct {
// The AMI to use for the instance.
Ami pulumi.StringPtrInput
Arn pulumi.StringPtrInput
// Associate a public ip address with an instance in a VPC. Boolean value.
AssociatePublicIpAddress pulumi.BoolPtrInput
// The AZ to start the instance in.
AvailabilityZone pulumi.StringPtrInput
// The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
// The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
// Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
BlockDurationMinutes pulumi.IntPtrInput
// Sets the number of CPU cores for an instance. This option is
// only supported on creation of instance type that support CPU Options
// [CPU Cores and Threads Per CPU Core Per Instance Type](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html#cpu-options-supported-instances-values) - specifying this option for unsupported instance types will return an error from the EC2 API.
CpuCoreCount pulumi.IntPtrInput
// If set to to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See [Optimizing CPU Options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) for more information.
CpuThreadsPerCore pulumi.IntPtrInput
// Customize the credit specification of the instance. See Credit Specification below for more details.
CreditSpecification SpotInstanceRequestCreditSpecificationPtrInput
// If true, enables [EC2 Instance
// Termination Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingDisableAPITermination)
DisableApiTermination pulumi.BoolPtrInput
// Additional EBS block devices to attach to the
// instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection.
EbsBlockDevices SpotInstanceRequestEbsBlockDeviceArrayInput
// If true, the launched EC2 instance will be EBS-optimized.
// Note that if this is not set on an instance type that is optimized by default then
// this will show as disabled but if the instance type is optimized by default then
// there is no need to set this and there is no effect to disabling it.
// See the [EBS Optimized section](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) of the AWS User Guide for more information.
EbsOptimized pulumi.BoolPtrInput
// Customize Ephemeral (also known as
// "Instance Store") volumes on the instance. See Block Devices below for details.
EphemeralBlockDevices SpotInstanceRequestEphemeralBlockDeviceArrayInput
// If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the `passwordData` attribute. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordData.html) for more information.
GetPasswordData pulumi.BoolPtrInput
// If true, the launched EC2 instance will support hibernation.
Hibernation pulumi.BoolPtrInput
// The Id of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
HostId pulumi.StringPtrInput
// The IAM Instance Profile to
// launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the [EC2 documentation](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html#roles-usingrole-ec2instance-permissions), notably `iam:PassRole`.
// * `ipv6AddressCount`- (Optional) A number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
IamInstanceProfile pulumi.StringPtrInput
// Shutdown behavior for the
// instance. Amazon defaults this to `stop` for EBS-backed instances and
// `terminate` for instance-store instances. Cannot be set on instance-store
// instances. See [Shutdown Behavior](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingInstanceInitiatedShutdownBehavior) for more information.
InstanceInitiatedShutdownBehavior pulumi.StringPtrInput
// Indicates whether a Spot instance stops or terminates when it is interrupted. Default is `terminate` as this is the current AWS behaviour.
InstanceInterruptionBehaviour pulumi.StringPtrInput
InstanceState pulumi.StringPtrInput
// The type of instance to start. Updates to this field will trigger a stop/start of the EC2 instance.
InstanceType pulumi.StringPtrInput
Ipv6AddressCount pulumi.IntPtrInput
// Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
Ipv6Addresses pulumi.StringArrayInput
// The key name of the Key Pair to use for the instance; which can be managed using the `ec2.KeyPair` resource.
KeyName pulumi.StringPtrInput
// A launch group is a group of spot instances that launch together and terminate together.
// If left empty instances are launched and terminated individually.
LaunchGroup pulumi.StringPtrInput
// Customize the metadata options of the instance. See Metadata Options below for more details.
MetadataOptions SpotInstanceRequestMetadataOptionsPtrInput
// If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
Monitoring pulumi.BoolPtrInput
// Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
NetworkInterfaces SpotInstanceRequestNetworkInterfaceArrayInput
PasswordData pulumi.StringPtrInput
// The Placement Group to start the instance in.
PlacementGroup pulumi.StringPtrInput
PrimaryNetworkInterfaceId pulumi.StringPtrInput
// The 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 to associate with the
// instance in a VPC.
PrivateIp pulumi.StringPtrInput
// The 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
// The public IP address assigned to the instance, if applicable.
PublicIp pulumi.StringPtrInput
// Customize details about the root block
// device of the instance. See Block Devices below for details.
RootBlockDevice SpotInstanceRequestRootBlockDevicePtrInput
// A list of security group names (EC2-Classic) or IDs (default VPC) to associate with.
SecurityGroups pulumi.StringArrayInput
// Controls if traffic is routed to the instance when
// the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
SourceDestCheck pulumi.BoolPtrInput
// The current [bid
// status](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html)
// of the Spot Instance Request.
// * `spotRequestState` The current [request
// state](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html#creating-spot-request-status)
// of the Spot Instance Request.
SpotBidStatus pulumi.StringPtrInput
// The Instance ID (if any) that is currently fulfilling
// the Spot Instance request.
SpotInstanceId pulumi.StringPtrInput
// The maximum price to request on the spot market.
SpotPrice pulumi.StringPtrInput
SpotRequestState pulumi.StringPtrInput
// If set to `one-time`, after
// the instance is terminated, the spot request will be closed.
SpotType pulumi.StringPtrInput
// The VPC Subnet ID to launch in.
SubnetId pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.MapInput
// The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command.
Tenancy pulumi.StringPtrInput
// The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see `userDataBase64` instead.
UserData pulumi.StringPtrInput
// Can be used instead of `userData` to pass base64-encoded binary data directly. Use this instead of `userData` whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption.
UserDataBase64 pulumi.StringPtrInput
// The start date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
ValidFrom pulumi.StringPtrInput
// The end date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
ValidUntil pulumi.StringPtrInput
// A mapping of tags to assign to the devices created by the instance at launch time.
VolumeTags pulumi.MapInput
// A list of security group IDs to associate with.
VpcSecurityGroupIds pulumi.StringArrayInput
// If set, this provider will
// wait for the Spot Request to be fulfilled, and will throw an error if the
// timeout of 10m is reached.
WaitForFulfillment pulumi.BoolPtrInput
}
func (SpotInstanceRequestState) ElementType() reflect.Type {
return reflect.TypeOf((*spotInstanceRequestState)(nil)).Elem()
}
type spotInstanceRequestArgs struct {
// The AMI to use for the instance.
Ami string `pulumi:"ami"`
// Associate a public ip address with an instance in a VPC. Boolean value.
AssociatePublicIpAddress *bool `pulumi:"associatePublicIpAddress"`
// The AZ to start the instance in.
AvailabilityZone *string `pulumi:"availabilityZone"`
// The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
// The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
// Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
BlockDurationMinutes *int `pulumi:"blockDurationMinutes"`
// Sets the number of CPU cores for an instance. This option is
// only supported on creation of instance type that support CPU Options
// [CPU Cores and Threads Per CPU Core Per Instance Type](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html#cpu-options-supported-instances-values) - specifying this option for unsupported instance types will return an error from the EC2 API.
CpuCoreCount *int `pulumi:"cpuCoreCount"`
// If set to to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See [Optimizing CPU Options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) for more information.
CpuThreadsPerCore *int `pulumi:"cpuThreadsPerCore"`
// Customize the credit specification of the instance. See Credit Specification below for more details.
CreditSpecification *SpotInstanceRequestCreditSpecification `pulumi:"creditSpecification"`
// If true, enables [EC2 Instance
// Termination Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingDisableAPITermination)
DisableApiTermination *bool `pulumi:"disableApiTermination"`
// Additional EBS block devices to attach to the
// instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection.
EbsBlockDevices []SpotInstanceRequestEbsBlockDevice `pulumi:"ebsBlockDevices"`
// If true, the launched EC2 instance will be EBS-optimized.
// Note that if this is not set on an instance type that is optimized by default then
// this will show as disabled but if the instance type is optimized by default then
// there is no need to set this and there is no effect to disabling it.
// See the [EBS Optimized section](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) of the AWS User Guide for more information.
EbsOptimized *bool `pulumi:"ebsOptimized"`
// Customize Ephemeral (also known as
// "Instance Store") volumes on the instance. See Block Devices below for details.
EphemeralBlockDevices []SpotInstanceRequestEphemeralBlockDevice `pulumi:"ephemeralBlockDevices"`
// If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the `passwordData` attribute. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordData.html) for more information.
GetPasswordData *bool `pulumi:"getPasswordData"`
// If true, the launched EC2 instance will support hibernation.
Hibernation *bool `pulumi:"hibernation"`
// The Id of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
HostId *string `pulumi:"hostId"`
// The IAM Instance Profile to
// launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the [EC2 documentation](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html#roles-usingrole-ec2instance-permissions), notably `iam:PassRole`.
// * `ipv6AddressCount`- (Optional) A number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
IamInstanceProfile *string `pulumi:"iamInstanceProfile"`
// Shutdown behavior for the
// instance. Amazon defaults this to `stop` for EBS-backed instances and
// `terminate` for instance-store instances. Cannot be set on instance-store
// instances. See [Shutdown Behavior](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingInstanceInitiatedShutdownBehavior) for more information.
InstanceInitiatedShutdownBehavior *string `pulumi:"instanceInitiatedShutdownBehavior"`
// Indicates whether a Spot instance stops or terminates when it is interrupted. Default is `terminate` as this is the current AWS behaviour.
InstanceInterruptionBehaviour *string `pulumi:"instanceInterruptionBehaviour"`
// The type of instance to start. Updates to this field will trigger a stop/start of the EC2 instance.
InstanceType string `pulumi:"instanceType"`
Ipv6AddressCount *int `pulumi:"ipv6AddressCount"`
// Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
Ipv6Addresses []string `pulumi:"ipv6Addresses"`
// The key name of the Key Pair to use for the instance; which can be managed using the `ec2.KeyPair` resource.
KeyName *string `pulumi:"keyName"`
// A launch group is a group of spot instances that launch together and terminate together.
// If left empty instances are launched and terminated individually.
LaunchGroup *string `pulumi:"launchGroup"`
// Customize the metadata options of the instance. See Metadata Options below for more details.
MetadataOptions *SpotInstanceRequestMetadataOptions `pulumi:"metadataOptions"`
// If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
Monitoring *bool `pulumi:"monitoring"`
// Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
NetworkInterfaces []SpotInstanceRequestNetworkInterface `pulumi:"networkInterfaces"`
// The Placement Group to start the instance in.
PlacementGroup *string `pulumi:"placementGroup"`
// Private IP address to associate with the
// instance in a VPC.
PrivateIp *string `pulumi:"privateIp"`
// Customize details about the root block
// device of the instance. See Block Devices below for details.
RootBlockDevice *SpotInstanceRequestRootBlockDevice `pulumi:"rootBlockDevice"`
// A list of security group names (EC2-Classic) or IDs (default VPC) to associate with.
SecurityGroups []string `pulumi:"securityGroups"`
// Controls if traffic is routed to the instance when
// the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
SourceDestCheck *bool `pulumi:"sourceDestCheck"`
// The maximum price to request on the spot market.
SpotPrice *string `pulumi:"spotPrice"`
// If set to `one-time`, after
// the instance is terminated, the spot request will be closed.
SpotType *string `pulumi:"spotType"`
// The VPC Subnet ID to launch in.
SubnetId *string `pulumi:"subnetId"`
// A mapping of tags to assign to the resource.
Tags map[string]interface{} `pulumi:"tags"`
// The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command.
Tenancy *string `pulumi:"tenancy"`
// The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see `userDataBase64` instead.
UserData *string `pulumi:"userData"`
// Can be used instead of `userData` to pass base64-encoded binary data directly. Use this instead of `userData` whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption.
UserDataBase64 *string `pulumi:"userDataBase64"`
// The start date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
ValidFrom *string `pulumi:"validFrom"`
// The end date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
ValidUntil *string `pulumi:"validUntil"`
// A mapping of tags to assign to the devices created by the instance at launch time.
VolumeTags map[string]interface{} `pulumi:"volumeTags"`
// A list of security group IDs to associate with.
VpcSecurityGroupIds []string `pulumi:"vpcSecurityGroupIds"`
// If set, this provider will
// wait for the Spot Request to be fulfilled, and will throw an error if the
// timeout of 10m is reached.
WaitForFulfillment *bool `pulumi:"waitForFulfillment"`
}
// The set of arguments for constructing a SpotInstanceRequest resource.
type SpotInstanceRequestArgs struct {
// The AMI to use for the instance.
Ami pulumi.StringInput
// Associate a public ip address with an instance in a VPC. Boolean value.
AssociatePublicIpAddress pulumi.BoolPtrInput
// The AZ to start the instance in.
AvailabilityZone pulumi.StringPtrInput
// The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
// The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
// Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
BlockDurationMinutes pulumi.IntPtrInput
// Sets the number of CPU cores for an instance. This option is
// only supported on creation of instance type that support CPU Options
// [CPU Cores and Threads Per CPU Core Per Instance Type](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html#cpu-options-supported-instances-values) - specifying this option for unsupported instance types will return an error from the EC2 API.
CpuCoreCount pulumi.IntPtrInput
// If set to to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See [Optimizing CPU Options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) for more information.
CpuThreadsPerCore pulumi.IntPtrInput
// Customize the credit specification of the instance. See Credit Specification below for more details.
CreditSpecification SpotInstanceRequestCreditSpecificationPtrInput
// If true, enables [EC2 Instance
// Termination Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingDisableAPITermination)
DisableApiTermination pulumi.BoolPtrInput
// Additional EBS block devices to attach to the
// instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection.
EbsBlockDevices SpotInstanceRequestEbsBlockDeviceArrayInput
// If true, the launched EC2 instance will be EBS-optimized.
// Note that if this is not set on an instance type that is optimized by default then
// this will show as disabled but if the instance type is optimized by default then
// there is no need to set this and there is no effect to disabling it.
// See the [EBS Optimized section](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) of the AWS User Guide for more information.
EbsOptimized pulumi.BoolPtrInput
// Customize Ephemeral (also known as
// "Instance Store") volumes on the instance. See Block Devices below for details.
EphemeralBlockDevices SpotInstanceRequestEphemeralBlockDeviceArrayInput
// If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the `passwordData` attribute. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordData.html) for more information.
GetPasswordData pulumi.BoolPtrInput
// If true, the launched EC2 instance will support hibernation.
Hibernation pulumi.BoolPtrInput
// The Id of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
HostId pulumi.StringPtrInput
// The IAM Instance Profile to
// launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the [EC2 documentation](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html#roles-usingrole-ec2instance-permissions), notably `iam:PassRole`.
// * `ipv6AddressCount`- (Optional) A number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
IamInstanceProfile pulumi.StringPtrInput
// Shutdown behavior for the
// instance. Amazon defaults this to `stop` for EBS-backed instances and
// `terminate` for instance-store instances. Cannot be set on instance-store
// instances. See [Shutdown Behavior](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingInstanceInitiatedShutdownBehavior) for more information.
InstanceInitiatedShutdownBehavior pulumi.StringPtrInput
// Indicates whether a Spot instance stops or terminates when it is interrupted. Default is `terminate` as this is the current AWS behaviour.
InstanceInterruptionBehaviour pulumi.StringPtrInput
// The type of instance to start. Updates to this field will trigger a stop/start of the EC2 instance.
InstanceType pulumi.StringInput
Ipv6AddressCount pulumi.IntPtrInput
// Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
Ipv6Addresses pulumi.StringArrayInput
// The key name of the Key Pair to use for the instance; which can be managed using the `ec2.KeyPair` resource.
KeyName pulumi.StringPtrInput
// A launch group is a group of spot instances that launch together and terminate together.
// If left empty instances are launched and terminated individually.
LaunchGroup pulumi.StringPtrInput
// Customize the metadata options of the instance. See Metadata Options below for more details.
MetadataOptions SpotInstanceRequestMetadataOptionsPtrInput
// If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
Monitoring pulumi.BoolPtrInput
// Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
NetworkInterfaces SpotInstanceRequestNetworkInterfaceArrayInput
// The Placement Group to start the instance in.
PlacementGroup pulumi.StringPtrInput
// Private IP address to associate with the
// instance in a VPC.
PrivateIp pulumi.StringPtrInput
// Customize details about the root block
// device of the instance. See Block Devices below for details.
RootBlockDevice SpotInstanceRequestRootBlockDevicePtrInput
// A list of security group names (EC2-Classic) or IDs (default VPC) to associate with.
SecurityGroups pulumi.StringArrayInput
// Controls if traffic is routed to the instance when
// the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
SourceDestCheck pulumi.BoolPtrInput
// The maximum price to request on the spot market.
SpotPrice pulumi.StringPtrInput
// If set to `one-time`, after
// the instance is terminated, the spot request will be closed.
SpotType pulumi.StringPtrInput
// The VPC Subnet ID to launch in.
SubnetId pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.MapInput
// The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command.
Tenancy pulumi.StringPtrInput
// The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see `userDataBase64` instead.
UserData pulumi.StringPtrInput
// Can be used instead of `userData` to pass base64-encoded binary data directly. Use this instead of `userData` whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption.
UserDataBase64 pulumi.StringPtrInput
// The start date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
ValidFrom pulumi.StringPtrInput
// The end date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
ValidUntil pulumi.StringPtrInput
// A mapping of tags to assign to the devices created by the instance at launch time.
VolumeTags pulumi.MapInput
// A list of security group IDs to associate with.
VpcSecurityGroupIds pulumi.StringArrayInput
// If set, this provider will
// wait for the Spot Request to be fulfilled, and will throw an error if the
// timeout of 10m is reached.
WaitForFulfillment pulumi.BoolPtrInput
}
func (SpotInstanceRequestArgs) ElementType() reflect.Type {
return reflect.TypeOf((*spotInstanceRequestArgs)(nil)).Elem()
}