@@ -41,7 +41,7 @@ func isSupportedFromString(instanceTypeValue *string, target *string) bool {
4141 if instanceTypeValue == nil {
4242 return false
4343 }
44- return * instanceTypeValue == * target
44+ return strings . EqualFold ( * instanceTypeValue , * target )
4545}
4646
4747func isSupportedFromStrings (instanceTypeValues []* string , target * string ) bool {
@@ -83,7 +83,7 @@ func isSupportedUsageClassType(instanceTypeValue []ec2types.UsageClassType, targ
8383 }
8484
8585 for _ , potentialType := range instanceTypeValue {
86- if potentialType == * target {
86+ if strings . EqualFold ( string ( potentialType ), string ( * target )) {
8787 return true
8888 }
8989 }
@@ -102,7 +102,7 @@ func isSupportedArchitectureType(instanceTypeValue []ec2types.ArchitectureType,
102102 }
103103
104104 for _ , potentialType := range instanceTypeValue {
105- if potentialType == * target {
105+ if strings . EqualFold ( string ( potentialType ), string ( * target )) {
106106 return true
107107 }
108108 }
@@ -120,7 +120,7 @@ func isSupportedVirtualizationType(instanceTypeValue []ec2types.VirtualizationTy
120120 return true
121121 }
122122 for _ , potentialType := range instanceTypeValue {
123- if potentialType == * target {
123+ if strings . EqualFold ( string ( potentialType ), string ( * target )) {
124124 return true
125125 }
126126 }
@@ -134,7 +134,7 @@ func isSupportedInstanceTypeHypervisorType(instanceTypeValue ec2types.InstanceTy
134134 if reflect .ValueOf (* target ).IsZero () {
135135 return true
136136 }
137- if instanceTypeValue == * target {
137+ if strings . EqualFold ( string ( instanceTypeValue ), string ( * target )) {
138138 return true
139139 }
140140 return false
@@ -151,7 +151,7 @@ func isSupportedRootDeviceType(instanceTypeValue []ec2types.RootDeviceType, targ
151151 return true
152152 }
153153 for _ , potentialType := range instanceTypeValue {
154- if potentialType == * target {
154+ if strings . EqualFold ( string ( potentialType ), string ( * target )) {
155155 return true
156156 }
157157 }
@@ -165,7 +165,7 @@ func isMatchingCpuArchitecture(instanceTypeValue CPUManufacturer, target *CPUMan
165165 if reflect .ValueOf (* target ).IsZero () {
166166 return true
167167 }
168- if instanceTypeValue == * target {
168+ if strings . EqualFold ( string ( instanceTypeValue ), string ( * target )) {
169169 return true
170170 }
171171 return false
@@ -376,19 +376,6 @@ func getEBSOptimizedBaselineIOPS(ebsInfo *ec2types.EbsInfo) *int32 {
376376 return ebsInfo .EbsOptimizedInfo .BaselineIops
377377}
378378
379- func getCPUManufacturer (instanceTypeInfo * ec2types.InstanceTypeInfo ) CPUManufacturer {
380- for _ , it := range instanceTypeInfo .ProcessorInfo .SupportedArchitectures {
381- if it == ec2types .ArchitectureTypeArm64 {
382- return CPUManufacturerAWS
383- }
384- }
385-
386- if amdRegex .Match ([]byte (instanceTypeInfo .InstanceType )) {
387- return CPUManufacturerAMD
388- }
389- return CPUManufacturerIntel
390- }
391-
392379// getInstanceTypeGeneration returns the generation from an instance type name
393380// i.e. c7i.xlarge -> 7
394381// if any error occurs, 0 will be returned.
0 commit comments