{"record":{"id":"7ff33b4188d28272","repo":"kubernetes/kops","slug":"error-waiting-for-network-creation-to-complete-w","errorCode":null,"errorMessage":"error waiting for Network creation to complete: %w","messagePattern":"error waiting for Network creation to complete: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/gcetasks/network.go","lineNumber":180,"sourceCode":"\n\t\tcase \"custom\":\n\t\t\tnetwork.AutoCreateSubnetworks = false\n\t\t\t// The boolean default value of \"false\" is omitted when the struct\n\t\t\t// is serialized, which results in the network being created with\n\t\t\t// the auto-create subnetworks default of \"true\". Explicitly send\n\t\t\t// the default value.\n\t\t\tnetwork.ForceSendFields = []string{\"AutoCreateSubnetworks\"}\n\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"unhandled mode %q\", e.Mode)\n\t\t}\n\n\t\top, err := t.Cloud.Compute().Networks().Insert(t.Cloud.Project(), network)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error creating Network: %v\", err)\n\t\t}\n\t\tif err := t.Cloud.WaitForOp(op); err != nil {\n\t\t\treturn fmt.Errorf(\"error waiting for Network creation to complete: %w\", err)\n\t\t}\n\t} else {\n\t\tif a.Mode == \"legacy\" {\n\t\t\treturn fmt.Errorf(\"GCE networks in legacy mode are not supported.  Please convert to auto mode or specify a different network.\")\n\t\t}\n\t\tempty := &Network{}\n\t\tif !reflect.DeepEqual(empty, changes) {\n\t\t\treturn fmt.Errorf(\"cannot apply changes to Network: %v\", changes)\n\t\t}\n\t}\n\n\treturn nil\n}\n\ntype terraformNetwork struct {\n\tName                  *string `cty:\"name\"`\n\tIPv4Range             *string `cty:\"ipv4_range\"`\n\tProject               *string `cty:\"project\"`","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/gcetasks/network.go#L162-L198","documentation":"Wrapped error from cloud.WaitForOp after a successful Networks.Insert submit. The network-create operation failed asynchronously (or polling errored) — e.g. legacy CIDR conflicts with an existing peered network, so the network may not exist despite the accepted request.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/gcetasks/network.go:180 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the operation error detail in the %w chain","Verify whether the network was created (gcloud compute networks describe)","Fix the underlying cause (CIDR overlap, quotas) and re-run the apply"],"exampleFix":null,"handlingStrategy":"retry","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"}