Id personally say go with the 2018!! With new updates and options its going to worth more later on. Depending on where you live, Id more then likely get able to get you into a 2018 for around the price of a 2017.
2018 no question about it
I am first time Subaru owner and bought my 2018 a couple weeks ago and checking the 17 and 18 side by side and reading about the little updates, most you cannot see even make it worth it
The list price on the remaining 2017s is still high, though I suspect you could get a good deal. My dealer only had one 2017, an STI Limited, on the lot. There were 2 2018 STIs and a couple of WRX's en route.
Unless you got a great deal, IMO $2-3000 less, I'd definitely go with the 2018. The upgrades are worth it.