{"record":{"id":"812c33bf8d5a3db3","repo":"kubernetes/kops","slug":"fetching-vpcuuid-from-network-cidr-s-w","errorCode":null,"errorMessage":"fetching vpcUUID from network cidr=%s: %w","messagePattern":"fetching vpcUUID from network cidr=(.+?): %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/dotasks/droplet.go","lineNumber":160,"sourceCode":"\t\tactualCount := a.Count\n\n\t\tif expectedCount == actualCount {\n\t\t\treturn nil\n\t\t}\n\n\t\tif actualCount > expectedCount {\n\t\t\treturn errors.New(\"deleting droplets is not supported yet\")\n\t\t}\n\n\t\tnewDropletCount = expectedCount - actualCount\n\t}\n\n\t// associate vpcuuid to the droplet if set.\n\tvpcUUID := \"\"\n\tif fi.ValueOf(e.NetworkCIDR) != \"\" {\n\t\ts, err := t.Cloud.GetVPCUUID(fi.ValueOf(e.NetworkCIDR), fi.ValueOf(e.VPCName))\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"fetching vpcUUID from network cidr=%s: %w\", fi.ValueOf(e.NetworkCIDR), err)\n\t\t}\n\t\tvpcUUID = s\n\t} else if fi.ValueOf(e.VPCUUID) != \"\" {\n\t\tvpcUUID = fi.ValueOf(e.VPCUUID)\n\t}\n\n\tfor i := 0; i < newDropletCount; i++ {\n\t\treq := &godo.DropletCreateRequest{\n\t\t\tName:     fi.ValueOf(e.Name),\n\t\t\tRegion:   fi.ValueOf(e.Region),\n\t\t\tSize:     fi.ValueOf(e.Size),\n\t\t\tImage:    godo.DropletCreateImage{Slug: fi.ValueOf(e.Image)},\n\t\t\tTags:     e.Tags,\n\t\t\tVPCUUID:  vpcUUID,\n\t\t\tUserData: userData,\n\t\t}\n\n\t\tif e.SSHKey != nil {","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/dotasks/droplet.go#L142-L178","documentation":"Wraps GetVPCUUID failure in the DO droplet renderer: resolving the VPC UUID from the configured network CIDR failed, so the droplet cannot be placed in the right VPC. The CIDR is included to identify which lookup failed.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/dotasks/droplet.go:160 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the network CIDR matches an existing DO VPC","Check that the VPC name (if set) is correct","Inspect the wrapped error from the VPC lookup"],"exampleFix":null,"handlingStrategy":"try-catch","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-12T12:17:11.808Z"}