It seems that something in your configuration is blocking Terraform from querying the instances during the planning phase, and so Terraform doesn’t know which instances of aws_instance.items you are trying to query.
I’m not sure why that is from only the information given here, but the following are two common reasons:
var.username has a value that isn’t known during planning, so that data source doesn’t know what query to send. (This would be possible only if this is a nested module and if that variable is being assigned from a resource attribute that won’t be known until the apply step)
aws_instances.servers itself depends on something that has changes pending, and so Terraform wants to wait until the apply step to ensure that it’s fetching the most up-to-date set of instances.
Terraform should typically explain itself at least a little in the output produced alongside this error message. Specifically, I would expect it to announce that the first data source needs to be deferred to the apply phase, and then in parentheses give a hint as to why that is true, such as “because it depends on other resources with changes pending” (which would match the second possibility I described above).
If we can determine more specifically what’s going on here then we may be able to find a different way to explain this situation to Terraform so that it can better understand the relationships between all of these resources.