I trained probably 80% indoors for an IM. But I used a wahoo trainer with my
actual bike in it to make sure I could hold my position for the duration of the race. It worked fine, but there is something to be said about air resistance and wind. Hard to replicate on a trainer.