{"record":{"id":"8a7fcb8b85a7261d","repo":"kubernetes/kops","slug":"could-not-find-scaleway-profile-q","errorCode":null,"errorMessage":"could not find Scaleway profile %q","messagePattern":"could not find Scaleway profile %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/scaleway/scalewaymetadata/profile.go","lineNumber":39,"sourceCode":"\t\"os\"\n\n\t\"github.com/scaleway/scaleway-sdk-go/scw\"\n\tk8serrors \"k8s.io/apimachinery/pkg/util/errors\"\n\t\"k8s.io/kops/upup/pkg/fi\"\n)\n\nfunc getScalewayProfile() (*scw.Profile, error) {\n\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","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scaleway/scalewaymetadata/profile.go#L21-L57","documentation":"Validation guard in getScalewayProfile: SCW_PROFILE names a profile that does not exist in the loaded Scaleway config's Profiles map. The config file parsed fine, but it has no entry with that name — a typo or an outdated profile name.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/scaleway/scalewaymetadata/profile.go:39 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["List available profiles in ~/.config/scw/config.yaml and fix the SCW_PROFILE value","Create the profile with 'scw init' or add it to the config file","Unset SCW_PROFILE to fall back to environment variables/default profile"],"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"}