Brazil 's president declared the country independent of the need for foreign oil as he opened a huge new offshore oilrig in the Atlantic Ocean on Thursday .