{"record":{"id":"afb5074203e1c483","repo":"kubernetes/kops","slug":"scw-access-key-has-to-be-set","errorCode":null,"errorMessage":"SCW_ACCESS_KEY has to be set","messagePattern":"SCW_ACCESS_KEY has to be set","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/scaleway/scalewaymetadata/profile.go","lineNumber":47,"sourceCode":"\tscwProfileName := os.Getenv(\"SCW_PROFILE\")\n\tif scwProfileName == \"\" {\n\t\treturn nil, nil\n\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","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scaleway/scalewaymetadata/profile.go#L29-L65","documentation":"Validation error from checkCredentials: after merging the SCW_PROFILE-based profile with environment overrides, the access key is still empty. It flags the missing SCW_ACCESS_KEY input specifically; it is aggregated with any other missing-credential errors before being returned.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/scaleway/scalewaymetadata/profile.go:47 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set SCW_ACCESS_KEY (or add AccessKey to the named profile in the config file)","Find the access key in the Scaleway console under credentials","Run 'scw init' to generate 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-12T07:17:12.445Z"}