Now when David settled in his house, David said to the prophet Nathan, "I am living in a house of cedar, but the ark of the covenant of the Lord is under a tent."
Nathan said to David, "Do all that you have in mind, for God is with you."
But that same night the word of the Lord came to Nathan, saying:
Go and tell my servant David: Thus says the Lord: You shall not build me a house to live in.
For I have not lived in a house since the day I brought out Israel to this very day, but I have lived in a tent and a tabernacle.
References for 1 Chronicles 17:5
Wherever I have moved about among all Israel, did I ever speak a word with any of the judges of Israel, whom I commanded to shepherd my people, saying, Why have you not built me a house of cedar?