{"record":{"id":"62cce68d29d29f2f","repo":"kubernetes/kops","slug":"found-virtual-network-without-address-space","errorCode":null,"errorMessage":"found virtual network without address space","messagePattern":"found virtual network without address space","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/azuretasks/virtualnetwork.go","lineNumber":82,"sourceCode":"\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,\n\t\tLifecycle: n.Lifecycle,\n\t\tShared:    n.Shared,\n\t\tResourceGroup: &ResourceGroup{\n\t\t\tName: n.ResourceGroup.Name,\n\t\t},\n\t\tCIDR: addrPrefixes[0],\n\t\tTags: found.Tags,\n\t}, nil\n}\n","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/azuretasks/virtualnetwork.go#L64-L100","documentation":"The Azure virtualnetwork task's Find validates the discovered VNet shape before reuse: ID, Properties, and AddressSpace must all be present. This guard fires when an existing virtual network lacks an address space — a malformed/externally-modified VNet — so the task cannot compute address prefixes and refuses to adopt it (failed provisioning state is warned-and-ignored one branch earlier).","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/azuretasks/virtualnetwork.go:82 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the VNet's address space in the Azure portal","Add an address range to the VNet if it genuinely has none","Retry the find operation"],"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-12T12:17:11.808Z"}