After a later bilateral meeting with Merkel, Trump said he brought up the nat gas pipeline, as well as military spending and trade, with the German leader. He added the U.S. and Germany have a good relationship.

Speaking in Brussels Wednesday at the summit of NATO leaders, Trump said, “Germany is totally controlled by Russia,” citing as "inappropriate” the Nord Stream 2 natural gas pipeline that would run directly from Russia to Germany under the Baltic Sea. “They will be getting between 60 and 70 percent of their energy from Russia and a new pipeline.”

But for the U.S. president to say “Germany is a captive nation of Russia, that's just a gross insult to [German Chancellor Angela Merkel ] and the German people,” Nicholas Burns told CNBC on Wednesday. He was U.S. ambassador to NATO and the State Department's third-ranking official under former President George W. Bush .

The negative implications of Germany , and other European countries, being too beholden to Russia for energy should concern President Donald Trump and the broader NATO alliance, according to a former diplomat who advised both Republican and Democratic administrations.

Donald Trump at the first work session of the North Atlantic council at the NATO Summit, July 11, 2018.

"It's a mistake by the Germans to enter into this long-term [pipeline] arrangement by the Russians," said Burns, also a former advisor to Presidents George H.W. Bush and Bill Clinton.

However, Trump would “do better to lower the decibel levels in public,” Burns said in a “Squawk Box” interview. "Of course you want to have that argument with Merkel behind the scenes. The question is do you want to embarrass Merkel publicly and consistently go after her. The president has been going after her publicly on the immigration issue for a couple of weeks now. She's your leading economic partner here in Europe. She leads the strongest country in Europe."

"Telling it like it is, I know it has some charm for some people,” he added. “Frankly, I'd rather have an effective president. And right now, he doesn't look very effective."

Trump on Wednesday also called out Germany for “paying a little bit over 1 percent” on defense,” saying that’s “inappropriate also.”

Burns, a professor at the Harvard Kennedy School of Government, said, “Trump is right to push this issue of defense budgets because Europeans do need to spend more, particularly Germany, on their national defense."

The NATO alliance consists of 29 countries from North America and Europe, including the U.S. and Germany, which was originally set up in 1949 to thwart Soviet aggression in Western Europe.

As a check against Russia, the 2014 annexation of the Crimean Peninsula from Ukraine by Moscow has been a concern of NATO.

After meeting with embattled British Prime Minister Theresa May in London and a golf weekend at a Trump-owned course in Scotland, the president travels to Helsinki for next week’s meeting with Russian President Vladimir Putin.

The White House did not immediately respond to a request for comment.