{"record":{"id":"f98678aeffdd914f","repo":"kubernetes/kops","slug":"scw-access-key-is-required","errorCode":null,"errorMessage":"SCW_ACCESS_KEY is required","messagePattern":"SCW_ACCESS_KEY is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"dnsprovider/pkg/dnsprovider/providers/scaleway/dns.go","lineNumber":68,"sourceCode":"\t})\n}\n\n// TokenSource implements oauth2.TokenSource\ntype TokenSource struct {\n\tAccessToken string\n}\n\n// Token returns oauth2.Token\nfunc (t *TokenSource) Token() (*oauth2.Token, error) {\n\ttoken := &oauth2.Token{\n\t\tAccessToken: t.AccessToken,\n\t}\n\treturn token, nil\n}\n\nfunc newClient() (*scw.Client, error) {\n\tif accessKey := os.Getenv(\"SCW_ACCESS_KEY\"); accessKey == \"\" {\n\t\treturn nil, fmt.Errorf(\"SCW_ACCESS_KEY is required\")\n\t}\n\tif secretKey := os.Getenv(\"SCW_SECRET_KEY\"); secretKey == \"\" {\n\t\treturn nil, fmt.Errorf(\"SCW_SECRET_KEY is required\")\n\t}\n\n\tscwClient, err := scw.NewClient(\n\t\tscw.WithUserAgent(\"kubernetes-kops/\"+kopsv.Version),\n\t\tscw.WithEnv(),\n\t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn scwClient, nil\n}\n\n// Interface implements dnsprovider.Interface\ntype Interface struct {","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/dnsprovider/pkg/dnsprovider/providers/scaleway/dns.go#L50-L86","documentation":"Guard in the Scaleway DNS provider's newClient: the SCW_ACCESS_KEY environment variable is empty, so no Scaleway client can be built. It is a configuration sentinel error — the provider requires both SCW_ACCESS_KEY and SCW_SECRET_KEY before any API interaction.","triggerScenarios":"Thrown at dnsprovider/pkg/dnsprovider/providers/scaleway/dns.go:68 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Export SCW_ACCESS_KEY with your Scaleway access key","Configure via Scaleway config file","Verify keys in the Scaleway console"],"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"}