mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
fix(ec2): add t2.nano, t2.small, t3.nano and t3a.nano to the instance type catalog (#4788)
DescribeInstanceTypes and DescribeInstanceTypeOfferings derive from the catalog, so these sizes were neither described nor offered: terratest's GetRecommendedInstanceType([t2.nano t3.nano]) found no type available in every AZ, and aws_ec2_instance_type lookups for t3a.nano/t2.small came back empty. Values match AWS DescribeInstanceTypes (x86_64).
This commit is contained in:
1 parent
37f3ebd8e8
commit
3a56aad670
3 files changed
+103
No files matched your search
@@ -1,4 +1,17 @@
|
||||
instanceTypes:
|
||||
- instanceType: t2.nano
|
||||
vcpu: 1
|
||||
memoryMib: 512
|
||||
supportedArchitectures:
|
||||
- x86_64
|
||||
currentGeneration: true
|
||||
encryptionInTransitSupported: false
|
||||
defaultNetworkCardIndex: 0
|
||||
ipv4AddressesPerInterface: 2
|
||||
networkCards:
|
||||
- networkCardIndex: 0
|
||||
maximumNetworkInterfaces: 2
|
||||
|
||||
- instanceType: t2.micro
|
||||
vcpu: 1
|
||||
memoryMib: 1024
|
||||
@@ -12,6 +25,32 @@ instanceTypes:
|
||||
- networkCardIndex: 0
|
||||
maximumNetworkInterfaces: 2
|
||||
|
||||
- instanceType: t2.small
|
||||
vcpu: 1
|
||||
memoryMib: 2048
|
||||
supportedArchitectures:
|
||||
- x86_64
|
||||
currentGeneration: true
|
||||
encryptionInTransitSupported: false
|
||||
defaultNetworkCardIndex: 0
|
||||
ipv4AddressesPerInterface: 4
|
||||
networkCards:
|
||||
- networkCardIndex: 0
|
||||
maximumNetworkInterfaces: 3
|
||||
|
||||
- instanceType: t3.nano
|
||||
vcpu: 2
|
||||
memoryMib: 512
|
||||
supportedArchitectures:
|
||||
- x86_64
|
||||
currentGeneration: true
|
||||
encryptionInTransitSupported: false
|
||||
defaultNetworkCardIndex: 0
|
||||
ipv4AddressesPerInterface: 2
|
||||
networkCards:
|
||||
- networkCardIndex: 0
|
||||
maximumNetworkInterfaces: 2
|
||||
|
||||
- instanceType: t3.micro
|
||||
vcpu: 2
|
||||
memoryMib: 1024
|
||||
@@ -51,6 +90,19 @@ instanceTypes:
|
||||
- networkCardIndex: 0
|
||||
maximumNetworkInterfaces: 3
|
||||
|
||||
- instanceType: t3a.nano
|
||||
vcpu: 2
|
||||
memoryMib: 512
|
||||
supportedArchitectures:
|
||||
- x86_64
|
||||
currentGeneration: true
|
||||
encryptionInTransitSupported: false
|
||||
defaultNetworkCardIndex: 0
|
||||
ipv4AddressesPerInterface: 2
|
||||
networkCards:
|
||||
- networkCardIndex: 0
|
||||
maximumNetworkInterfaces: 2
|
||||
|
||||
- instanceType: m5.large
|
||||
vcpu: 2
|
||||
memoryMib: 8192
|
||||
|
||||
@@ -28,10 +28,14 @@ class Ec2InstanceTypeCatalogTest {
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
assertEquals(Set.of(
|
||||
"t2.nano",
|
||||
"t2.micro",
|
||||
"t2.small",
|
||||
"t3.nano",
|
||||
"t3.micro",
|
||||
"t3.small",
|
||||
"t3.medium",
|
||||
"t3a.nano",
|
||||
"m5.large",
|
||||
"t4g.micro",
|
||||
"t4g.small",
|
||||
|
||||
@@ -965,6 +965,53 @@ class Ec2IntegrationTest {
|
||||
everyItem(equalTo("us-east-1")));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(22)
|
||||
void describeNanoInstanceTypeOfferingsInEveryAvailabilityZone() {
|
||||
// terratest's GetRecommendedInstanceType picks the first type offered in every AZ.
|
||||
given()
|
||||
.formParam("Action", "DescribeInstanceTypeOfferings")
|
||||
.formParam("LocationType", "availability-zone")
|
||||
.formParam("Filter.1.Name", "instance-type")
|
||||
.formParam("Filter.1.Value.1", "t2.nano")
|
||||
.formParam("Filter.1.Value.2", "t3.nano")
|
||||
.header("Authorization", AUTH_HEADER)
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.contentType("application/xml")
|
||||
.body("DescribeInstanceTypeOfferingsResponse.instanceTypeOfferingSet.item.size()", equalTo(6))
|
||||
.body("DescribeInstanceTypeOfferingsResponse.instanceTypeOfferingSet.item.findAll { it.instanceType == 't2.nano' }.location",
|
||||
containsInAnyOrder("us-east-1a", "us-east-1b", "us-east-1c"))
|
||||
.body("DescribeInstanceTypeOfferingsResponse.instanceTypeOfferingSet.item.findAll { it.instanceType == 't3.nano' }.location",
|
||||
containsInAnyOrder("us-east-1a", "us-east-1b", "us-east-1c"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(22)
|
||||
void describeSmallBurstableInstanceTypes() {
|
||||
given()
|
||||
.formParam("Action", "DescribeInstanceTypes")
|
||||
.formParam("InstanceType.1", "t3a.nano")
|
||||
.formParam("InstanceType.2", "t2.small")
|
||||
.header("Authorization", AUTH_HEADER)
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.contentType("application/xml")
|
||||
.body("DescribeInstanceTypesResponse.instanceTypeSet.item.size()", equalTo(2))
|
||||
.body("DescribeInstanceTypesResponse.instanceTypeSet.item.find { it.instanceType == 't3a.nano' }.vCpuInfo.defaultVCpus",
|
||||
equalTo("2"))
|
||||
.body("DescribeInstanceTypesResponse.instanceTypeSet.item.find { it.instanceType == 't3a.nano' }.memoryInfo.sizeInMiB",
|
||||
equalTo("512"))
|
||||
.body("DescribeInstanceTypesResponse.instanceTypeSet.item.find { it.instanceType == 't2.small' }.vCpuInfo.defaultVCpus",
|
||||
equalTo("1"))
|
||||
.body("DescribeInstanceTypesResponse.instanceTypeSet.item.find { it.instanceType == 't2.small' }.memoryInfo.sizeInMiB",
|
||||
equalTo("2048"));
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
// VPCs
|
||||
// =========================================================================
|
||||
|
||||
Reference in new issue
Block a user