He made a big impression with the Cardiff club side at the end of last season, playing three full games and one as a replacement on loan from Newport.
In the recent Under-21 World Cup Thomas featured in all five games for Wales.
Blues' coach David Young said,
'David comes from the same valley as myself and I have followed his career closely since his early schooldays. We were deliighted with his form when he helped Cardiff out at the end of last season and he is a very valuable addition to our new squad. He is sure to be an asset and has a great future.'