Skip to content

Commit

Permalink
CDPAUTO-102 Improve subnet CIDR calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsgaspar committed Aug 5, 2023
1 parent 1e6d496 commit 6198d7b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ locals {
# Extract the VNet CIDR range from the user-provided CIDR
vnet_cidr_range = split("/",var.vnet_cidr)[1]

# Calculate the first suitable CIDR range for public subnets after CDP subnets have been allocated.
# Calculate the first suitable CIDR range for public subnets after private subnets have been allocated (normalize the offset, expressed as a multiplier of gateway subnet ranges)
gateway_subnet_offset = ceil(local.subnets_required.cdp_subnets * pow(2, 32-var.cdp_subnet_range)/pow(2, 32-var.gateway_subnet_range))


Expand Down

0 comments on commit 6198d7b

Please sign in to comment.