{"record":{"id":"26779c562dc5a93f","repo":"kubernetes/kops","slug":"name-is-required-26779c","errorCode":null,"errorMessage":"--name is required","messagePattern":"--name is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kops/edit_instancegroup.go","lineNumber":89,"sourceCode":"\tSets []string\n\t// Unsets allows unsetting values directly in the spec.\n\tUnsets []string\n}\n\nfunc NewCmdEditInstanceGroup(f *util.Factory, out io.Writer) *cobra.Command {\n\toptions := &EditInstanceGroupOptions{}\n\n\tcmd := &cobra.Command{\n\t\tUse:     \"instancegroup INSTANCE_GROUP\",\n\t\tAliases: []string{\"instancegroups\", \"ig\"},\n\t\tShort:   editInstancegroupShort,\n\t\tLong:    editInstancegroupLong,\n\t\tExample: editInstancegroupExample,\n\t\tArgs: func(cmd *cobra.Command, args []string) error {\n\t\t\toptions.ClusterName = rootCommand.ClusterName(true)\n\n\t\t\tif options.ClusterName == \"\" {\n\t\t\t\treturn fmt.Errorf(\"--name is required\")\n\t\t\t}\n\n\t\t\tif len(args) == 0 {\n\t\t\t\treturn fmt.Errorf(\"must specify the name of the instance group to edit\")\n\t\t\t}\n\n\t\t\toptions.GroupName = args[0]\n\n\t\t\tif len(args) != 1 {\n\t\t\t\treturn fmt.Errorf(\"can only edit one instance group at a time\")\n\t\t\t}\n\n\t\t\treturn nil\n\t\t},\n\t\tValidArgsFunction: completeInstanceGroup(f, nil, nil),\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\treturn RunEditInstanceGroup(cmd.Context(), f, out, options)\n\t\t},","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/cmd/kops/edit_instancegroup.go#L71-L107","documentation":"The edit instancegroup command's argument validator found no cluster name: rootCommand.ClusterName(true) returned empty because neither --name nor a configured default cluster exists. The target cluster must be known before an IG can be edited.","triggerScenarios":"Thrown at cmd/kops/edit_instancegroup.go:89 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass --name <clustername> to the command","Configure a default cluster name for the kops CLI"],"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"}