-
Notifications
You must be signed in to change notification settings - Fork 117
/
zz_instance_types.go
executable file
·1382 lines (988 loc) · 84 KB
/
zz_instance_types.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
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: Apache-2.0
// Code generated by upjet. DO NOT EDIT.
package v1beta1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
v1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
)
type CPUOptionsInitParameters struct {
// Indicates whether to enable the instance for AMD SEV-SNP. AMD SEV-SNP is supported with M6a, R6a, and C6a instance types only. Valid values are enabled and disabled.
AmdSevSnp *string `json:"amdSevSnp,omitempty" tf:"amd_sev_snp,omitempty"`
// 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 - specifying this option for unsupported instance types will return an error from the EC2 API.
CoreCount *float64 `json:"coreCount,omitempty" tf:"core_count,omitempty"`
// If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.
ThreadsPerCore *float64 `json:"threadsPerCore,omitempty" tf:"threads_per_core,omitempty"`
}
type CPUOptionsObservation struct {
// Indicates whether to enable the instance for AMD SEV-SNP. AMD SEV-SNP is supported with M6a, R6a, and C6a instance types only. Valid values are enabled and disabled.
AmdSevSnp *string `json:"amdSevSnp,omitempty" tf:"amd_sev_snp,omitempty"`
// 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 - specifying this option for unsupported instance types will return an error from the EC2 API.
CoreCount *float64 `json:"coreCount,omitempty" tf:"core_count,omitempty"`
// If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.
ThreadsPerCore *float64 `json:"threadsPerCore,omitempty" tf:"threads_per_core,omitempty"`
}
type CPUOptionsParameters struct {
// Indicates whether to enable the instance for AMD SEV-SNP. AMD SEV-SNP is supported with M6a, R6a, and C6a instance types only. Valid values are enabled and disabled.
// +kubebuilder:validation:Optional
AmdSevSnp *string `json:"amdSevSnp,omitempty" tf:"amd_sev_snp,omitempty"`
// 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 - specifying this option for unsupported instance types will return an error from the EC2 API.
// +kubebuilder:validation:Optional
CoreCount *float64 `json:"coreCount,omitempty" tf:"core_count,omitempty"`
// If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.
// +kubebuilder:validation:Optional
ThreadsPerCore *float64 `json:"threadsPerCore,omitempty" tf:"threads_per_core,omitempty"`
}
type CapacityReservationSpecificationInitParameters struct {
// Indicates the instance's Capacity Reservation preferences. Can be "open" or "none". (Default: "open").
CapacityReservationPreference *string `json:"capacityReservationPreference,omitempty" tf:"capacity_reservation_preference,omitempty"`
// Information about the target Capacity Reservation. See Capacity Reservation Target below for more details.
CapacityReservationTarget []CapacityReservationTargetInitParameters `json:"capacityReservationTarget,omitempty" tf:"capacity_reservation_target,omitempty"`
}
type CapacityReservationSpecificationObservation struct {
// Indicates the instance's Capacity Reservation preferences. Can be "open" or "none". (Default: "open").
CapacityReservationPreference *string `json:"capacityReservationPreference,omitempty" tf:"capacity_reservation_preference,omitempty"`
// Information about the target Capacity Reservation. See Capacity Reservation Target below for more details.
CapacityReservationTarget []CapacityReservationTargetObservation `json:"capacityReservationTarget,omitempty" tf:"capacity_reservation_target,omitempty"`
}
type CapacityReservationSpecificationParameters struct {
// Indicates the instance's Capacity Reservation preferences. Can be "open" or "none". (Default: "open").
// +kubebuilder:validation:Optional
CapacityReservationPreference *string `json:"capacityReservationPreference,omitempty" tf:"capacity_reservation_preference,omitempty"`
// Information about the target Capacity Reservation. See Capacity Reservation Target below for more details.
// +kubebuilder:validation:Optional
CapacityReservationTarget []CapacityReservationTargetParameters `json:"capacityReservationTarget,omitempty" tf:"capacity_reservation_target,omitempty"`
}
type CapacityReservationTargetInitParameters struct {
// ID of the Capacity Reservation in which to run the instance.
CapacityReservationID *string `json:"capacityReservationId,omitempty" tf:"capacity_reservation_id,omitempty"`
// ARN of the Capacity Reservation resource group in which to run the instance.
CapacityReservationResourceGroupArn *string `json:"capacityReservationResourceGroupArn,omitempty" tf:"capacity_reservation_resource_group_arn,omitempty"`
}
type CapacityReservationTargetObservation struct {
// ID of the Capacity Reservation in which to run the instance.
CapacityReservationID *string `json:"capacityReservationId,omitempty" tf:"capacity_reservation_id,omitempty"`
// ARN of the Capacity Reservation resource group in which to run the instance.
CapacityReservationResourceGroupArn *string `json:"capacityReservationResourceGroupArn,omitempty" tf:"capacity_reservation_resource_group_arn,omitempty"`
}
type CapacityReservationTargetParameters struct {
// ID of the Capacity Reservation in which to run the instance.
// +kubebuilder:validation:Optional
CapacityReservationID *string `json:"capacityReservationId,omitempty" tf:"capacity_reservation_id,omitempty"`
// ARN of the Capacity Reservation resource group in which to run the instance.
// +kubebuilder:validation:Optional
CapacityReservationResourceGroupArn *string `json:"capacityReservationResourceGroupArn,omitempty" tf:"capacity_reservation_resource_group_arn,omitempty"`
}
type CreditSpecificationInitParameters struct {
// Credit option for CPU usage. Valid values include standard or unlimited. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
CPUCredits *string `json:"cpuCredits,omitempty" tf:"cpu_credits,omitempty"`
}
type CreditSpecificationObservation struct {
// Credit option for CPU usage. Valid values include standard or unlimited. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
CPUCredits *string `json:"cpuCredits,omitempty" tf:"cpu_credits,omitempty"`
}
type CreditSpecificationParameters struct {
// Credit option for CPU usage. Valid values include standard or unlimited. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
// +kubebuilder:validation:Optional
CPUCredits *string `json:"cpuCredits,omitempty" tf:"cpu_credits,omitempty"`
}
type EnclaveOptionsInitParameters struct {
// Whether Nitro Enclaves will be enabled on the instance. Defaults to false.
Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"`
}
type EnclaveOptionsObservation struct {
// Whether Nitro Enclaves will be enabled on the instance. Defaults to false.
Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"`
}
type EnclaveOptionsParameters struct {
// Whether Nitro Enclaves will be enabled on the instance. Defaults to false.
// +kubebuilder:validation:Optional
Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"`
}
type InstanceEBSBlockDeviceInitParameters struct {
// Whether the volume should be destroyed on instance termination. Defaults to true.
DeleteOnTermination *bool `json:"deleteOnTermination,omitempty" tf:"delete_on_termination,omitempty"`
// Name of the device to mount.
DeviceName *string `json:"deviceName,omitempty" tf:"device_name,omitempty"`
// Enables EBS encryption on the volume. Defaults to false. Cannot be used with snapshot_id. Must be configured to perform drift detection.
Encrypted *bool `json:"encrypted,omitempty" tf:"encrypted,omitempty"`
// Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
Iops *float64 `json:"iops,omitempty" tf:"iops,omitempty"`
// Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/kms/v1beta1.Key
KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"`
// Reference to a Key in kms to populate kmsKeyId.
// +kubebuilder:validation:Optional
KMSKeyIDRef *v1.Reference `json:"kmsKeyIdRef,omitempty" tf:"-"`
// Selector for a Key in kms to populate kmsKeyId.
// +kubebuilder:validation:Optional
KMSKeyIDSelector *v1.Selector `json:"kmsKeyIdSelector,omitempty" tf:"-"`
// Snapshot ID to mount.
SnapshotID *string `json:"snapshotId,omitempty" tf:"snapshot_id,omitempty"`
// Map of tags to assign to the device.
// +mapType=granular
Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"`
// Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
// +mapType=granular
TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"`
// Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"`
// Size of the volume in gibibytes (GiB).
VolumeSize *float64 `json:"volumeSize,omitempty" tf:"volume_size,omitempty"`
// Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to gp2.
VolumeType *string `json:"volumeType,omitempty" tf:"volume_type,omitempty"`
}
type InstanceEBSBlockDeviceObservation struct {
// Whether the volume should be destroyed on instance termination. Defaults to true.
DeleteOnTermination *bool `json:"deleteOnTermination,omitempty" tf:"delete_on_termination,omitempty"`
// Name of the device to mount.
DeviceName *string `json:"deviceName,omitempty" tf:"device_name,omitempty"`
// Enables EBS encryption on the volume. Defaults to false. Cannot be used with snapshot_id. Must be configured to perform drift detection.
Encrypted *bool `json:"encrypted,omitempty" tf:"encrypted,omitempty"`
// Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
Iops *float64 `json:"iops,omitempty" tf:"iops,omitempty"`
// Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"`
// Snapshot ID to mount.
SnapshotID *string `json:"snapshotId,omitempty" tf:"snapshot_id,omitempty"`
// Map of tags to assign to the device.
// +mapType=granular
Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"`
// Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
// +mapType=granular
TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"`
// Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"`
// ID of the volume. For example, the ID can be accessed like this, aws_instance.web.ebs_block_device.2.volume_id.
VolumeID *string `json:"volumeId,omitempty" tf:"volume_id,omitempty"`
// Size of the volume in gibibytes (GiB).
VolumeSize *float64 `json:"volumeSize,omitempty" tf:"volume_size,omitempty"`
// Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to gp2.
VolumeType *string `json:"volumeType,omitempty" tf:"volume_type,omitempty"`
}
type InstanceEBSBlockDeviceParameters struct {
// Whether the volume should be destroyed on instance termination. Defaults to true.
// +kubebuilder:validation:Optional
DeleteOnTermination *bool `json:"deleteOnTermination,omitempty" tf:"delete_on_termination,omitempty"`
// Name of the device to mount.
// +kubebuilder:validation:Optional
DeviceName *string `json:"deviceName" tf:"device_name,omitempty"`
// Enables EBS encryption on the volume. Defaults to false. Cannot be used with snapshot_id. Must be configured to perform drift detection.
// +kubebuilder:validation:Optional
Encrypted *bool `json:"encrypted,omitempty" tf:"encrypted,omitempty"`
// Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
// +kubebuilder:validation:Optional
Iops *float64 `json:"iops,omitempty" tf:"iops,omitempty"`
// Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/kms/v1beta1.Key
// +kubebuilder:validation:Optional
KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"`
// Reference to a Key in kms to populate kmsKeyId.
// +kubebuilder:validation:Optional
KMSKeyIDRef *v1.Reference `json:"kmsKeyIdRef,omitempty" tf:"-"`
// Selector for a Key in kms to populate kmsKeyId.
// +kubebuilder:validation:Optional
KMSKeyIDSelector *v1.Selector `json:"kmsKeyIdSelector,omitempty" tf:"-"`
// Snapshot ID to mount.
// +kubebuilder:validation:Optional
SnapshotID *string `json:"snapshotId,omitempty" tf:"snapshot_id,omitempty"`
// Map of tags to assign to the device.
// +kubebuilder:validation:Optional
// +mapType=granular
Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"`
// Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
// +kubebuilder:validation:Optional
// +mapType=granular
TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"`
// Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
// +kubebuilder:validation:Optional
Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"`
// Size of the volume in gibibytes (GiB).
// +kubebuilder:validation:Optional
VolumeSize *float64 `json:"volumeSize,omitempty" tf:"volume_size,omitempty"`
// Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to gp2.
// +kubebuilder:validation:Optional
VolumeType *string `json:"volumeType,omitempty" tf:"volume_type,omitempty"`
}
type InstanceEphemeralBlockDeviceInitParameters struct {
// Name of the block device to mount on the instance.
DeviceName *string `json:"deviceName,omitempty" tf:"device_name,omitempty"`
// Suppresses the specified device included in the AMI's block device mapping.
NoDevice *bool `json:"noDevice,omitempty" tf:"no_device,omitempty"`
// Instance Store Device Name (e.g., ephemeral0).
VirtualName *string `json:"virtualName,omitempty" tf:"virtual_name,omitempty"`
}
type InstanceEphemeralBlockDeviceObservation struct {
// Name of the block device to mount on the instance.
DeviceName *string `json:"deviceName,omitempty" tf:"device_name,omitempty"`
// Suppresses the specified device included in the AMI's block device mapping.
NoDevice *bool `json:"noDevice,omitempty" tf:"no_device,omitempty"`
// Instance Store Device Name (e.g., ephemeral0).
VirtualName *string `json:"virtualName,omitempty" tf:"virtual_name,omitempty"`
}
type InstanceEphemeralBlockDeviceParameters struct {
// Name of the block device to mount on the instance.
// +kubebuilder:validation:Optional
DeviceName *string `json:"deviceName" tf:"device_name,omitempty"`
// Suppresses the specified device included in the AMI's block device mapping.
// +kubebuilder:validation:Optional
NoDevice *bool `json:"noDevice,omitempty" tf:"no_device,omitempty"`
// Instance Store Device Name (e.g., ephemeral0).
// +kubebuilder:validation:Optional
VirtualName *string `json:"virtualName,omitempty" tf:"virtual_name,omitempty"`
}
type InstanceInitParameters struct {
// AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
AMI *string `json:"ami,omitempty" tf:"ami,omitempty"`
// Whether to associate a public IP address with an instance in a VPC.
AssociatePublicIPAddress *bool `json:"associatePublicIpAddress,omitempty" tf:"associate_public_ip_address,omitempty"`
// AZ to start the instance in.
AvailabilityZone *string `json:"availabilityZone,omitempty" tf:"availability_zone,omitempty"`
// 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 - specifying this option for unsupported instance types will return an error from the EC2 API.
CPUCoreCount *float64 `json:"cpuCoreCount,omitempty" tf:"cpu_core_count,omitempty"`
// The CPU options for the instance. See CPU Options below for more details.
CPUOptions []CPUOptionsInitParameters `json:"cpuOptions,omitempty" tf:"cpu_options,omitempty"`
// If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.
CPUThreadsPerCore *float64 `json:"cpuThreadsPerCore,omitempty" tf:"cpu_threads_per_core,omitempty"`
// Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
CapacityReservationSpecification []CapacityReservationSpecificationInitParameters `json:"capacityReservationSpecification,omitempty" tf:"capacity_reservation_specification,omitempty"`
// Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
CreditSpecification []CreditSpecificationInitParameters `json:"creditSpecification,omitempty" tf:"credit_specification,omitempty"`
// If true, enables EC2 Instance Stop Protection.
DisableAPIStop *bool `json:"disableApiStop,omitempty" tf:"disable_api_stop,omitempty"`
// If true, enables EC2 Instance Termination Protection.
DisableAPITermination *bool `json:"disableApiTermination,omitempty" tf:"disable_api_termination,omitempty"`
// One or more configuration blocks with 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. When accessing this as an attribute reference, it is a set of objects.
EBSBlockDevice []InstanceEBSBlockDeviceInitParameters `json:"ebsBlockDevice,omitempty" tf:"ebs_block_device,omitempty"`
// 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 of the AWS User Guide for more information.
EBSOptimized *bool `json:"ebsOptimized,omitempty" tf:"ebs_optimized,omitempty"`
// Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
EnclaveOptions []EnclaveOptionsInitParameters `json:"enclaveOptions,omitempty" tf:"enclave_options,omitempty"`
// One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
EphemeralBlockDevice []InstanceEphemeralBlockDeviceInitParameters `json:"ephemeralBlockDevice,omitempty" tf:"ephemeral_block_device,omitempty"`
// 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 password_data attribute. See GetPasswordData for more information.
GetPasswordData *bool `json:"getPasswordData,omitempty" tf:"get_password_data,omitempty"`
// If true, the launched EC2 instance will support hibernation.
Hibernation *bool `json:"hibernation,omitempty" tf:"hibernation,omitempty"`
// 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 `json:"hostId,omitempty" tf:"host_id,omitempty"`
// ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
HostResourceGroupArn *string `json:"hostResourceGroupArn,omitempty" tf:"host_resource_group_arn,omitempty"`
// 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, notably iam:PassRole.
IAMInstanceProfile *string `json:"iamInstanceProfile,omitempty" tf:"iam_instance_profile,omitempty"`
// Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
IPv6AddressCount *float64 `json:"ipv6AddressCount,omitempty" tf:"ipv6_address_count,omitempty"`
// Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
IPv6Addresses []*string `json:"ipv6Addresses,omitempty" tf:"ipv6_addresses,omitempty"`
// 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 for more information.
InstanceInitiatedShutdownBehavior *string `json:"instanceInitiatedShutdownBehavior,omitempty" tf:"instance_initiated_shutdown_behavior,omitempty"`
// Describes the market (purchasing) option for the instances. See Market Options below for details on attributes.
InstanceMarketOptions []InstanceMarketOptionsInitParameters `json:"instanceMarketOptions,omitempty" tf:"instance_market_options,omitempty"`
// Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
InstanceType *string `json:"instanceType,omitempty" tf:"instance_type,omitempty"`
// Key name of the Key Pair to use for the instance; which can be managed using the .
KeyName *string `json:"keyName,omitempty" tf:"key_name,omitempty"`
// Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
LaunchTemplate []LaunchTemplateInitParameters `json:"launchTemplate,omitempty" tf:"launch_template,omitempty"`
// Maintenance and recovery options for the instance. See Maintenance Options below for more details.
MaintenanceOptions []MaintenanceOptionsInitParameters `json:"maintenanceOptions,omitempty" tf:"maintenance_options,omitempty"`
// Customize the metadata options of the instance. See Metadata Options below for more details.
MetadataOptions []MetadataOptionsInitParameters `json:"metadataOptions,omitempty" tf:"metadata_options,omitempty"`
// If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
Monitoring *bool `json:"monitoring,omitempty" tf:"monitoring,omitempty"`
// Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
NetworkInterface []InstanceNetworkInterfaceInitParameters `json:"networkInterface,omitempty" tf:"network_interface,omitempty"`
// Placement Group to start the instance in.
PlacementGroup *string `json:"placementGroup,omitempty" tf:"placement_group,omitempty"`
// Number of the partition the instance is in. Valid only if the strategy argument is set to "partition".
PlacementPartitionNumber *float64 `json:"placementPartitionNumber,omitempty" tf:"placement_partition_number,omitempty"`
// Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
PrivateDNSNameOptions []PrivateDNSNameOptionsInitParameters `json:"privateDnsNameOptions,omitempty" tf:"private_dns_name_options,omitempty"`
// Private IP address to associate with the instance in a VPC.
PrivateIP *string `json:"privateIp,omitempty" tf:"private_ip,omitempty"`
// Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
RootBlockDevice []RootBlockDeviceInitParameters `json:"rootBlockDevice,omitempty" tf:"root_block_device,omitempty"`
// List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
// +listType=set
SecondaryPrivateIps []*string `json:"secondaryPrivateIps,omitempty" tf:"secondary_private_ips,omitempty"`
// 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 `json:"sourceDestCheck,omitempty" tf:"source_dest_check,omitempty"`
// VPC Subnet ID to launch in.
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/ec2/v1beta1.Subnet
SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"`
// Reference to a Subnet in ec2 to populate subnetId.
// +kubebuilder:validation:Optional
SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"`
// Selector for a Subnet in ec2 to populate subnetId.
// +kubebuilder:validation:Optional
SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"`
// Key-value map of resource tags.
// +mapType=granular
Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"`
// 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. Valid values are default, dedicated, and host.
Tenancy *string `json:"tenancy,omitempty" tf:"tenancy,omitempty"`
// User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
UserData *string `json:"userData,omitempty" tf:"user_data,omitempty"`
// Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data 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. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
UserDataBase64 *string `json:"userDataBase64,omitempty" tf:"user_data_base64,omitempty"`
// When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
UserDataReplaceOnChange *bool `json:"userDataReplaceOnChange,omitempty" tf:"user_data_replace_on_change,omitempty"`
// References to SecurityGroup in ec2 to populate vpcSecurityGroupIds.
// +kubebuilder:validation:Optional
VPCSecurityGroupIDRefs []v1.Reference `json:"vpcSecurityGroupIdRefs,omitempty" tf:"-"`
// Selector for a list of SecurityGroup in ec2 to populate vpcSecurityGroupIds.
// +kubebuilder:validation:Optional
VPCSecurityGroupIDSelector *v1.Selector `json:"vpcSecurityGroupIdSelector,omitempty" tf:"-"`
// List of security group IDs to associate with.
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/ec2/v1beta1.SecurityGroup
// +crossplane:generate:reference:refFieldName=VPCSecurityGroupIDRefs
// +crossplane:generate:reference:selectorFieldName=VPCSecurityGroupIDSelector
// +listType=set
VPCSecurityGroupIds []*string `json:"vpcSecurityGroupIds,omitempty" tf:"vpc_security_group_ids,omitempty"`
// Map of tags to assign, at instance-creation time, to root and EBS volumes.
// +mapType=granular
VolumeTags map[string]*string `json:"volumeTags,omitempty" tf:"volume_tags,omitempty"`
}
type InstanceMarketOptionsInitParameters struct {
// Type of market for the instance. Valid value is spot. Defaults to spot. Required if spot_options is specified.
MarketType *string `json:"marketType,omitempty" tf:"market_type,omitempty"`
// Block to configure the options for Spot Instances. See Spot Options below for details on attributes.
SpotOptions []SpotOptionsInitParameters `json:"spotOptions,omitempty" tf:"spot_options,omitempty"`
}
type InstanceMarketOptionsObservation struct {
// Type of market for the instance. Valid value is spot. Defaults to spot. Required if spot_options is specified.
MarketType *string `json:"marketType,omitempty" tf:"market_type,omitempty"`
// Block to configure the options for Spot Instances. See Spot Options below for details on attributes.
SpotOptions []SpotOptionsObservation `json:"spotOptions,omitempty" tf:"spot_options,omitempty"`
}
type InstanceMarketOptionsParameters struct {
// Type of market for the instance. Valid value is spot. Defaults to spot. Required if spot_options is specified.
// +kubebuilder:validation:Optional
MarketType *string `json:"marketType,omitempty" tf:"market_type,omitempty"`
// Block to configure the options for Spot Instances. See Spot Options below for details on attributes.
// +kubebuilder:validation:Optional
SpotOptions []SpotOptionsParameters `json:"spotOptions,omitempty" tf:"spot_options,omitempty"`
}
type InstanceNetworkInterfaceInitParameters struct {
// Whether or not to delete the network interface on instance termination. Defaults to false. Currently, the only valid value is false, as this is only supported when creating new network interfaces when launching an instance.
DeleteOnTermination *bool `json:"deleteOnTermination,omitempty" tf:"delete_on_termination,omitempty"`
// Integer index of the network interface attachment. Limited by instance type.
DeviceIndex *float64 `json:"deviceIndex,omitempty" tf:"device_index,omitempty"`
// Integer index of the network card. Limited by instance type. The default index is 0.
NetworkCardIndex *float64 `json:"networkCardIndex,omitempty" tf:"network_card_index,omitempty"`
// ID of the network interface to attach.
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/ec2/v1beta1.NetworkInterface
NetworkInterfaceID *string `json:"networkInterfaceId,omitempty" tf:"network_interface_id,omitempty"`
// Reference to a NetworkInterface in ec2 to populate networkInterfaceId.
// +kubebuilder:validation:Optional
NetworkInterfaceIDRef *v1.Reference `json:"networkInterfaceIdRef,omitempty" tf:"-"`
// Selector for a NetworkInterface in ec2 to populate networkInterfaceId.
// +kubebuilder:validation:Optional
NetworkInterfaceIDSelector *v1.Selector `json:"networkInterfaceIdSelector,omitempty" tf:"-"`
}
type InstanceNetworkInterfaceObservation struct {
// Whether or not to delete the network interface on instance termination. Defaults to false. Currently, the only valid value is false, as this is only supported when creating new network interfaces when launching an instance.
DeleteOnTermination *bool `json:"deleteOnTermination,omitempty" tf:"delete_on_termination,omitempty"`
// Integer index of the network interface attachment. Limited by instance type.
DeviceIndex *float64 `json:"deviceIndex,omitempty" tf:"device_index,omitempty"`
// Integer index of the network card. Limited by instance type. The default index is 0.
NetworkCardIndex *float64 `json:"networkCardIndex,omitempty" tf:"network_card_index,omitempty"`
// ID of the network interface to attach.
NetworkInterfaceID *string `json:"networkInterfaceId,omitempty" tf:"network_interface_id,omitempty"`
}
type InstanceNetworkInterfaceParameters struct {
// Whether or not to delete the network interface on instance termination. Defaults to false. Currently, the only valid value is false, as this is only supported when creating new network interfaces when launching an instance.
// +kubebuilder:validation:Optional
DeleteOnTermination *bool `json:"deleteOnTermination,omitempty" tf:"delete_on_termination,omitempty"`
// Integer index of the network interface attachment. Limited by instance type.
// +kubebuilder:validation:Optional
DeviceIndex *float64 `json:"deviceIndex" tf:"device_index,omitempty"`
// Integer index of the network card. Limited by instance type. The default index is 0.
// +kubebuilder:validation:Optional
NetworkCardIndex *float64 `json:"networkCardIndex,omitempty" tf:"network_card_index,omitempty"`
// ID of the network interface to attach.
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/ec2/v1beta1.NetworkInterface
// +kubebuilder:validation:Optional
NetworkInterfaceID *string `json:"networkInterfaceId,omitempty" tf:"network_interface_id,omitempty"`
// Reference to a NetworkInterface in ec2 to populate networkInterfaceId.
// +kubebuilder:validation:Optional
NetworkInterfaceIDRef *v1.Reference `json:"networkInterfaceIdRef,omitempty" tf:"-"`
// Selector for a NetworkInterface in ec2 to populate networkInterfaceId.
// +kubebuilder:validation:Optional
NetworkInterfaceIDSelector *v1.Selector `json:"networkInterfaceIdSelector,omitempty" tf:"-"`
}
type InstanceObservation struct {
// AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
AMI *string `json:"ami,omitempty" tf:"ami,omitempty"`
// ARN of the instance.
Arn *string `json:"arn,omitempty" tf:"arn,omitempty"`
// Whether to associate a public IP address with an instance in a VPC.
AssociatePublicIPAddress *bool `json:"associatePublicIpAddress,omitempty" tf:"associate_public_ip_address,omitempty"`
// AZ to start the instance in.
AvailabilityZone *string `json:"availabilityZone,omitempty" tf:"availability_zone,omitempty"`
// 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 - specifying this option for unsupported instance types will return an error from the EC2 API.
CPUCoreCount *float64 `json:"cpuCoreCount,omitempty" tf:"cpu_core_count,omitempty"`
// The CPU options for the instance. See CPU Options below for more details.
CPUOptions []CPUOptionsObservation `json:"cpuOptions,omitempty" tf:"cpu_options,omitempty"`
// If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.
CPUThreadsPerCore *float64 `json:"cpuThreadsPerCore,omitempty" tf:"cpu_threads_per_core,omitempty"`
// Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
CapacityReservationSpecification []CapacityReservationSpecificationObservation `json:"capacityReservationSpecification,omitempty" tf:"capacity_reservation_specification,omitempty"`
// Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
CreditSpecification []CreditSpecificationObservation `json:"creditSpecification,omitempty" tf:"credit_specification,omitempty"`
// If true, enables EC2 Instance Stop Protection.
DisableAPIStop *bool `json:"disableApiStop,omitempty" tf:"disable_api_stop,omitempty"`
// If true, enables EC2 Instance Termination Protection.
DisableAPITermination *bool `json:"disableApiTermination,omitempty" tf:"disable_api_termination,omitempty"`
// One or more configuration blocks with 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. When accessing this as an attribute reference, it is a set of objects.
EBSBlockDevice []InstanceEBSBlockDeviceObservation `json:"ebsBlockDevice,omitempty" tf:"ebs_block_device,omitempty"`
// 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 of the AWS User Guide for more information.
EBSOptimized *bool `json:"ebsOptimized,omitempty" tf:"ebs_optimized,omitempty"`
// Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
EnclaveOptions []EnclaveOptionsObservation `json:"enclaveOptions,omitempty" tf:"enclave_options,omitempty"`
// One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
EphemeralBlockDevice []InstanceEphemeralBlockDeviceObservation `json:"ephemeralBlockDevice,omitempty" tf:"ephemeral_block_device,omitempty"`
// 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 password_data attribute. See GetPasswordData for more information.
GetPasswordData *bool `json:"getPasswordData,omitempty" tf:"get_password_data,omitempty"`
// If true, the launched EC2 instance will support hibernation.
Hibernation *bool `json:"hibernation,omitempty" tf:"hibernation,omitempty"`
// 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 `json:"hostId,omitempty" tf:"host_id,omitempty"`
// ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
HostResourceGroupArn *string `json:"hostResourceGroupArn,omitempty" tf:"host_resource_group_arn,omitempty"`
// 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, notably iam:PassRole.
IAMInstanceProfile *string `json:"iamInstanceProfile,omitempty" tf:"iam_instance_profile,omitempty"`
// ID of the instance.
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
IPv6AddressCount *float64 `json:"ipv6AddressCount,omitempty" tf:"ipv6_address_count,omitempty"`
// Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
IPv6Addresses []*string `json:"ipv6Addresses,omitempty" tf:"ipv6_addresses,omitempty"`
// 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 for more information.
InstanceInitiatedShutdownBehavior *string `json:"instanceInitiatedShutdownBehavior,omitempty" tf:"instance_initiated_shutdown_behavior,omitempty"`
// Indicates whether this is a Spot Instance or a Scheduled Instance.
InstanceLifecycle *string `json:"instanceLifecycle,omitempty" tf:"instance_lifecycle,omitempty"`
// Describes the market (purchasing) option for the instances. See Market Options below for details on attributes.
InstanceMarketOptions []InstanceMarketOptionsObservation `json:"instanceMarketOptions,omitempty" tf:"instance_market_options,omitempty"`
// State of the instance. One of: pending, running, shutting-down, terminated, stopping, stopped. See Instance Lifecycle for more information.
InstanceState *string `json:"instanceState,omitempty" tf:"instance_state,omitempty"`
// Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
InstanceType *string `json:"instanceType,omitempty" tf:"instance_type,omitempty"`
// Key name of the Key Pair to use for the instance; which can be managed using the .
KeyName *string `json:"keyName,omitempty" tf:"key_name,omitempty"`
// Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
LaunchTemplate []LaunchTemplateObservation `json:"launchTemplate,omitempty" tf:"launch_template,omitempty"`
// Maintenance and recovery options for the instance. See Maintenance Options below for more details.
MaintenanceOptions []MaintenanceOptionsObservation `json:"maintenanceOptions,omitempty" tf:"maintenance_options,omitempty"`
// Customize the metadata options of the instance. See Metadata Options below for more details.
MetadataOptions []MetadataOptionsObservation `json:"metadataOptions,omitempty" tf:"metadata_options,omitempty"`
// If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
Monitoring *bool `json:"monitoring,omitempty" tf:"monitoring,omitempty"`
// Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
NetworkInterface []InstanceNetworkInterfaceObservation `json:"networkInterface,omitempty" tf:"network_interface,omitempty"`
// ARN of the Outpost the instance is assigned to.
OutpostArn *string `json:"outpostArn,omitempty" tf:"outpost_arn,omitempty"`
// Base-64 encoded encrypted password data for the instance. Useful for getting the administrator password for instances running Microsoft Windows. This attribute is only exported if get_password_data is true. Note that this encrypted value will be stored in the state file, as with all exported attributes. See GetPasswordData for more information.
PasswordData *string `json:"passwordData,omitempty" tf:"password_data,omitempty"`
// Placement Group to start the instance in.
PlacementGroup *string `json:"placementGroup,omitempty" tf:"placement_group,omitempty"`
// Number of the partition the instance is in. Valid only if the strategy argument is set to "partition".
PlacementPartitionNumber *float64 `json:"placementPartitionNumber,omitempty" tf:"placement_partition_number,omitempty"`
// ID of the instance's primary network interface.
PrimaryNetworkInterfaceID *string `json:"primaryNetworkInterfaceId,omitempty" tf:"primary_network_interface_id,omitempty"`
// 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 `json:"privateDns,omitempty" tf:"private_dns,omitempty"`
// Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
PrivateDNSNameOptions []PrivateDNSNameOptionsObservation `json:"privateDnsNameOptions,omitempty" tf:"private_dns_name_options,omitempty"`
// Private IP address to associate with the instance in a VPC.
PrivateIP *string `json:"privateIp,omitempty" tf:"private_ip,omitempty"`
// 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 `json:"publicDns,omitempty" tf:"public_dns,omitempty"`
// Public IP address assigned to the instance, if applicable. NOTE: If you are using an aws_eip with your instance, you should refer to the EIP's address directly and not use public_ip as this field will change after the EIP is attached.
PublicIP *string `json:"publicIp,omitempty" tf:"public_ip,omitempty"`
// Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
RootBlockDevice []RootBlockDeviceObservation `json:"rootBlockDevice,omitempty" tf:"root_block_device,omitempty"`
// List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
// +listType=set
SecondaryPrivateIps []*string `json:"secondaryPrivateIps,omitempty" tf:"secondary_private_ips,omitempty"`
// List of security group names to associate with.
// +listType=set
SecurityGroups []*string `json:"securityGroups,omitempty" tf:"security_groups,omitempty"`
// 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 `json:"sourceDestCheck,omitempty" tf:"source_dest_check,omitempty"`
// If the request is a Spot Instance request, the ID of the request.
SpotInstanceRequestID *string `json:"spotInstanceRequestId,omitempty" tf:"spot_instance_request_id,omitempty"`
// VPC Subnet ID to launch in.
SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"`
// Key-value map of resource tags.
// +mapType=granular
Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"`
// Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
// +mapType=granular
TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"`
// 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. Valid values are default, dedicated, and host.
Tenancy *string `json:"tenancy,omitempty" tf:"tenancy,omitempty"`
// User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
UserData *string `json:"userData,omitempty" tf:"user_data,omitempty"`
// Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data 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. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
UserDataBase64 *string `json:"userDataBase64,omitempty" tf:"user_data_base64,omitempty"`
// When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
UserDataReplaceOnChange *bool `json:"userDataReplaceOnChange,omitempty" tf:"user_data_replace_on_change,omitempty"`
// List of security group IDs to associate with.
// +listType=set
VPCSecurityGroupIds []*string `json:"vpcSecurityGroupIds,omitempty" tf:"vpc_security_group_ids,omitempty"`
// Map of tags to assign, at instance-creation time, to root and EBS volumes.
// +mapType=granular
VolumeTags map[string]*string `json:"volumeTags,omitempty" tf:"volume_tags,omitempty"`
}
type InstanceParameters struct {
// AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
// +kubebuilder:validation:Optional
AMI *string `json:"ami,omitempty" tf:"ami,omitempty"`
// Whether to associate a public IP address with an instance in a VPC.
// +kubebuilder:validation:Optional
AssociatePublicIPAddress *bool `json:"associatePublicIpAddress,omitempty" tf:"associate_public_ip_address,omitempty"`
// AZ to start the instance in.
// +kubebuilder:validation:Optional
AvailabilityZone *string `json:"availabilityZone,omitempty" tf:"availability_zone,omitempty"`
// 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 - specifying this option for unsupported instance types will return an error from the EC2 API.
// +kubebuilder:validation:Optional
CPUCoreCount *float64 `json:"cpuCoreCount,omitempty" tf:"cpu_core_count,omitempty"`
// The CPU options for the instance. See CPU Options below for more details.
// +kubebuilder:validation:Optional
CPUOptions []CPUOptionsParameters `json:"cpuOptions,omitempty" tf:"cpu_options,omitempty"`
// If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.
// +kubebuilder:validation:Optional
CPUThreadsPerCore *float64 `json:"cpuThreadsPerCore,omitempty" tf:"cpu_threads_per_core,omitempty"`
// Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
// +kubebuilder:validation:Optional
CapacityReservationSpecification []CapacityReservationSpecificationParameters `json:"capacityReservationSpecification,omitempty" tf:"capacity_reservation_specification,omitempty"`
// Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
// +kubebuilder:validation:Optional
CreditSpecification []CreditSpecificationParameters `json:"creditSpecification,omitempty" tf:"credit_specification,omitempty"`
// If true, enables EC2 Instance Stop Protection.
// +kubebuilder:validation:Optional
DisableAPIStop *bool `json:"disableApiStop,omitempty" tf:"disable_api_stop,omitempty"`
// If true, enables EC2 Instance Termination Protection.
// +kubebuilder:validation:Optional
DisableAPITermination *bool `json:"disableApiTermination,omitempty" tf:"disable_api_termination,omitempty"`
// One or more configuration blocks with 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. When accessing this as an attribute reference, it is a set of objects.
// +kubebuilder:validation:Optional
EBSBlockDevice []InstanceEBSBlockDeviceParameters `json:"ebsBlockDevice,omitempty" tf:"ebs_block_device,omitempty"`
// 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 of the AWS User Guide for more information.
// +kubebuilder:validation:Optional
EBSOptimized *bool `json:"ebsOptimized,omitempty" tf:"ebs_optimized,omitempty"`
// Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
// +kubebuilder:validation:Optional
EnclaveOptions []EnclaveOptionsParameters `json:"enclaveOptions,omitempty" tf:"enclave_options,omitempty"`
// One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
// +kubebuilder:validation:Optional
EphemeralBlockDevice []InstanceEphemeralBlockDeviceParameters `json:"ephemeralBlockDevice,omitempty" tf:"ephemeral_block_device,omitempty"`
// 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 password_data attribute. See GetPasswordData for more information.
// +kubebuilder:validation:Optional
GetPasswordData *bool `json:"getPasswordData,omitempty" tf:"get_password_data,omitempty"`
// If true, the launched EC2 instance will support hibernation.
// +kubebuilder:validation:Optional
Hibernation *bool `json:"hibernation,omitempty" tf:"hibernation,omitempty"`
// 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.
// +kubebuilder:validation:Optional
HostID *string `json:"hostId,omitempty" tf:"host_id,omitempty"`
// ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
// +kubebuilder:validation:Optional
HostResourceGroupArn *string `json:"hostResourceGroupArn,omitempty" tf:"host_resource_group_arn,omitempty"`
// 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, notably iam:PassRole.
// +kubebuilder:validation:Optional
IAMInstanceProfile *string `json:"iamInstanceProfile,omitempty" tf:"iam_instance_profile,omitempty"`
// Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
// +kubebuilder:validation:Optional
IPv6AddressCount *float64 `json:"ipv6AddressCount,omitempty" tf:"ipv6_address_count,omitempty"`
// Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
// +kubebuilder:validation:Optional
IPv6Addresses []*string `json:"ipv6Addresses,omitempty" tf:"ipv6_addresses,omitempty"`
// 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 for more information.
// +kubebuilder:validation:Optional
InstanceInitiatedShutdownBehavior *string `json:"instanceInitiatedShutdownBehavior,omitempty" tf:"instance_initiated_shutdown_behavior,omitempty"`
// Describes the market (purchasing) option for the instances. See Market Options below for details on attributes.
// +kubebuilder:validation:Optional
InstanceMarketOptions []InstanceMarketOptionsParameters `json:"instanceMarketOptions,omitempty" tf:"instance_market_options,omitempty"`
// Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
// +kubebuilder:validation:Optional
InstanceType *string `json:"instanceType,omitempty" tf:"instance_type,omitempty"`
// Key name of the Key Pair to use for the instance; which can be managed using the .
// +kubebuilder:validation:Optional
KeyName *string `json:"keyName,omitempty" tf:"key_name,omitempty"`
// Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
// +kubebuilder:validation:Optional
LaunchTemplate []LaunchTemplateParameters `json:"launchTemplate,omitempty" tf:"launch_template,omitempty"`
// Maintenance and recovery options for the instance. See Maintenance Options below for more details.
// +kubebuilder:validation:Optional
MaintenanceOptions []MaintenanceOptionsParameters `json:"maintenanceOptions,omitempty" tf:"maintenance_options,omitempty"`
// Customize the metadata options of the instance. See Metadata Options below for more details.
// +kubebuilder:validation:Optional
MetadataOptions []MetadataOptionsParameters `json:"metadataOptions,omitempty" tf:"metadata_options,omitempty"`
// If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
// +kubebuilder:validation:Optional
Monitoring *bool `json:"monitoring,omitempty" tf:"monitoring,omitempty"`
// Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
// +kubebuilder:validation:Optional
NetworkInterface []InstanceNetworkInterfaceParameters `json:"networkInterface,omitempty" tf:"network_interface,omitempty"`
// Placement Group to start the instance in.
// +kubebuilder:validation:Optional
PlacementGroup *string `json:"placementGroup,omitempty" tf:"placement_group,omitempty"`
// Number of the partition the instance is in. Valid only if the strategy argument is set to "partition".
// +kubebuilder:validation:Optional
PlacementPartitionNumber *float64 `json:"placementPartitionNumber,omitempty" tf:"placement_partition_number,omitempty"`
// Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
// +kubebuilder:validation:Optional
PrivateDNSNameOptions []PrivateDNSNameOptionsParameters `json:"privateDnsNameOptions,omitempty" tf:"private_dns_name_options,omitempty"`
// Private IP address to associate with the instance in a VPC.
// +kubebuilder:validation:Optional
PrivateIP *string `json:"privateIp,omitempty" tf:"private_ip,omitempty"`
// Region is the region you'd like your resource to be created in.
// +upjet:crd:field:TFTag=-
// +kubebuilder:validation:Required
Region *string `json:"region" tf:"-"`
// Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
// +kubebuilder:validation:Optional
RootBlockDevice []RootBlockDeviceParameters `json:"rootBlockDevice,omitempty" tf:"root_block_device,omitempty"`
// List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
// +kubebuilder:validation:Optional
// +listType=set
SecondaryPrivateIps []*string `json:"secondaryPrivateIps,omitempty" tf:"secondary_private_ips,omitempty"`
// Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
// +kubebuilder:validation:Optional
SourceDestCheck *bool `json:"sourceDestCheck,omitempty" tf:"source_dest_check,omitempty"`
// VPC Subnet ID to launch in.
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/ec2/v1beta1.Subnet
// +kubebuilder:validation:Optional
SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"`
// Reference to a Subnet in ec2 to populate subnetId.
// +kubebuilder:validation:Optional
SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"`
// Selector for a Subnet in ec2 to populate subnetId.
// +kubebuilder:validation:Optional
SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"`
// Key-value map of resource tags.
// +kubebuilder:validation:Optional
// +mapType=granular
Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"`
// 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. Valid values are default, dedicated, and host.
// +kubebuilder:validation:Optional
Tenancy *string `json:"tenancy,omitempty" tf:"tenancy,omitempty"`
// User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
// +kubebuilder:validation:Optional
UserData *string `json:"userData,omitempty" tf:"user_data,omitempty"`
// Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data 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. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
// +kubebuilder:validation:Optional
UserDataBase64 *string `json:"userDataBase64,omitempty" tf:"user_data_base64,omitempty"`
// When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
// +kubebuilder:validation:Optional
UserDataReplaceOnChange *bool `json:"userDataReplaceOnChange,omitempty" tf:"user_data_replace_on_change,omitempty"`
// References to SecurityGroup in ec2 to populate vpcSecurityGroupIds.
// +kubebuilder:validation:Optional
VPCSecurityGroupIDRefs []v1.Reference `json:"vpcSecurityGroupIdRefs,omitempty" tf:"-"`
// Selector for a list of SecurityGroup in ec2 to populate vpcSecurityGroupIds.
// +kubebuilder:validation:Optional
VPCSecurityGroupIDSelector *v1.Selector `json:"vpcSecurityGroupIdSelector,omitempty" tf:"-"`
// List of security group IDs to associate with.
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/ec2/v1beta1.SecurityGroup
// +crossplane:generate:reference:refFieldName=VPCSecurityGroupIDRefs
// +crossplane:generate:reference:selectorFieldName=VPCSecurityGroupIDSelector
// +kubebuilder:validation:Optional
// +listType=set
VPCSecurityGroupIds []*string `json:"vpcSecurityGroupIds,omitempty" tf:"vpc_security_group_ids,omitempty"`
// Map of tags to assign, at instance-creation time, to root and EBS volumes.
// +kubebuilder:validation:Optional
// +mapType=granular
VolumeTags map[string]*string `json:"volumeTags,omitempty" tf:"volume_tags,omitempty"`
}
type LaunchTemplateInitParameters struct {
// ID of the launch template. Conflicts with name.
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// Name of the launch template. Conflicts with id.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Template version. Can be a specific version number, $Latest or $Default. The default value is $Default.
Version *string `json:"version,omitempty" tf:"version,omitempty"`
}