{"record":{"id":"f9986824cea3af6e","repo":"kubernetes/kops","slug":"creating-vmss-vms-client-w-f99868","errorCode":null,"errorMessage":"creating VMSS VMs client: %w","messagePattern":"creating VMSS VMs client: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/azure/vmscalesetvm.go","lineNumber":66,"sourceCode":"\t}\n\treturn l, nil\n}\n\nfunc (c *vmScaleSetVMsClientImpl) Delete(ctx context.Context, resourceGroupName, vmssName, instanceId string) error {\n\tfuture, err := c.c.BeginDelete(ctx, resourceGroupName, vmssName, instanceId, nil)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"deleting VMSS VM: %w\", err)\n\t}\n\tif _, err = future.PollUntilDone(ctx, nil); err != nil {\n\t\treturn fmt.Errorf(\"waiting for VMSS VM deletion completion: %w\", err)\n\t}\n\treturn nil\n}\n\nfunc newVMScaleSetVMsClientImpl(subscriptionID string, cred *azidentity.DefaultAzureCredential) (*vmScaleSetVMsClientImpl, error) {\n\tc, err := compute.NewVirtualMachineScaleSetVMsClient(subscriptionID, cred, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"creating VMSS VMs client: %w\", err)\n\t}\n\treturn &vmScaleSetVMsClientImpl{\n\t\tc: c,\n\t}, nil\n}\n","sourceCodeStart":48,"sourceCodeEnd":72,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/azure/vmscalesetvm.go#L48-L72","documentation":"Wraps the compute.NewVirtualMachineScaleSetVMsClient construction failure, which builds the ARM client from the subscription ID and DefaultAzureCredential. Fires when the Azure SDK cannot be initialized — most commonly an invalid subscription ID or missing/unresolvable credentials (env vars, managed identity, CLI login).","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/azure/vmscalesetvm.go:66 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify AZURE_SUBSCRIPTION_ID is a valid GUID","Authenticate via az login or set AZURE_CLIENT_ID/AZURE_TENANT_ID/AZURE_CLIENT_SECRET","If using managed identity, confirm it is assigned to the running machine","Check the wrapped error for which credential chain step failed"],"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"}