{"record":{"id":"43c8f0134ff4f93e","repo":"kubernetes/kops","slug":"error-building-iam-api-client-v","errorCode":null,"errorMessage":"error building IAM API client: %v","messagePattern":"error building IAM API client: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/gce/gce_cloud.go","lineNumber":156,"sourceCode":"\tif os.Getenv(\"GOOGLE_APPLICATION_CREDENTIALS\") != \"\" {\n\t\tklog.Infof(\"Will load GOOGLE_APPLICATION_CREDENTIALS from %s\", os.Getenv(\"GOOGLE_APPLICATION_CREDENTIALS\"))\n\t}\n\n\tcomputeClient, err := newComputeClientImpl(ctx)\n\tif err != nil {\n\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{","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/gce/gce_cloud.go#L138-L174","documentation":"NewGCECloud wraps newIamClientImpl failure while building the Google IAM API client (service-account/key operations). Same credential-resolution failure mode as the other clients; construction aborts because IAM is required for cluster lifecycle operations.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/gce/gce_cloud.go:156 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix Application Default Credentials","Verify IAM API is enabled 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"}