{"record":{"id":"566668fee4df558d","repo":"kubernetes/kops","slug":"error-parsing-cidr-subnet-v","errorCode":null,"errorMessage":"error parsing CIDR subnet: %v","messagePattern":"error parsing CIDR subnet: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/awstasks/subnet.go","lineNumber":414,"sourceCode":"\t\t}\n\t}\n\n\tshared := fi.ValueOf(e.Shared)\n\tif shared {\n\t\t// Not terraform owned / managed\n\t\t// We won't apply changes, but our validation (kops update) will still warn\n\t\t//\n\t\t// We probably shouldn't output subnet_ids only in this case - we normally output them by role,\n\t\t// but removing it now might break people.  We could always output subnet_ids though, if we\n\t\t// ever get a request for that.\n\t\treturn t.AddOutputVariableArray(\"subnet_ids\", terraformWriter.LiteralFromStringValue(*e.ID))\n\t}\n\n\tvar ipv6CIDR *terraformWriter.Literal\n\tif strings.HasPrefix(aws.ToString(e.IPv6CIDR), \"/\") {\n\t\tnewSize, netNum, err := utils.ParseCIDRNotation(*e.IPv6CIDR)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error parsing CIDR subnet: %v\", err)\n\t\t}\n\n\t\tnewBits := terraformWriter.LiteralBinaryExpression(\n\t\t\tterraformWriter.LiteralFromIntValue(newSize),\n\t\t\t\"-\",\n\t\t\tterraformWriter.LiteralTokens(\"local\", \"vpc_ipv6_cidr_length\"),\n\t\t)\n\t\tipv6CIDR = terraformWriter.LiteralFunctionExpression(\"cidrsubnet\",\n\t\t\tterraformWriter.LiteralTokens(\"local\", \"vpc_ipv6_cidr_block\"),\n\t\t\tnewBits,\n\t\t\tterraformWriter.LiteralFromIntValue(netNum),\n\t\t)\n\t} else if e.IPv6CIDR != nil {\n\t\tipv6CIDR = terraformWriter.LiteralFromStringValue(aws.ToString(e.IPv6CIDR))\n\t}\n\n\ttf := &terraformSubnet{\n\t\tVPCID:            e.VPC.TerraformLink(),","sourceCodeStart":396,"sourceCodeEnd":432,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/awstasks/subnet.go#L396-L432","documentation":"During Terraform rendering, the subnet's IPv6 CIDR allocation hint ('/size,netnum' notation) failed utils.ParseCIDRNotation; the spec carries a malformed subnet IPv6 hint, so no concrete CIDR can be computed.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/awstasks/subnet.go:414 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the IPv6 CIDR hint in the cluster spec to the form '/<prefix>,<netnum>' (e.g. '/64,5')","Or remove the hint so kOps allocates automatically"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}