"As we know, F1 is something that not all drivers can adapt to this fast.
"Therefore, we're looking forward to having a full year with them; one where we can hopefully provide them with a good package which, combined with driver consistency, can surely put them in the best possible situation to deliver."
Toro Rosso will run Honda power units in 2018 and Hartley will be expected to help provide feedback to the team and help get the car further up the grid.
Hartley is in Bahrain for the final World Endurance Championship race of the season this week and will race at the season-ending Abu Dhabi Grand Prix next weekend before returning to New Zealand to get married over summer.
"I'd like to thank Red Bull and Toro Rosso for believing in me and giving me this second chance - dreams can come true," the New Zealander said.
"I'm now going to carry on working harder than ever in order to finish this busy end of season on a high and start the new year as strong as possible... Bring it."