Skip to content

cidrsubnet doesn't work with ipv6 subnets #25360

@arianvp

Description

@arianvp

Terraform Version

Terraform v0.12.3
+ provider.packet v2.9.0

Your version of Terraform is out of date! The latest version
is 0.12.26. You can update by downloading from www.terraform.io/downloads.html

Terraform Configuration Files

locals {
service_cidr_range = cidrsubnet("fe08::/64", 63, 0)
}

Expected Behavior

https://www.terraform.io/docs/configuration/functions/cidrsubnet.html documents cidrsubnet works for ipv6. and subnet sizes can go upto 128. So expected output here is

service_cidr_range => "fe08::/127"

Actual Behavior


Error: Error in function call

  on provision.tf line 46, in locals:
  46:   service_cidr_range = cidrsubnet("fe08::/64", 63, 0)

Call to function "cidrsubnet" failed: may not extend prefix by more than 32
bits.

Steps to Reproduce

terraform apply

Additional Context

none

References

none

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugconfigconfirmeda Terraform Core team member has reproduced this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions