Well, you played well enough, you opp played bad, but he was lucky, you was unlucky . It happens... I only don't like your all in move.
I'm not going to say anything new, I'll just say it more explicit...
Your pushing all in was hasty.
A) If he has a made flush, you're destined to be wiped out
B) If he has only a draw, YOU WANT HIM to call. You just have to destroy his pot odds
and $500 is enough.
So, your all in move has two implications:
a) you lost the possibility to fold, if a diamond falls
b) you made his call difficult (If he hasn't Ad or trips, he would certainly fold. However, he might call $500)
He made a huge mistake by calling you, but luck have been on his side...