Terraform cidrsubnets loop for 100 subnets

Viewed 283

I currently testing out terraform for deployment and i need a quite large list of subnets generated

I found that i can generate the list i need by using the following block

cidrsubnets("10.10.0.0/18", 9, 9, 9, 9, 9, 9, 9, 9, 9)

And adding additional newbits for each i need. However when a large list is needed, this quickly gets out of hand and was wondering how i can specify a number of needed subnets or an end address or something similar to specify the amount i need, rather than having 100 newbits for an example.

Thanks!

1 Answers
Related