Houston obtained infielder Bobby Borchering and outfielder Marc Krauss in the trade, Houston's fifth this month. After opening the season with a payroll of about $61 million, the Astros have jettisoned veterans earning a combined $49 million. Jed Lowrie, at $1.15 million, is Houston's highest-paid player.
Johnson said he was surprised by the deal.
"I know that's strange to say because it seems like everyone is being traded here," Johnson said. "When they called me out to the cage, I was in shock. I didn't know what to do. This is all pretty new to me."
Johnson was hitting .279 with eight home runs and 41 RBIs in 92 games for the Astros this season. He has spent his entire four-year career with the Astros, batting .274 with 26 home runs and 136 RBIs.
Johnson said he knew a roster move had to be made with the Astros having 26 men in the clubhouse Sunday after claiming infielder-outfielder Steve Pearce off waivers from Baltimore the previous day.
"This is tough," Johnson said. "This is all I have known since 2006 when I was drafted. I moved here. It's definitely tough, but that is the way things go. I am excited to move on to the Arizona Diamondbacks."
Johnson was initially in the lineup Sunday against the Pirates before being replaced by Scott Moore at third base. Pearce got the start at first base.
Houston dealt first baseman Carlos Lee to Miami for two prospects on July 4, sent left-hander J.A. Happ and right-hander Brandon Lyon to Toronto as part of a 10-player trade on July 20, then traded closer Brett Myers to the Chicago White Sox for two minor league pitchers on July 21. The Astros sent left-hander Wandy Rodriguez to the Pirates for three minor leaguers on Tuesday.
Johnson said he was excited to go to the Diamondbacks.
"They have a good ballclub," he said. "I'm going to do my best to go about my business the exact same way I did here. That's why they traded for me. That's what they want me to do."
Borchering has 20 homers and 68 RBIs combined this season for Class A Visalia and Double-A Mobile. He was Arizona's first pick in the 2009 amateur draft and was rated by Baseball America as the best power hitter in the Diamondbacks organization in 2012. Krauss was hitting .283 with 15 homers and 61 RBIs at Mobile.
Information from The Associated Press was used in this report.