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 c59dc5f commit d47b8b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/terraform-cdp-aws-pre-reqs/modules/vpc/defaults.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ locals {
private = (var.deployment_template == "public") ? 0 : length(local.zones_in_region)
}

# Extract the VPC CIDR range from the user-provided CIDR
vpc_cidr_range = split("/",var.vpc_cidr)[1]

# Calculate the first suitable CIDR range for public subnets after private subnets have been allocated.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ locals {
# cidr = cidrsubnet(var.vnet_cidr, ceil(log(var.subnet_count, 2)), idx)
}

# 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.
Expand Down

0 comments on commit d47b8b6

Please sign in to comment.