{"record":{"id":"31a3e7cef73b188b","repo":"kubernetes/kops","slug":"found-multiple-tags-for-v","errorCode":null,"errorMessage":"found multiple tags for: %v","messagePattern":"found multiple tags for: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/awstasks/elastic_ip.go","lineNumber":119,"sourceCode":"\t\tvar filters []ec2types.Filter\n\t\tfilters = append(filters, awsup.NewEC2Filter(\"key\", \"AssociatedElasticIp\"))\n\t\tfilters = append(filters, awsup.NewEC2Filter(\"resource-id\", *e.TagOnSubnet.ID))\n\n\t\trequest := &ec2.DescribeTagsInput{\n\t\t\tFilters: filters,\n\t\t}\n\n\t\tresponse, err := cloud.EC2().DescribeTags(ctx, request)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error listing tags: %v\", err)\n\t\t}\n\n\t\tif response == nil || len(response.Tags) == 0 {\n\t\t\treturn nil, nil\n\t\t}\n\n\t\tif len(response.Tags) != 1 {\n\t\t\treturn nil, fmt.Errorf(\"found multiple tags for: %v\", e)\n\t\t}\n\t\tt := response.Tags[0]\n\t\tpublicIP = t.Value\n\t\tklog.V(2).Infof(\"Found public IP via tag: %v\", *publicIP)\n\t}\n\n\tif publicIP != nil || allocationID != nil {\n\t\trequest := &ec2.DescribeAddressesInput{}\n\t\tif allocationID != nil {\n\t\t\trequest.AllocationIds = []string{fi.ValueOf(allocationID)}\n\t\t} else if publicIP != nil {\n\t\t\trequest.Filters = []ec2types.Filter{awsup.NewEC2Filter(\"public-ip\", *publicIP)}\n\t\t}\n\n\t\tresponse, err := cloud.EC2().DescribeAddresses(ctx, request)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error listing ElasticIPs: %v\", err)\n\t\t}","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/awstasks/elastic_ip.go#L101-L137","documentation":"The deprecated tag-based lookup found more than one AssociatedElasticIp tag on the referenced subnet; kOps expects exactly one and cannot choose between conflicting tags.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/awstasks/elastic_ip.go:119 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the stale AssociatedElasticIp tags from the subnet, leaving one","Migrate to a non-deprecated ElasticIP association mechanism"],"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"}