{"record":{"id":"28411a93a9d249f3","repo":"kubernetes/kops","slug":"error-creating-poolhealthcheck-v","errorCode":null,"errorMessage":"error creating PoolHealthCheck: %v","messagePattern":"error creating PoolHealthCheck: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/gcetasks/poolhealthcheck.go","lineNumber":100,"sourceCode":"}\n\nfunc (_ *PoolHealthCheck) CheckChanges(a, e, changes *PoolHealthCheck) error {\n\treturn nil\n}\n\nfunc (p *PoolHealthCheck) RenderGCE(t *gce.GCEAPITarget, a, e, changes *PoolHealthCheck) error {\n\tif a == nil {\n\t\ttargetPool := fi.ValueOf(p.Pool.Name)\n\t\treq := &compute.TargetPoolsAddHealthCheckRequest{\n\t\t\tHealthChecks: []*compute.HealthCheckReference{\n\t\t\t\t{\n\t\t\t\t\tHealthCheck: p.Healthcheck.SelfLink,\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\t\top, err := t.Cloud.Compute().TargetPools().AddHealthCheck(t.Cloud.Project(), t.Cloud.Region(), targetPool, req)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error creating PoolHealthCheck: %v\", err)\n\t\t}\n\n\t\tif err := t.Cloud.WaitForOp(op); err != nil {\n\t\t\treturn fmt.Errorf(\"error creating PoolHealthCheck: %v\", err)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (_ *PoolHealthCheck) RenderTerraform(t *terraform.TerraformTarget, a, e, changes *PoolHealthCheck) error {\n\treturn nil\n}\n","sourceCodeStart":82,"sourceCodeEnd":113,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/gcetasks/poolhealthcheck.go#L82-L113","documentation":"Wrapped error from PoolHealthCheck.RenderGCE when the TargetPools.AddHealthCheck call fails while attaching a health check to a target pool (a == nil). The %v carries the GCE rejection — commonly an invalid health-check self-link or a missing target pool.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/gcetasks/poolhealthcheck.go:100 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the referenced health check exists and its SelfLink is valid for the project","Confirm the target pool exists in the region before attach","Inspect the wrapped error and re-run after fixing the underlying issue"],"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"}