In the strictest sense of keeping Torah, we do find that attachment with God is a primary principle in Torah--along with the Ten Commandments.  We  find the major things the Torah is concerned with are: (1) Bringing the Jewish people into the Land of Israel,  (2) Attachment with God, (3) Fear of God, (4) Love of God, and (5) The Ten Commandments. Now there are lots of commandants in the Torah besides the  ten, but the ten are considered to be the roots of all the others.

"What does God want from you but to fear and love God and to walk in his ways and do his commandments?" (Deuteronomy)

"לדבקה בו" to be attached with God is mentioned twice in Deuteronomy as a command. Though in a practical sense this means to be attached with 'Torah scholars" תלמידי חכמים still אין מקרא יוצא מידי פשוטו and that is how the author of Sefer Yeraim  a disciple of Rabbainu Tam describes it.