{"record":{"id":"5bd1a59d9076bd9f","repo":"kubernetes/kops","slug":"scw-secret-key-has-to-be-set","errorCode":null,"errorMessage":"SCW_SECRET_KEY has to be set","messagePattern":"SCW_SECRET_KEY has to be set","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/scaleway/scalewaymetadata/profile.go","lineNumber":50,"sourceCode":"\t}\n\tconfig, err := scw.LoadConfig()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"loading Scaleway config file: %w\", err)\n\t}\n\tprofile, ok := config.Profiles[scwProfileName]\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"could not find Scaleway profile %q\", scwProfileName)\n\t}\n\treturn profile, nil\n}\n\nfunc checkCredentials(accessKey, secretKey, projectID string) []error {\n\terrList := []error(nil)\n\tif accessKey == \"\" {\n\t\terrList = append(errList, fmt.Errorf(\"SCW_ACCESS_KEY has to be set\"))\n\t}\n\tif secretKey == \"\" {\n\t\terrList = append(errList, fmt.Errorf(\"SCW_SECRET_KEY has to be set\"))\n\t}\n\tif projectID == \"\" {\n\t\terrList = append(errList, fmt.Errorf(\"SCW_DEFAULT_PROJECT_ID has to be set\"))\n\t}\n\treturn errList\n}\n\nfunc CreateValidScalewayProfile() (*scw.Profile, error) {\n\tvar profile scw.Profile\n\n\t// If the profile is REDACTED, we're running integration tests so no need to return any credentials\n\tif profileName := os.Getenv(\"SCW_PROFILE\"); profileName == \"REDACTED\" {\n\t\treturn &profile, nil\n\t}\n\n\t// We load the credentials form the profile first\n\tprofileFromScwConfig, err := getScalewayProfile()\n\tif err != nil {","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scaleway/scalewaymetadata/profile.go#L32-L68","documentation":"Validation error from checkCredentials: the merged Scaleway profile has no secret key. It flags the missing SCW_SECRET_KEY input; it is aggregated with any other missing-credential errors before being returned.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/scaleway/scalewaymetadata/profile.go:50 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set SCW_SECRET_KEY (or add SecretKey to the named profile)","Create a new secret key in the Scaleway console if lost — secrets are shown once","Run 'scw init' to regenerate a complete config"],"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"}