{"record":{"id":"fc3f54c198b22e3f","repo":"kubernetes/kops","slug":"digitalocean-cloud-provider-currently-supports-one","errorCode":null,"errorMessage":"digitalocean cloud provider currently supports one region only.","messagePattern":"digitalocean cloud provider currently supports one region only\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/new_cluster.go","lineNumber":767,"sourceCode":"\t\t\t\t\tRegion: region,\n\t\t\t\t}\n\t\t\t\tif len(opt.SubnetIDs) != 0 {\n\t\t\t\t\t// We don't support multi-region clusters, so we can't have more than one subnet\n\t\t\t\t\tif len(opt.SubnetIDs) != 1 {\n\t\t\t\t\t\treturn nil, fmt.Errorf(\"expected exactly one subnet for GCE, got %d\", len(opt.SubnetIDs))\n\t\t\t\t\t}\n\t\t\t\t\tsubnet.ID = opt.SubnetIDs[0]\n\t\t\t\t}\n\t\t\t\tcluster.Spec.Networking.Subnets = append(cluster.Spec.Networking.Subnets, *subnet)\n\t\t\t}\n\t\t\tzoneToSubnetsMap[zoneName] = append(zoneToSubnetsMap[zoneName], subnet)\n\t\t}\n\n\t\treturn zoneToSubnetsMap, nil\n\n\tcase api.CloudProviderDO:\n\t\tif len(opt.Zones) > 1 {\n\t\t\treturn nil, fmt.Errorf(\"digitalocean cloud provider currently supports one region only.\")\n\t\t}\n\n\t\t// For DO we just pass in the region for --zones\n\t\tregion := opt.Zones[0]\n\t\tsubnet := model.FindSubnet(cluster, region)\n\n\t\t// for DO, subnets are just regions\n\t\tsubnetName := region\n\n\t\tif subnet == nil {\n\t\t\tsubnet = &api.ClusterSubnetSpec{\n\t\t\t\tName: subnetName,\n\t\t\t\t// region and zone are the same for DO\n\t\t\t\tRegion: region,\n\t\t\t\tZone:   region,\n\t\t\t}\n\t\t\tcluster.Spec.Networking.Subnets = append(cluster.Spec.Networking.Subnets, *subnet)\n\t\t}","sourceCodeStart":749,"sourceCodeEnd":785,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/new_cluster.go#L749-L785","documentation":"setupZones (DigitalOcean branch) validation: fires when more than one zone is given. DigitalOcean zones are regions and the provider supports only a single region per cluster, so multi-zone input is rejected before subnet mapping.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/new_cluster.go:767 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a single --zones value (one DO region) for DigitalOcean clusters","Split multi-region deployments into separate clusters"],"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"}