{"record":{"id":"4f58db2aed90754c","repo":"kubernetes/kops","slug":"cannot-apply-changes-to-backend-service-v","errorCode":null,"errorMessage":"cannot apply changes to backend service: %v","messagePattern":"cannot apply changes to backend service: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/gcetasks/backend_service.go","lineNumber":138,"sourceCode":"\t\tProtocol:            *e.Protocol,\n\t\tHealthChecks:        hcs,\n\t\tLoadBalancingScheme: *e.LoadBalancingScheme,\n\t\tBackends:            backends,\n\t}\n\n\tif a == nil {\n\t\tklog.V(2).Infof(\"Creating BackendService: %q\", bs.Name)\n\n\t\top, err := cloud.Compute().RegionBackendServices().Insert(cloud.Project(), cloud.Region(), bs)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error creating backend service: %v\", err)\n\t\t}\n\n\t\tif err := cloud.WaitForOp(op); err != nil {\n\t\t\treturn fmt.Errorf(\"error waiting for backend service: %v\", err)\n\t\t}\n\t} else {\n\t\treturn fmt.Errorf(\"cannot apply changes to backend service: %v\", changes)\n\t}\n\n\treturn nil\n}\n\nfunc (a *BackendService) URL(cloud gce.GCECloud) string {\n\treturn fmt.Sprintf(\"https://www.googleapis.com/compute/v1/projects/%s/regions/%s/backendServices/%s\",\n\t\tcloud.Project(),\n\t\tcloud.Region(),\n\t\t*a.Name)\n}\n\ntype terraformBackend struct {\n\tBalancingMode *terraformWriter.Literal `cty:\"balancing_mode\"`\n\tGroup         *terraformWriter.Literal `cty:\"group\"`\n}\n\ntype terraformBackendService struct {","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/gcetasks/backend_service.go#L120-L156","documentation":"Returned from BackendService.RenderGCE when the backend service already exists (a != nil). The task implements no update path — any diff between actual and expected is reported as unappliable via this error.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/gcetasks/backend_service.go:138 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Compare the printed changes against the cluster spec and reconcile the drift manually","Update the kOps cluster spec to match the live backend service if it was changed intentionally","Delete and let kOps recreate the backend service if managed config must win"],"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"}