@tinystacks/iac-utils / Exports / AllocateCidrBlockArguments
Arguments for generating a CIDR block.
• Optional
exclusions: string
[]
CIDR blocks that should be excluded from the results.
Remarks
If the CIDR block generated matches any of the values provided here, the method will re-generate and re-check against this list until it runs out of options. Note that for a given prefix and network mask, only 256 unique CIDR blocks can be generated.
cidr/allocate-cidr-block.ts:69
• Optional
networkMask: number
An integer between 8 and 32
Remarks
This value will determine how many IP addresses are available within your CIDR block.
Default Value
16
cidr/allocate-cidr-block.ts:61
• Optional
prefix: string
An IPv4 prefix for the CIDR block to use as a base.
Remarks
Depending on the network mask, one of the octets will likely be replaced. This should typically be from the Private Address Space defined in RFC 1918 http://www.faqs.org/rfcs/rfc1918.html
Default Value
10.0.0.0
cidr/allocate-cidr-block.ts:52
• seed: string
A string to be used as a seed for the CIDR generation.
Remarks
If all other inputs are the same, two different seeds have a 1 in 256 chance of being duplicates. If you are generating multiple CIDR blocks and need them to be unique, generate them in sequence providing previously generated blocks in the exclusions argument.