The movement of a U.S. aircraft carrier and B-52 bombers to the Middle East have been an effective deterrent against Iran, acting Defense Secretary Patrick Shanahan said Tuesday.