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:
Allen Sanborn authored and GitHub committed 2026-09-30 23:30:05 -05:00
1 parent 37f3ebd8e8
commit 3a56aad670
3 files changed
+103

No files matched your search

@@ -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
// =========================================================================