The midfielder joined Real Madrid on Tuesday after entering the last six months of his city contract.
And Guardiola warned he only wanted players who wanted to stay at the Etihad.
Asked about Diaz's departure, Guardiola said: "Like I said many times, I don't want people that don't want to stay here.
"We did with Brahim everything we have done with Phil (Foden) and with Jadon - important players and we did absolutely everything. The only one who decides to stay is Phil.
"We wish him all the best. Real Madrid is not a bad step, so hopefully he can take the minutes he wants and that he didn't want here for many reasons.
"He's a nice guy. Congratulations to the academy and the club for working so well, because important teams in Europe want our players."