{"record":{"id":"65e3f22a1f10ae98","repo":"kubernetes/kops","slug":"error-building-ssh-key-task-w","errorCode":null,"errorMessage":"error building ssh key task: %w","messagePattern":"error building ssh key task: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/scalewaymodel/sshkey.go","lineNumber":37,"sourceCode":"import (\n\t\"fmt\"\n\n\t\"k8s.io/kops/upup/pkg/fi\"\n\t\"k8s.io/kops/upup/pkg/fi/cloudup/scalewaytasks\"\n)\n\n// SSHKeyModelBuilder configures SSH objects\ntype SSHKeyModelBuilder struct {\n\t*ScwModelContext\n\tLifecycle fi.Lifecycle\n}\n\nvar _ fi.CloudupModelBuilder = &SSHKeyModelBuilder{}\n\nfunc (b *SSHKeyModelBuilder) Build(c *fi.CloudupModelBuilderContext) error {\n\tname, err := b.SSHKeyName()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error building ssh key task: %w\", err)\n\t}\n\tsshKeyResource := fi.Resource(fi.NewStringResource(string(b.SSHPublicKeys[0])))\n\n\tt := &scalewaytasks.SSHKey{\n\t\tName:      new(name),\n\t\tLifecycle: b.Lifecycle,\n\t\tPublicKey: &sshKeyResource,\n\t}\n\tc.AddTask(t)\n\n\treturn nil\n}\n","sourceCodeStart":19,"sourceCodeEnd":50,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/scalewaymodel/sshkey.go#L19-L50","documentation":"Wrapped failure of SSHKeyName() while building the Scaleway SSH-key task: the SSH key name could not be derived (typically missing SSH public keys in the cluster spec). The root cause is carried in the %w error.","triggerScenarios":"Thrown at pkg/model/scalewaymodel/sshkey.go:37 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide an SSH public key in the cluster spec (spec.sshKeyName)","Check the wrapped error for the exact derivation failure"],"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-12T07:17:12.445Z"}