{"record":{"id":"823e18d25eabf438","repo":"kubernetes/kops","slug":"scw-default-project-id-has-to-be-set","errorCode":null,"errorMessage":"SCW_DEFAULT_PROJECT_ID has to be set","messagePattern":"SCW_DEFAULT_PROJECT_ID has to be set","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/scaleway/scalewaymetadata/profile.go","lineNumber":53,"sourceCode":"\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 {\n\t\treturn nil, err\n\t}\n\t// We load the credentials from the environment second","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scaleway/scalewaymetadata/profile.go#L35-L71","documentation":"Validation error from checkCredentials: the merged Scaleway profile has no default project ID, so kOps cannot know which Scaleway project owns the cluster resources. It flags the missing SCW_DEFAULT_PROJECT_ID input; it is aggregated with any other missing-credential errors before being returned.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/scaleway/scalewaymetadata/profile.go:53 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set SCW_DEFAULT_PROJECT_ID (or add DefaultProjectID to the named profile)","Copy the project ID from the Scaleway console's project settings","Run 'scw init' which records the project ID"],"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"}