【小ネタ】TerraformでVPCのCIDR限界までサブネットを沢山作ったお話

1つのVPCにサブネットを256個作成したことはありますか?
2021.03.19

こんにちは!コンサル部のinomaso(@inomasosan)です。

VPCやサブネットを作成する際に、CIDRブロック重複や、使用可能なIPアドレス数を気にしますよね。

これまで、VPCのCIDRで作成可能な上限までサブネットを作成したことがなかったので
何の役に立つのかは置いとくとして、実際に検証してみることにしました。

この記事で学べること

  • VPCにサブネットを大量作成する際に気をつけるポイント
  • Terraformでのコードの書き方

環境

今回実行した環境は以下の通りです。

  • macOS Catalina 10.15.7
  • Terraform 0.14.8
  • AWSプロバイダー 3.32.0

やりたいこと

VPCを/16のCIDRで作成した場合、サブネットは/24のCIDRで256個まで作成可能なのか試してみます。 AWSマネージメントコンソールで作成するのは苦行だったので、Terraformで楽して作成することにしました。

コード

今回はサブネットを256個作成するだけなので、AZの指定等は特にしていないです。
サブネットはcountと、cidrsubnet関数を組み合わせて作成しています。

resource "aws_vpc" "vpc" {
  cidr_block           = "10.0.0.0/16"
  instance_tenancy     = "default"
  enable_dns_support   = true
  enable_dns_hostnames = true

  tags = {
    Name = "inomaso-dev-vpc"
  }
}

resource "aws_subnet" "multi_subnets" {
  vpc_id     = aws_vpc.vpc.id

  count = 256
  cidr_block = cidrsubnet(aws_vpc.vpc.cidr_block, 8, count.index)

  tags = {
    Name = "inomaso-dev-subnet-${count.index+1}"
  }
}

ハマったこと

以下のようなエラーメッセージが出力され、いくつかのサブネットは作成失敗しました。

error creating subnet: SubnetLimitExceeded: The maximum number of subnets has been reached.
    status code: 400, request id: 5257c698-93c6-4852-9c70-56ef7f6a7f46

もしや、サブネットの作成上限かなと思い調べたところ、ドンピシャでした。

VPC 当たりのサブネットの数 デフォルト200

Service Quotas256に引き上げリクエストし、無事に承認してもらいました。

結果

本当にサブネットが256個できているのか確認していきます。

まずはTerraformでサブネットのステート数が256個あるか確認します。

% terraform state list aws_subnet.multi_subnets
aws_subnet.multi_subnets[0]
aws_subnet.multi_subnets[1]
aws_subnet.multi_subnets[2]
aws_subnet.multi_subnets[3]
aws_subnet.multi_subnets[4]
aws_subnet.multi_subnets[5]
aws_subnet.multi_subnets[6]
aws_subnet.multi_subnets[7]
aws_subnet.multi_subnets[8]
aws_subnet.multi_subnets[9]
aws_subnet.multi_subnets[10]
aws_subnet.multi_subnets[11]
aws_subnet.multi_subnets[12]
aws_subnet.multi_subnets[13]
aws_subnet.multi_subnets[14]
aws_subnet.multi_subnets[15]
aws_subnet.multi_subnets[16]
aws_subnet.multi_subnets[17]
aws_subnet.multi_subnets[18]
aws_subnet.multi_subnets[19]
aws_subnet.multi_subnets[20]
aws_subnet.multi_subnets[21]
aws_subnet.multi_subnets[22]
aws_subnet.multi_subnets[23]
aws_subnet.multi_subnets[24]
aws_subnet.multi_subnets[25]
aws_subnet.multi_subnets[26]
aws_subnet.multi_subnets[27]
aws_subnet.multi_subnets[28]
aws_subnet.multi_subnets[29]
aws_subnet.multi_subnets[30]
aws_subnet.multi_subnets[31]
aws_subnet.multi_subnets[32]
aws_subnet.multi_subnets[33]
aws_subnet.multi_subnets[34]
aws_subnet.multi_subnets[35]
aws_subnet.multi_subnets[36]
aws_subnet.multi_subnets[37]
aws_subnet.multi_subnets[38]
aws_subnet.multi_subnets[39]
aws_subnet.multi_subnets[40]
aws_subnet.multi_subnets[41]
aws_subnet.multi_subnets[42]
aws_subnet.multi_subnets[43]
aws_subnet.multi_subnets[44]
aws_subnet.multi_subnets[45]
aws_subnet.multi_subnets[46]
aws_subnet.multi_subnets[47]
aws_subnet.multi_subnets[48]
aws_subnet.multi_subnets[49]
aws_subnet.multi_subnets[50]
aws_subnet.multi_subnets[51]
aws_subnet.multi_subnets[52]
aws_subnet.multi_subnets[53]
aws_subnet.multi_subnets[54]
aws_subnet.multi_subnets[55]
aws_subnet.multi_subnets[56]
aws_subnet.multi_subnets[57]
aws_subnet.multi_subnets[58]
aws_subnet.multi_subnets[59]
aws_subnet.multi_subnets[60]
aws_subnet.multi_subnets[61]
aws_subnet.multi_subnets[62]
aws_subnet.multi_subnets[63]
aws_subnet.multi_subnets[64]
aws_subnet.multi_subnets[65]
aws_subnet.multi_subnets[66]
aws_subnet.multi_subnets[67]
aws_subnet.multi_subnets[68]
aws_subnet.multi_subnets[69]
aws_subnet.multi_subnets[70]
aws_subnet.multi_subnets[71]
aws_subnet.multi_subnets[72]
aws_subnet.multi_subnets[73]
aws_subnet.multi_subnets[74]
aws_subnet.multi_subnets[75]
aws_subnet.multi_subnets[76]
aws_subnet.multi_subnets[77]
aws_subnet.multi_subnets[78]
aws_subnet.multi_subnets[79]
aws_subnet.multi_subnets[80]
aws_subnet.multi_subnets[81]
aws_subnet.multi_subnets[82]
aws_subnet.multi_subnets[83]
aws_subnet.multi_subnets[84]
aws_subnet.multi_subnets[85]
aws_subnet.multi_subnets[86]
aws_subnet.multi_subnets[87]
aws_subnet.multi_subnets[88]
aws_subnet.multi_subnets[89]
aws_subnet.multi_subnets[90]
aws_subnet.multi_subnets[91]
aws_subnet.multi_subnets[92]
aws_subnet.multi_subnets[93]
aws_subnet.multi_subnets[94]
aws_subnet.multi_subnets[95]
aws_subnet.multi_subnets[96]
aws_subnet.multi_subnets[97]
aws_subnet.multi_subnets[98]
aws_subnet.multi_subnets[99]
aws_subnet.multi_subnets[100]
aws_subnet.multi_subnets[101]
aws_subnet.multi_subnets[102]
aws_subnet.multi_subnets[103]
aws_subnet.multi_subnets[104]
aws_subnet.multi_subnets[105]
aws_subnet.multi_subnets[106]
aws_subnet.multi_subnets[107]
aws_subnet.multi_subnets[108]
aws_subnet.multi_subnets[109]
aws_subnet.multi_subnets[110]
aws_subnet.multi_subnets[111]
aws_subnet.multi_subnets[112]
aws_subnet.multi_subnets[113]
aws_subnet.multi_subnets[114]
aws_subnet.multi_subnets[115]
aws_subnet.multi_subnets[116]
aws_subnet.multi_subnets[117]
aws_subnet.multi_subnets[118]
aws_subnet.multi_subnets[119]
aws_subnet.multi_subnets[120]
aws_subnet.multi_subnets[121]
aws_subnet.multi_subnets[122]
aws_subnet.multi_subnets[123]
aws_subnet.multi_subnets[124]
aws_subnet.multi_subnets[125]
aws_subnet.multi_subnets[126]
aws_subnet.multi_subnets[127]
aws_subnet.multi_subnets[128]
aws_subnet.multi_subnets[129]
aws_subnet.multi_subnets[130]
aws_subnet.multi_subnets[131]
aws_subnet.multi_subnets[132]
aws_subnet.multi_subnets[133]
aws_subnet.multi_subnets[134]
aws_subnet.multi_subnets[135]
aws_subnet.multi_subnets[136]
aws_subnet.multi_subnets[137]
aws_subnet.multi_subnets[138]
aws_subnet.multi_subnets[139]
aws_subnet.multi_subnets[140]
aws_subnet.multi_subnets[141]
aws_subnet.multi_subnets[142]
aws_subnet.multi_subnets[143]
aws_subnet.multi_subnets[144]
aws_subnet.multi_subnets[145]
aws_subnet.multi_subnets[146]
aws_subnet.multi_subnets[147]
aws_subnet.multi_subnets[148]
aws_subnet.multi_subnets[149]
aws_subnet.multi_subnets[150]
aws_subnet.multi_subnets[151]
aws_subnet.multi_subnets[152]
aws_subnet.multi_subnets[153]
aws_subnet.multi_subnets[154]
aws_subnet.multi_subnets[155]
aws_subnet.multi_subnets[156]
aws_subnet.multi_subnets[157]
aws_subnet.multi_subnets[158]
aws_subnet.multi_subnets[159]
aws_subnet.multi_subnets[160]
aws_subnet.multi_subnets[161]
aws_subnet.multi_subnets[162]
aws_subnet.multi_subnets[163]
aws_subnet.multi_subnets[164]
aws_subnet.multi_subnets[165]
aws_subnet.multi_subnets[166]
aws_subnet.multi_subnets[167]
aws_subnet.multi_subnets[168]
aws_subnet.multi_subnets[169]
aws_subnet.multi_subnets[170]
aws_subnet.multi_subnets[171]
aws_subnet.multi_subnets[172]
aws_subnet.multi_subnets[173]
aws_subnet.multi_subnets[174]
aws_subnet.multi_subnets[175]
aws_subnet.multi_subnets[176]
aws_subnet.multi_subnets[177]
aws_subnet.multi_subnets[178]
aws_subnet.multi_subnets[179]
aws_subnet.multi_subnets[180]
aws_subnet.multi_subnets[181]
aws_subnet.multi_subnets[182]
aws_subnet.multi_subnets[183]
aws_subnet.multi_subnets[184]
aws_subnet.multi_subnets[185]
aws_subnet.multi_subnets[186]
aws_subnet.multi_subnets[187]
aws_subnet.multi_subnets[188]
aws_subnet.multi_subnets[189]
aws_subnet.multi_subnets[190]
aws_subnet.multi_subnets[191]
aws_subnet.multi_subnets[192]
aws_subnet.multi_subnets[193]
aws_subnet.multi_subnets[194]
aws_subnet.multi_subnets[195]
aws_subnet.multi_subnets[196]
aws_subnet.multi_subnets[197]
aws_subnet.multi_subnets[198]
aws_subnet.multi_subnets[199]
aws_subnet.multi_subnets[200]
aws_subnet.multi_subnets[201]
aws_subnet.multi_subnets[202]
aws_subnet.multi_subnets[203]
aws_subnet.multi_subnets[204]
aws_subnet.multi_subnets[205]
aws_subnet.multi_subnets[206]
aws_subnet.multi_subnets[207]
aws_subnet.multi_subnets[208]
aws_subnet.multi_subnets[209]
aws_subnet.multi_subnets[210]
aws_subnet.multi_subnets[211]
aws_subnet.multi_subnets[212]
aws_subnet.multi_subnets[213]
aws_subnet.multi_subnets[214]
aws_subnet.multi_subnets[215]
aws_subnet.multi_subnets[216]
aws_subnet.multi_subnets[217]
aws_subnet.multi_subnets[218]
aws_subnet.multi_subnets[219]
aws_subnet.multi_subnets[220]
aws_subnet.multi_subnets[221]
aws_subnet.multi_subnets[222]
aws_subnet.multi_subnets[223]
aws_subnet.multi_subnets[224]
aws_subnet.multi_subnets[225]
aws_subnet.multi_subnets[226]
aws_subnet.multi_subnets[227]
aws_subnet.multi_subnets[228]
aws_subnet.multi_subnets[229]
aws_subnet.multi_subnets[230]
aws_subnet.multi_subnets[231]
aws_subnet.multi_subnets[232]
aws_subnet.multi_subnets[233]
aws_subnet.multi_subnets[234]
aws_subnet.multi_subnets[235]
aws_subnet.multi_subnets[236]
aws_subnet.multi_subnets[237]
aws_subnet.multi_subnets[238]
aws_subnet.multi_subnets[239]
aws_subnet.multi_subnets[240]
aws_subnet.multi_subnets[241]
aws_subnet.multi_subnets[242]
aws_subnet.multi_subnets[243]
aws_subnet.multi_subnets[244]
aws_subnet.multi_subnets[245]
aws_subnet.multi_subnets[246]
aws_subnet.multi_subnets[247]
aws_subnet.multi_subnets[248]
aws_subnet.multi_subnets[249]
aws_subnet.multi_subnets[250]
aws_subnet.multi_subnets[251]
aws_subnet.multi_subnets[252]
aws_subnet.multi_subnets[253]
aws_subnet.multi_subnets[254]
aws_subnet.multi_subnets[255]

次にAWS CLIでサブネット名とCIDRを確認します。

% aws ec2 describe-subnets --filters "Name=cidr-block,Values=10.0.*" --query 'sort_by(Subnets[].{Name:Tags[?Key==`Name`].Value|[0], Cidr:CidrBlock},&Cidr)' --output table
---------------------------------------------
|              DescribeSubnets              |
+----------------+--------------------------+
|      Cidr      |          Name            |
+----------------+--------------------------+
|  10.0.0.0/24   |  inomaso-dev-subnet-1    |
|  10.0.1.0/24   |  inomaso-dev-subnet-2    |
|  10.0.10.0/24  |  inomaso-dev-subnet-11   |
|  10.0.100.0/24 |  inomaso-dev-subnet-101  |
|  10.0.101.0/24 |  inomaso-dev-subnet-102  |
|  10.0.102.0/24 |  inomaso-dev-subnet-103  |
|  10.0.103.0/24 |  inomaso-dev-subnet-104  |
|  10.0.104.0/24 |  inomaso-dev-subnet-105  |
|  10.0.105.0/24 |  inomaso-dev-subnet-106  |
|  10.0.106.0/24 |  inomaso-dev-subnet-107  |
|  10.0.107.0/24 |  inomaso-dev-subnet-108  |
|  10.0.108.0/24 |  inomaso-dev-subnet-109  |
|  10.0.109.0/24 |  inomaso-dev-subnet-110  |
|  10.0.11.0/24  |  inomaso-dev-subnet-12   |
|  10.0.110.0/24 |  inomaso-dev-subnet-111  |
|  10.0.111.0/24 |  inomaso-dev-subnet-112  |
|  10.0.112.0/24 |  inomaso-dev-subnet-113  |
|  10.0.113.0/24 |  inomaso-dev-subnet-114  |
|  10.0.114.0/24 |  inomaso-dev-subnet-115  |
|  10.0.115.0/24 |  inomaso-dev-subnet-116  |
|  10.0.116.0/24 |  inomaso-dev-subnet-117  |
|  10.0.117.0/24 |  inomaso-dev-subnet-118  |
|  10.0.118.0/24 |  inomaso-dev-subnet-119  |
|  10.0.119.0/24 |  inomaso-dev-subnet-120  |
|  10.0.12.0/24  |  inomaso-dev-subnet-13   |
|  10.0.120.0/24 |  inomaso-dev-subnet-121  |
|  10.0.121.0/24 |  inomaso-dev-subnet-122  |
|  10.0.122.0/24 |  inomaso-dev-subnet-123  |
|  10.0.123.0/24 |  inomaso-dev-subnet-124  |
|  10.0.124.0/24 |  inomaso-dev-subnet-125  |
|  10.0.125.0/24 |  inomaso-dev-subnet-126  |
|  10.0.126.0/24 |  inomaso-dev-subnet-127  |
|  10.0.127.0/24 |  inomaso-dev-subnet-128  |
|  10.0.128.0/24 |  inomaso-dev-subnet-129  |
|  10.0.129.0/24 |  inomaso-dev-subnet-130  |
|  10.0.13.0/24  |  inomaso-dev-subnet-14   |
|  10.0.130.0/24 |  inomaso-dev-subnet-131  |
|  10.0.131.0/24 |  inomaso-dev-subnet-132  |
|  10.0.132.0/24 |  inomaso-dev-subnet-133  |
|  10.0.133.0/24 |  inomaso-dev-subnet-134  |
|  10.0.134.0/24 |  inomaso-dev-subnet-135  |
|  10.0.135.0/24 |  inomaso-dev-subnet-136  |
|  10.0.136.0/24 |  inomaso-dev-subnet-137  |
|  10.0.137.0/24 |  inomaso-dev-subnet-138  |
|  10.0.138.0/24 |  inomaso-dev-subnet-139  |
|  10.0.139.0/24 |  inomaso-dev-subnet-140  |
|  10.0.14.0/24  |  inomaso-dev-subnet-15   |
|  10.0.140.0/24 |  inomaso-dev-subnet-141  |
|  10.0.141.0/24 |  inomaso-dev-subnet-142  |
|  10.0.142.0/24 |  inomaso-dev-subnet-143  |
|  10.0.143.0/24 |  inomaso-dev-subnet-144  |
|  10.0.144.0/24 |  inomaso-dev-subnet-145  |
|  10.0.145.0/24 |  inomaso-dev-subnet-146  |
|  10.0.146.0/24 |  inomaso-dev-subnet-147  |
|  10.0.147.0/24 |  inomaso-dev-subnet-148  |
|  10.0.148.0/24 |  inomaso-dev-subnet-149  |
|  10.0.149.0/24 |  inomaso-dev-subnet-150  |
|  10.0.15.0/24  |  inomaso-dev-subnet-16   |
|  10.0.150.0/24 |  inomaso-dev-subnet-151  |
|  10.0.151.0/24 |  inomaso-dev-subnet-152  |
|  10.0.152.0/24 |  inomaso-dev-subnet-153  |
|  10.0.153.0/24 |  inomaso-dev-subnet-154  |
|  10.0.154.0/24 |  inomaso-dev-subnet-155  |
|  10.0.155.0/24 |  inomaso-dev-subnet-156  |
|  10.0.156.0/24 |  inomaso-dev-subnet-157  |
|  10.0.157.0/24 |  inomaso-dev-subnet-158  |
|  10.0.158.0/24 |  inomaso-dev-subnet-159  |
|  10.0.159.0/24 |  inomaso-dev-subnet-160  |
|  10.0.16.0/24  |  inomaso-dev-subnet-17   |
|  10.0.160.0/24 |  inomaso-dev-subnet-161  |
|  10.0.161.0/24 |  inomaso-dev-subnet-162  |
|  10.0.162.0/24 |  inomaso-dev-subnet-163  |
|  10.0.163.0/24 |  inomaso-dev-subnet-164  |
|  10.0.164.0/24 |  inomaso-dev-subnet-165  |
|  10.0.165.0/24 |  inomaso-dev-subnet-166  |
|  10.0.166.0/24 |  inomaso-dev-subnet-167  |
|  10.0.167.0/24 |  inomaso-dev-subnet-168  |
|  10.0.168.0/24 |  inomaso-dev-subnet-169  |
|  10.0.169.0/24 |  inomaso-dev-subnet-170  |
|  10.0.17.0/24  |  inomaso-dev-subnet-18   |
|  10.0.170.0/24 |  inomaso-dev-subnet-171  |
|  10.0.171.0/24 |  inomaso-dev-subnet-172  |
|  10.0.172.0/24 |  inomaso-dev-subnet-173  |
|  10.0.173.0/24 |  inomaso-dev-subnet-174  |
|  10.0.174.0/24 |  inomaso-dev-subnet-175  |
|  10.0.175.0/24 |  inomaso-dev-subnet-176  |
|  10.0.176.0/24 |  inomaso-dev-subnet-177  |
|  10.0.177.0/24 |  inomaso-dev-subnet-178  |
|  10.0.178.0/24 |  inomaso-dev-subnet-179  |
|  10.0.179.0/24 |  inomaso-dev-subnet-180  |
|  10.0.18.0/24  |  inomaso-dev-subnet-19   |
|  10.0.180.0/24 |  inomaso-dev-subnet-181  |
|  10.0.181.0/24 |  inomaso-dev-subnet-182  |
|  10.0.182.0/24 |  inomaso-dev-subnet-183  |
|  10.0.183.0/24 |  inomaso-dev-subnet-184  |
|  10.0.184.0/24 |  inomaso-dev-subnet-185  |
|  10.0.185.0/24 |  inomaso-dev-subnet-186  |
|  10.0.186.0/24 |  inomaso-dev-subnet-187  |
|  10.0.187.0/24 |  inomaso-dev-subnet-188  |
|  10.0.188.0/24 |  inomaso-dev-subnet-189  |
|  10.0.189.0/24 |  inomaso-dev-subnet-190  |
|  10.0.19.0/24  |  inomaso-dev-subnet-20   |
|  10.0.190.0/24 |  inomaso-dev-subnet-191  |
|  10.0.191.0/24 |  inomaso-dev-subnet-192  |
|  10.0.192.0/24 |  inomaso-dev-subnet-193  |
|  10.0.193.0/24 |  inomaso-dev-subnet-194  |
|  10.0.194.0/24 |  inomaso-dev-subnet-195  |
|  10.0.195.0/24 |  inomaso-dev-subnet-196  |
|  10.0.196.0/24 |  inomaso-dev-subnet-197  |
|  10.0.197.0/24 |  inomaso-dev-subnet-198  |
|  10.0.198.0/24 |  inomaso-dev-subnet-199  |
|  10.0.199.0/24 |  inomaso-dev-subnet-200  |
|  10.0.2.0/24   |  inomaso-dev-subnet-3    |
|  10.0.20.0/24  |  inomaso-dev-subnet-21   |
|  10.0.200.0/24 |  inomaso-dev-subnet-201  |
|  10.0.201.0/24 |  inomaso-dev-subnet-202  |
|  10.0.202.0/24 |  inomaso-dev-subnet-203  |
|  10.0.203.0/24 |  inomaso-dev-subnet-204  |
|  10.0.204.0/24 |  inomaso-dev-subnet-205  |
|  10.0.205.0/24 |  inomaso-dev-subnet-206  |
|  10.0.206.0/24 |  inomaso-dev-subnet-207  |
|  10.0.207.0/24 |  inomaso-dev-subnet-208  |
|  10.0.208.0/24 |  inomaso-dev-subnet-209  |
|  10.0.209.0/24 |  inomaso-dev-subnet-210  |
|  10.0.21.0/24  |  inomaso-dev-subnet-22   |
|  10.0.210.0/24 |  inomaso-dev-subnet-211  |
|  10.0.211.0/24 |  inomaso-dev-subnet-212  |
|  10.0.212.0/24 |  inomaso-dev-subnet-213  |
|  10.0.213.0/24 |  inomaso-dev-subnet-214  |
|  10.0.214.0/24 |  inomaso-dev-subnet-215  |
|  10.0.215.0/24 |  inomaso-dev-subnet-216  |
|  10.0.216.0/24 |  inomaso-dev-subnet-217  |
|  10.0.217.0/24 |  inomaso-dev-subnet-218  |
|  10.0.218.0/24 |  inomaso-dev-subnet-219  |
|  10.0.219.0/24 |  inomaso-dev-subnet-220  |
|  10.0.22.0/24  |  inomaso-dev-subnet-23   |
|  10.0.220.0/24 |  inomaso-dev-subnet-221  |
|  10.0.221.0/24 |  inomaso-dev-subnet-222  |
|  10.0.222.0/24 |  inomaso-dev-subnet-223  |
|  10.0.223.0/24 |  inomaso-dev-subnet-224  |
|  10.0.224.0/24 |  inomaso-dev-subnet-225  |
|  10.0.225.0/24 |  inomaso-dev-subnet-226  |
|  10.0.226.0/24 |  inomaso-dev-subnet-227  |
|  10.0.227.0/24 |  inomaso-dev-subnet-228  |
|  10.0.228.0/24 |  inomaso-dev-subnet-229  |
|  10.0.229.0/24 |  inomaso-dev-subnet-230  |
|  10.0.23.0/24  |  inomaso-dev-subnet-24   |
|  10.0.230.0/24 |  inomaso-dev-subnet-231  |
|  10.0.231.0/24 |  inomaso-dev-subnet-232  |
|  10.0.232.0/24 |  inomaso-dev-subnet-233  |
|  10.0.233.0/24 |  inomaso-dev-subnet-234  |
|  10.0.234.0/24 |  inomaso-dev-subnet-235  |
|  10.0.235.0/24 |  inomaso-dev-subnet-236  |
|  10.0.236.0/24 |  inomaso-dev-subnet-237  |
|  10.0.237.0/24 |  inomaso-dev-subnet-238  |
|  10.0.238.0/24 |  inomaso-dev-subnet-239  |
|  10.0.239.0/24 |  inomaso-dev-subnet-240  |
|  10.0.24.0/24  |  inomaso-dev-subnet-25   |
|  10.0.240.0/24 |  inomaso-dev-subnet-241  |
|  10.0.241.0/24 |  inomaso-dev-subnet-242  |
|  10.0.242.0/24 |  inomaso-dev-subnet-243  |
|  10.0.243.0/24 |  inomaso-dev-subnet-244  |
|  10.0.244.0/24 |  inomaso-dev-subnet-245  |
|  10.0.245.0/24 |  inomaso-dev-subnet-246  |
|  10.0.246.0/24 |  inomaso-dev-subnet-247  |
|  10.0.247.0/24 |  inomaso-dev-subnet-248  |
|  10.0.248.0/24 |  inomaso-dev-subnet-249  |
|  10.0.249.0/24 |  inomaso-dev-subnet-250  |
|  10.0.25.0/24  |  inomaso-dev-subnet-26   |
|  10.0.250.0/24 |  inomaso-dev-subnet-251  |
|  10.0.251.0/24 |  inomaso-dev-subnet-252  |
|  10.0.252.0/24 |  inomaso-dev-subnet-253  |
|  10.0.253.0/24 |  inomaso-dev-subnet-254  |
|  10.0.254.0/24 |  inomaso-dev-subnet-255  |
|  10.0.255.0/24 |  inomaso-dev-subnet-256  |
|  10.0.26.0/24  |  inomaso-dev-subnet-27   |
|  10.0.27.0/24  |  inomaso-dev-subnet-28   |
|  10.0.28.0/24  |  inomaso-dev-subnet-29   |
|  10.0.29.0/24  |  inomaso-dev-subnet-30   |
|  10.0.3.0/24   |  inomaso-dev-subnet-4    |
|  10.0.30.0/24  |  inomaso-dev-subnet-31   |
|  10.0.31.0/24  |  inomaso-dev-subnet-32   |
|  10.0.32.0/24  |  inomaso-dev-subnet-33   |
|  10.0.33.0/24  |  inomaso-dev-subnet-34   |
|  10.0.34.0/24  |  inomaso-dev-subnet-35   |
|  10.0.35.0/24  |  inomaso-dev-subnet-36   |
|  10.0.36.0/24  |  inomaso-dev-subnet-37   |
|  10.0.37.0/24  |  inomaso-dev-subnet-38   |
|  10.0.38.0/24  |  inomaso-dev-subnet-39   |
|  10.0.39.0/24  |  inomaso-dev-subnet-40   |
|  10.0.4.0/24   |  inomaso-dev-subnet-5    |
|  10.0.40.0/24  |  inomaso-dev-subnet-41   |
|  10.0.41.0/24  |  inomaso-dev-subnet-42   |
|  10.0.42.0/24  |  inomaso-dev-subnet-43   |
|  10.0.43.0/24  |  inomaso-dev-subnet-44   |
|  10.0.44.0/24  |  inomaso-dev-subnet-45   |
|  10.0.45.0/24  |  inomaso-dev-subnet-46   |
|  10.0.46.0/24  |  inomaso-dev-subnet-47   |
|  10.0.47.0/24  |  inomaso-dev-subnet-48   |
|  10.0.48.0/24  |  inomaso-dev-subnet-49   |
|  10.0.49.0/24  |  inomaso-dev-subnet-50   |
|  10.0.5.0/24   |  inomaso-dev-subnet-6    |
|  10.0.50.0/24  |  inomaso-dev-subnet-51   |
|  10.0.51.0/24  |  inomaso-dev-subnet-52   |
|  10.0.52.0/24  |  inomaso-dev-subnet-53   |
|  10.0.53.0/24  |  inomaso-dev-subnet-54   |
|  10.0.54.0/24  |  inomaso-dev-subnet-55   |
|  10.0.55.0/24  |  inomaso-dev-subnet-56   |
|  10.0.56.0/24  |  inomaso-dev-subnet-57   |
|  10.0.57.0/24  |  inomaso-dev-subnet-58   |
|  10.0.58.0/24  |  inomaso-dev-subnet-59   |
|  10.0.59.0/24  |  inomaso-dev-subnet-60   |
|  10.0.6.0/24   |  inomaso-dev-subnet-7    |
|  10.0.60.0/24  |  inomaso-dev-subnet-61   |
|  10.0.61.0/24  |  inomaso-dev-subnet-62   |
|  10.0.62.0/24  |  inomaso-dev-subnet-63   |
|  10.0.63.0/24  |  inomaso-dev-subnet-64   |
|  10.0.64.0/24  |  inomaso-dev-subnet-65   |
|  10.0.65.0/24  |  inomaso-dev-subnet-66   |
|  10.0.66.0/24  |  inomaso-dev-subnet-67   |
|  10.0.67.0/24  |  inomaso-dev-subnet-68   |
|  10.0.68.0/24  |  inomaso-dev-subnet-69   |
|  10.0.69.0/24  |  inomaso-dev-subnet-70   |
|  10.0.7.0/24   |  inomaso-dev-subnet-8    |
|  10.0.70.0/24  |  inomaso-dev-subnet-71   |
|  10.0.71.0/24  |  inomaso-dev-subnet-72   |
|  10.0.72.0/24  |  inomaso-dev-subnet-73   |
|  10.0.73.0/24  |  inomaso-dev-subnet-74   |
|  10.0.74.0/24  |  inomaso-dev-subnet-75   |
|  10.0.75.0/24  |  inomaso-dev-subnet-76   |
|  10.0.76.0/24  |  inomaso-dev-subnet-77   |
|  10.0.77.0/24  |  inomaso-dev-subnet-78   |
|  10.0.78.0/24  |  inomaso-dev-subnet-79   |
|  10.0.79.0/24  |  inomaso-dev-subnet-80   |
|  10.0.8.0/24   |  inomaso-dev-subnet-9    |
|  10.0.80.0/24  |  inomaso-dev-subnet-81   |
|  10.0.81.0/24  |  inomaso-dev-subnet-82   |
|  10.0.82.0/24  |  inomaso-dev-subnet-83   |
|  10.0.83.0/24  |  inomaso-dev-subnet-84   |
|  10.0.84.0/24  |  inomaso-dev-subnet-85   |
|  10.0.85.0/24  |  inomaso-dev-subnet-86   |
|  10.0.86.0/24  |  inomaso-dev-subnet-87   |
|  10.0.87.0/24  |  inomaso-dev-subnet-88   |
|  10.0.88.0/24  |  inomaso-dev-subnet-89   |
|  10.0.89.0/24  |  inomaso-dev-subnet-90   |
|  10.0.9.0/24   |  inomaso-dev-subnet-10   |
|  10.0.90.0/24  |  inomaso-dev-subnet-91   |
|  10.0.91.0/24  |  inomaso-dev-subnet-92   |
|  10.0.92.0/24  |  inomaso-dev-subnet-93   |
|  10.0.93.0/24  |  inomaso-dev-subnet-94   |
|  10.0.94.0/24  |  inomaso-dev-subnet-95   |
|  10.0.95.0/24  |  inomaso-dev-subnet-96   |
|  10.0.96.0/24  |  inomaso-dev-subnet-97   |
|  10.0.97.0/24  |  inomaso-dev-subnet-98   |
|  10.0.98.0/24  |  inomaso-dev-subnet-99   |
|  10.0.99.0/24  |  inomaso-dev-subnet-100  |
+----------------+--------------------------+

ちゃんと作成できていることが確認できました٩( 'ω' )و

まとめ

VPCの設計上、作成可能であろうサブネットの上限数を実際に確認してみました。

256個のサブネットを作成することはないとは思いますが
2桁くらいのサブネットを作成時には役に立ちそうです。

この記事が、どなたかのお役に立てば幸いです。それでは!

参考記事