{"record":{"id":"0bb2fcd3f35e9b0d","repo":"kubernetes/kops","slug":"vmscaleset-is-missing-id-or-name","errorCode":null,"errorMessage":"VMScaleSet is missing ID or Name","messagePattern":"VMScaleSet is missing ID or Name","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/resources/azure/azure.go","lineNumber":525,"sourceCode":"\n\treturn &resources.Resource{\n\t\tObj:     vmss,\n\t\tType:    typeVMScaleSet,\n\t\tID:      *vmss.ID,\n\t\tName:    *vmss.Name,\n\t\tDeleter: g.deleteVMScaleSet,\n\t\tBlocks:  blocks,\n\t\tBlocked: blocked,\n\t\tDumper:  DumpVMScaleSet,\n\t}, nil\n}\n\nfunc (g *resourceGetter) toVMScaleSetVMResource(vmss *compute.VirtualMachineScaleSet, vm *compute.VirtualMachineScaleSetVM) (*resources.Resource, error) {\n\tif vm == nil || vm.ID == nil {\n\t\treturn nil, fmt.Errorf(\"VMScaleSetVM is missing ID\")\n\t}\n\tif vmss == nil || vmss.Name == nil || vmss.ID == nil {\n\t\treturn nil, fmt.Errorf(\"VMScaleSet is missing ID or Name\")\n\t}\n\n\trid, err := arm.ParseResourceID(*vm.ID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tinstanceID := rid.Name\n\n\tname := \"\"\n\tif vm.Properties != nil && vm.Properties.OSProfile != nil && vm.Properties.OSProfile.ComputerName != nil {\n\t\tname = *vm.Properties.OSProfile.ComputerName\n\t} else if vm.Name != nil {\n\t\tname = *vm.Name\n\t} else {\n\t\tname = instanceID\n\t}\n\n\treturn &resources.Resource{","sourceCodeStart":507,"sourceCodeEnd":543,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/resources/azure/azure.go#L507-L543","documentation":"Fires in toVMScaleSetVMResource when the parent VM Scale Set is nil or lacks ID/Name, so the VM instance resource cannot be keyed against its scale set during Azure discovery — a guard against incompletely populated VMSS objects from the API.","triggerScenarios":"Thrown at pkg/resources/azure/azure.go:525 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run discovery; the VMSS may have been concurrently deleted","Verify the VMSS exists and is fully provisioned via az CLI","Remove orphaned resources in the resource group if the VMSS is gone"],"exampleFix":null,"handlingStrategy":"type-guard","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"}