Personally i keep my equipment inside out of the sun. My advice would be to put it inside the barn, but if you are not going to lay the barn foundation together with the pool, i would put it behind the barn with a sun shield tarp or something like that.
If you ever intend on going pool solar the barn roof would probably be the best choice for efficiency with the equipment nearby. A gas heater and associated equipment should go outside the barn perhaps in a shed to keep it out of the sun and to not make a watery muddy mess in the barn when draining the filter backwashing, etc.
I have a barn that was built at the same time as our pool. We put the filter, pump, SWCG, etc. inside the barn and the heat pump is just outside of the barn. I love having the equipment in the barn, in the winter a drain everything to winterize and just leave it in place, no need to disconnect electric from the pump or store anything. Keeping the sun off of the filter and pump helps extend their life, our filter and pump still look brand new after 3 seasons.