You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your request related to a problem? Please describe.
The current code uses a hardcoded value for the newbits argument in the cidrsubnet function, which is not scalable and is causing issues when creating a VPC with non-/56 ranges.
For example, if the VPC IPv6 CIDR block is /60, the code attempts to create a subnet with /68, which is an unacceptable value.
Describe the solution you'd like.
To improve scalability, I propose introducing a new variable that provides the flexibility to select subnet sizes based on the VPC's IPv6 CIDR block size.
This change allows for more flexibility in subnet size selection by using a variable for newbits, making the code adaptable to different VPC IPv6 CIDR sizes.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days
Is your request related to a problem? Please describe.
The current code uses a hardcoded value for the newbits argument in the cidrsubnet function, which is not scalable and is causing issues when creating a VPC with non-/56 ranges.
For example, if the VPC IPv6 CIDR block is /60, the code attempts to create a subnet with /68, which is an unacceptable value.
Describe the solution you'd like.
To improve scalability, I propose introducing a new variable that provides the flexibility to select subnet sizes based on the VPC's IPv6 CIDR block size.
Resource: aws_subnet
Current argument:
ipv6_cidr_block = var.enable_ipv6 && length(var.private_subnet_ipv6_prefixes) > 0
Proposed solution:
ipv6_cidr_block = var.enable_ipv6 && length(var.public_subnet_ipv6_prefixes) > 0 ? cidrsubnet(aws_vpc.this[0].ipv6_cidr_block, var.cidr_subnet_newbits, var.public_subnet_ipv6_prefixes[count.index]) : null
This change allows for more flexibility in subnet size selection by using a variable for newbits, making the code adaptable to different VPC IPv6 CIDR sizes.
The text was updated successfully, but these errors were encountered: