wait_resource should use id when available

Change-Id: Ib1a7ee13e1eb50e06b68d709ac0d38456f43ed4f
Merge "wait_resource should use id when available"