Skip to content

deltadan/cidrsubnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c864751 · Sep 9, 2020

History

4 Commits
Sep 9, 2020
Sep 9, 2020
Sep 9, 2020

Repository files navigation

Use this function to test your CIDR Ranges

This simple function can be used to test the CIDR ranges that will be built by Terraform when using the cidrsubnets function.

Instructions to run CIDR Tester

  1. Copy the cidrtest.tf into a folder with no other Terraform files.

  2. Update the CIDR range of the VNET

locals {
    vnet_mgt_cidr = "192.168.0.0/20"
}

  1. Save the file and run the following command in the folder
terraform apply
  1. The output will show the networks you have created.
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Outputs:

subnets = [
  {
    "cidr" = "192.168.0.0/24"
    "name" = "subnet1"
  },
  {
    "cidr" = "192.168.1.0/24"
    "name" = "subnet2"
  },
]

More CIDR ranges can be added to the array to help you tweak the values to match up to the requirements for your VNETs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages