kubernetes/kops · error
SCW_DEFAULT_PROJECT_ID has to be set
Error message
SCW_DEFAULT_PROJECT_ID has to be set
What it means
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.
Source
Thrown at upup/pkg/fi/cloudup/scaleway/scalewaymetadata/profile.go:53
return nil, fmt.Errorf("loading Scaleway config file: %w", err)
}
profile, ok := config.Profiles[scwProfileName]
if !ok {
return nil, fmt.Errorf("could not find Scaleway profile %q", scwProfileName)
}
return profile, nil
}
func checkCredentials(accessKey, secretKey, projectID string) []error {
errList := []error(nil)
if accessKey == "" {
errList = append(errList, fmt.Errorf("SCW_ACCESS_KEY has to be set"))
}
if secretKey == "" {
errList = append(errList, fmt.Errorf("SCW_SECRET_KEY has to be set"))
}
if projectID == "" {
errList = append(errList, fmt.Errorf("SCW_DEFAULT_PROJECT_ID has to be set"))
}
return errList
}
func CreateValidScalewayProfile() (*scw.Profile, error) {
var profile scw.Profile
// If the profile is REDACTED, we're running integration tests so no need to return any credentials
if profileName := os.Getenv("SCW_PROFILE"); profileName == "REDACTED" {
return &profile, nil
}
// We load the credentials form the profile first
profileFromScwConfig, err := getScalewayProfile()
if err != nil {
return nil, err
}
// We load the credentials from the environment secondView on GitHub (pinned to 4c8573c808)
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at upup/pkg/fi/cloudup/scaleway/scalewaymetadata/profile.go:53 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/823e18d25eabf438.
Report an issue: GitHub.