Now when David was settled in his palace, he said to Nathan the prophet, "Here I am living in this beautiful cedar palace, but the Ark of the LORD's covenant is out in a tent!"
Nathan replied, "Go ahead with what you have in mind, for God is with you."
But that same night God said to Nathan,
"Go and tell my servant David, 'This is what the LORD says: You are not the one to build me a temple to live in.
I have never lived in a temple, from the day I brought the Israelites out of Egypt until now. My home has always been a tent, moving from one place to another.
And I never once complained to Israel's leaders, the shepherds of my people. I have never asked them, 'Why haven't you built me a beautiful cedar temple?'
References for 1 Chronicles 17:6