{"record":{"id":"aa527786c4e10295","repo":"kubernetes/kops","slug":"error-building-dns-api-client-v-aa5277","errorCode":null,"errorMessage":"error building DNS API client: %v","messagePattern":"error building DNS API client: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/gce/gce_cloud.go","lineNumber":162,"sourceCode":"\t\treturn nil, fmt.Errorf(\"error building compute API client: %v\", err)\n\t}\n\tc.compute = computeClient\n\n\tstorageClient, err := storage.NewClient(ctx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error building storage API client: %v\", err)\n\t}\n\tc.storage = storageClient\n\n\tiamService, err := newIamClientImpl(ctx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error building IAM API client: %v\", err)\n\t}\n\tc.iam = iamService\n\n\tdnsClient, err := newDNSClientImpl(ctx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error building DNS API client: %v\", err)\n\t}\n\tc.dns = dnsClient\n\n\tcloudResourceManager, err := cloudresourcemanager.NewService(ctx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error building cloudresourcemanager API client: %w\", err)\n\t}\n\tc.cloudResourceManager = cloudResourceManager\n\n\tCacheGCECloudInstance(region, project, c)\n\n\t{\n\t\t// Attempt to log the current GCE service account in user, for diagnostic purposes\n\t\t// At least until we get e2e running, we're doing this always\n\t\ttokenInfo, err := c.getTokenInfo(ctx)\n\t\tif err != nil {\n\t\t\tklog.Infof(\"unable to get token info: %v\", err)\n\t\t} else {","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/gce/gce_cloud.go#L144-L180","documentation":"NewGCECloud wraps newDNSClientImpl failure while building the Cloud DNS client — the fourth sequential API client constructed when a new GCE cloud instance is created. Credential or service-initialization failure aborts NewGCECloud.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/gce/gce_cloud.go:162 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix Application Default Credentials","Enable the DNS API on the project","Check the wrapped error"],"exampleFix":null,"handlingStrategy":"try-catch","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"}