{"record":{"id":"97f6cd701083283b","repo":"kubernetes/kops","slug":"found-virtual-network-without-id","errorCode":null,"errorMessage":"found virtual network without ID","messagePattern":"found virtual network without ID","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/azuretasks/virtualnetwork.go","lineNumber":72,"sourceCode":"func (n *VirtualNetwork) Find(c *fi.CloudupContext) (*VirtualNetwork, error) {\n\tcloud := c.T.Cloud.(azure.AzureCloud)\n\tl, err := cloud.VirtualNetwork().List(context.TODO(), *n.ResourceGroup.Name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar found *network.VirtualNetwork\n\tfor _, v := range l {\n\t\tif *v.Name == *n.Name {\n\t\t\tfound = v\n\t\t\tbreak\n\t\t}\n\t}\n\tif found == nil {\n\t\treturn nil, nil\n\t}\n\n\tif found.ID == nil {\n\t\treturn nil, fmt.Errorf(\"found virtual network without ID\")\n\t}\n\tif found.Properties == nil {\n\t\treturn nil, fmt.Errorf(\"found virtual network without properties\")\n\t}\n\tif found.Properties.ProvisioningState != nil && *found.Properties.ProvisioningState == network.ProvisioningStateFailed {\n\t\tklog.Warningf(\"found virtual network %q in failed provisioning state\", *n.Name)\n\t\treturn nil, nil\n\t}\n\tif found.Properties.AddressSpace == nil {\n\t\treturn nil, fmt.Errorf(\"found virtual network without address space\")\n\t}\n\n\taddrPrefixes := found.Properties.AddressSpace.AddressPrefixes\n\tif len(addrPrefixes) != 1 {\n\t\treturn nil, fmt.Errorf(\"expecting exactly 1 address prefix for %q, found %d: %+v\", *n.Name, len(addrPrefixes), addrPrefixes)\n\t}\n\treturn &VirtualNetwork{\n\t\tName:      n.Name,","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/azuretasks/virtualnetwork.go#L54-L90","documentation":"Malformed-API-object guard in the Azure virtual network Find: a VNet matching by name was returned but its ID field is nil, so kOps cannot build the resource reference. Indicates a broken API response, since Azure always assigns IDs to existing resources.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/azuretasks/virtualnetwork.go:72 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the operation for transient API issues","Inspect the VNet in the Azure portal","Recreate the VNet if it is in a corrupted state"],"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"}