Creating Subnets
We cover Subnet IP addressing a bit more in detail - specifically how to divide up your VPC into smaller chunks of IP address ranges.
Terraform has some tooling to help generate contiguous IP address ranges that you can use to create subnets with.
1> cidrsubnets("10.0.0.0/17", 4, 4, 4) 2tolist([ 3 "10.0.0.0/21", 4 "10.0.8.0/21", 5 "10.0.16.0/21", 6]) 7 8 9> cidrsubnets("10.20.0.0/17", 4, 4, 4, 4, 4, 4)10tolist([11 "10.20.0.0/21",12 "10.20.8.0/21",13 "10.20.16.0/21",14 "10.20.24.0/21",15 "10.20.32.0/21",16 "10.20.40.0/21",17])