President Donald Trump's decision to pull out of an international agreement to fight global warming has sparked resistance among powerful tech leaders, including the heads of SpaceX and Salesforce.

Elon Musk, founder and CEO of SpaceX as well as of electric car company Tesla, on Thursday announced plans to resign from two of Trump's advisory teams after the president announced the U.S. would leave the Paris Agreement on climate change. Musk sat on Trump's economic advisory council and on the board of a manufacturing jobs initiative.

“Am departing presidential councils. Climate change is real. Leaving Paris is not good for America or the world," Musk tweeted Thursday in response to the news.

Musk's sentiments were echoed by Robert Iger, chairman and CEO of the Walt Disney Company, who also backed out.

“As a matter of principle, I've resigned from the President's Council over the #ParisAgreement withdrawal,” Iger tweeted Thursday.

Salesforce CEO Marc Benioff tweeted he was "deeply disappointed" in the president's decision. Benioff, who in March met with Trump, German Chancellor Angela Merkel and IBM CEO Ginni Rometty to discuss manufacturing jobs, wrote, "we will double our efforts to fight climate change."

Saleforce has been working for years on achieving net-zero greenhouse gases and 100-percent renewable energy.

Benioff and Microsoft President Brad Smith also tweeted a link to a letter urging Trump to remain in the Paris Agreement before he made the announcement Thursday. The letter, cosigned by Apple, Facebook, Google, Hewlett-Packard, Intel, Microsoft and Salesforce, among others, argued the pact could "reduce future climate impacts, including damage to business facilities and operations, declining agricultural productivity and water supplies and disruption of global supply changes."

Microsoft has "actively engaged the Trump administration on the business case for remaining in the Paris Agreement. We’ve sent letters to and held meetings on this topic with senior officials in the State Department and the White House," a company statement read.

The software company, whose CEO Satya Nadella also met with Trump and other tech titans at Trump Tower in December, is still "steadfastly committed to the sustainability, carbon and energy goals that we have set as a company and to the Paris Agreement’s ultimate success."

Other tech executives had similar responses, including:

- Google CEO Sundar Pichai, who tweeted he was “Disappointed with today’s decision" and that "Google will keep working hard for a cleaner, more prosperous future for all."
- General Electric Chairman and CEO Jeff Immelt, who tweeted "climate change is real. Industry must now lead and not depend on government.”
- Twitter co-founder Jack Dorsey, who called the decision "an incredibly shortsighted move backwards by the federal government" and noted "[w]e're all on this planet together and we need to work together.”
- Facebook founder Mark Zuckerberg, who said in a Facebook post leaving the pact "is bad for the environment, bad for the economy, and it puts our children's future at risk," and that the company has committed to power all its new data centers with 100-percent renewable energy.
- Apple CEO Tim Cook, who wrote in an internal email obtained by Recode that while he "spoke with President Trump on Tuesday and tried to persuade him to keep the U.S. in the agreement," it ultimately "wasn't enough." The decision "will have no impact on Apple's efforts to protect the environment," including using renewable energy, attempting to stop mining new materials, and encouraging suppliers to use clean energy.