{"record":{"id":"a37254ee9599b283","repo":"kubernetes/kops","slug":"error-building-security-groups-v","errorCode":null,"errorMessage":"error building security groups: %v","messagePattern":"error building security groups: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/awsmodel/spotinst.go","lineNumber":299,"sourceCode":"\tif err != nil {\n\t\treturn fmt.Errorf(\"error building iam instance profile: %v\", err)\n\t}\n\n\t// Root volume.\n\tgroup.RootVolumeOpts, err = b.buildRootVolumeOpts(ig)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error building root volume options: %v\", err)\n\t}\n\n\t// Tenancy.\n\tif ig.Spec.Tenancy != \"\" {\n\t\tgroup.Tenancy = new(ig.Spec.Tenancy)\n\t}\n\n\t// Security groups.\n\tgroup.SecurityGroups, err = b.buildSecurityGroups(c, ig)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error building security groups: %v\", err)\n\t}\n\n\t// SSH key.\n\tgroup.SSHKey, err = b.LinkToSSHKey()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error building ssh key: %v\", err)\n\t}\n\n\t// Load balancers.\n\tgroup.LoadBalancers, group.TargetGroups, err = b.buildLoadBalancers(c, ig)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error building load balancers: %v\", err)\n\t}\n\n\t// User data.\n\tgroup.UserData, err = b.BootstrapScriptBuilder.ResourceNodeUp(c, ig)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error building user data: %v\", err)","sourceCodeStart":281,"sourceCodeEnd":317,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/awsmodel/spotinst.go#L281-L317","documentation":"Resolving the elastigroup's security groups failed; mapping the instance group's role and stack to security group tasks produced an error, with the cause in the wrapped error.","triggerScenarios":"Thrown at pkg/model/awsmodel/spotinst.go:299 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error and the cluster's security group settings","Verify the instance group's subnets/zones are consistent","Re-run kops update"],"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"}