{"record":{"id":"4b5b55c3c646705b","repo":"kubernetes/kops","slug":"spotinst-unsupported-cloud-provider-s","errorCode":null,"errorMessage":"spotinst: unsupported cloud provider: %s","messagePattern":"spotinst: unsupported cloud provider: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/resources/spotinst/spotinst.go","lineNumber":52,"sourceCode":"\n// NewCloud returns a Cloud interface for the specified cloud provider.\nfunc NewCloud(cloudProviderID kops.CloudProviderID) (Cloud, error) {\n\tvar (\n\t\tcloud Cloud\n\t\tsess  = session.New(NewConfig())\n\t\teg    = elastigroup.New(sess)\n\t\toc    = ocean.New(sess)\n\t)\n\n\tswitch cloudProviderID {\n\tcase kops.CloudProviderAWS:\n\t\tcloud = &awsCloud{\n\t\t\teg: &awsElastigroupService{eg.CloudProviderAWS()},\n\t\t\toc: &awsOceanService{oc.CloudProviderAWS()},\n\t\t\tls: &awsOceanLaunchSpecService{oc.CloudProviderAWS()},\n\t\t}\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"spotinst: unsupported cloud provider: %s\", cloudProviderID)\n\t}\n\n\treturn cloud, nil\n}\n\n// NewConfig returns a new configuration object.\nfunc NewConfig() *spotinst.Config {\n\tconfig := spotinst.DefaultConfig()\n\n\tconfig.WithCredentials(NewCredentials())\n\tconfig.WithLogger(NewStdLogger())\n\tconfig.WithUserAgent(\"kubernetes-kops/\" + kopsv.Version)\n\n\treturn config\n}\n\n// NewCredentials returns a new chain-credentials object.\nfunc NewCredentials() *credentials.Credentials {","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/resources/spotinst/spotinst.go#L34-L70","documentation":"NewCloud only implements the Spotinst Cloud interface for AWS; any other CloudProviderID falls into the default branch and is rejected before any Spotinst API call is made.","triggerScenarios":"Thrown at pkg/resources/spotinst/spotinst.go:52 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Spotinst integration only supports AWS clusters; set spec.cloudProvider to aws","Remove Spotinst settings (elastigroup/ocean) when using other providers"],"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"}