Rodriguez, 32, is guaranteed $34 million for the 2011-13 seasons with an option for 2014 that could bring the total to $44.5 million, the Astros said in a statement.
"We're very pleased to get this done," general manager Ed Wade said. "Wandy is one of the top left-handed starters in the game. With pending free agency and its uncertainty, it made all the sense in the world for us."
Rodriguez, born in the Dominican Republic, posted an 11-12 record in 2010.
(Reporting by Gene Cherry in Salvo; Editing by Julian Linden)