Skip to content

Commit

Permalink
fix: Add missing private subnets to max subnet length local (#920)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryantbiggs authored Apr 7, 2023
1 parent 57323d9 commit 6f51f34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions examples/simple/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ module "vpc" {
cidr = local.vpc_cidr

azs = local.azs
private_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 8, k)]
public_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 8, k + 4)]

enable_nat_gateway = false
private_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 4, k)]

tags = local.tags
}
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ locals {
len_outpost_subnets = max(length(var.outpost_subnets), length(var.outpost_subnet_ipv6_prefixes))

max_subnet_length = max(
local.len_private_subnets,
local.len_public_subnets,
local.len_intra_subnets,
local.len_elasticache_subnets,
local.len_database_subnets,
local.len_redshift_subnets,
Expand Down

0 comments on commit 6f51f34

Please sign in to comment.