If a country were going to try to plan their economy and decide what to make or what the trade for they would make this decision in a way that is similar to how businesses make the in house vs outsource decision. You make what you have a comparative advantage in and you outsource everything else. The reason for this is that as long as transaction cost are low the gains from trade will make you wealthier.
Of course there are security concerns as well. Not just wealth. For example, food might be cheaper to outsource, but you do want to be self sufficient in food because you don't want other countries manipulating food prices in your country.