As reported by the club official website:

Juventus Football Club can this evening confirm that Medhi Benatia has joined the club on a season-long loan deal from Bayern Munich for a fee of €3 million, to be paid at the international transfer release.
The agreement also provides Juventus with the option to purchase the defender on a permanent basis for a price of €17 million, to be paid over two financial years. This option must be exercised before 30 May 2017.