Earlier, Red Bull, Toro Rosso and the New Zealander insisted that they did not know who would drive for the energy drink company's junior team in 2018.
Hartley and Pierre Gasly have now been confirmed.
"To be honest, I knew about the contract for several weeks," Hartley told Russia's Championat.
"For me it was not a surprise."
Hartley has rounded out 2017 with a busy calendar as he juggled his new F1 duties with his other job with Porsche in the world endurance championship.
As for 2018, however, he said: "I doubt that I can participate in two series at the same time.
"I don't know all the details of my contract for next season, but sometimes it's not easy to change from one series to another. These are different cars that require different settings and driving style.
"But it was the end of this season, so it was fine."
Hartley came 13th in the United States Grand Prix but was forced to retire in both Mexico and Brazil.