{"record":{"id":"8620001332612b9d","repo":"kubernetes/kops","slug":"resourceid-not-provided-to-gettags","errorCode":null,"errorMessage":"resourceID not provided to getTags","messagePattern":"resourceID not provided to getTags","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/awsup/aws_cloud.go","lineNumber":1198,"sourceCode":"\tisEventualConsistency, found := tagsEventualConsistencyErrors[errCode]\n\tif found {\n\t\treturn isEventualConsistency\n\t}\n\tif errCode != \"\" {\n\t\tklog.Warningf(\"Uncategorized error in isTagsEventualConsistencyError: %v\", errCode)\n\t}\n\treturn false\n}\n\n// GetTags will fetch the tags for the specified resource,\n// retrying (up to MaxDescribeTagsAttempts) if it hits an eventual-consistency type error\nfunc (c *awsCloudImplementation) GetTags(resourceID string) (map[string]string, error) {\n\treturn getTags(c, resourceID)\n}\n\nfunc getTags(c AWSCloud, resourceID string) (map[string]string, error) {\n\tif resourceID == \"\" {\n\t\treturn nil, fmt.Errorf(\"resourceID not provided to getTags\")\n\t}\n\tctx := context.TODO()\n\n\ttags := map[string]string{}\n\n\trequest := &ec2.DescribeTagsInput{\n\t\tFilters: []ec2types.Filter{\n\t\t\tNewEC2Filter(\"resource-id\", resourceID),\n\t\t},\n\t}\n\n\tattempt := 0\n\tfor {\n\t\tattempt++\n\n\t\tresponse, err := c.EC2().DescribeTags(ctx, request, func(o *ec2.Options) {\n\t\t\to.RetryMaxAttempts = DescribeTagsMaxAttempts\n\t\t})","sourceCodeStart":1180,"sourceCodeEnd":1216,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/awsup/aws_cloud.go#L1180-L1216","documentation":"Guard error: getTags was called with an empty resourceID, so the DescribeTags filter would match nothing meaningful. The caller passed a blank resource identifier; this is a programming error, not an AWS failure.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/awsup/aws_cloud.go:1198 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the caller to pass a non-empty EC2 resource ID (instance/volume/AMI id)","Add a check at the call site before invoking GetTags"],"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"}