TAMPA, Fla. — It was a temptation the Yankees simply couldn’t resist.

With a projected lineup that still appears short on power and a home-run champion on the market who could be had relatively cheaply, the Yankees swooped in Tuesday, agreeing with Chris Carter on a one-year deal. The 30-year-old righthanded hitter hit 41 homers in 160 games for the Brewers last season, tying for the National League lead.

A source confirmed the deal, which won’t become official until Carter passes a physical. USA Today first reported the agreement.

The deal, according to The Associated Press, includes a $500,000 signing bonus, a $3-million salary and $500,000 in performance bonuses: $100,000 each for 250, 300, 350, 400 and 450 plate appearances.

Carter’s primary position is first base but he also can play the outfield. He produced a .222/.321/.499 slash line with 94 RBIs last season but led the NL with 206 strikeouts. He also led the American League in that category in 2013, when he fanned 212 times as an Astro.

Speaking to The Associated Press, Carter said: “I am excited to go play for a bigger-market team with more national exposure. I’m ready for whatever role they give me. I know they have [Matt] Holliday and I know [Greg] Bird’s there, so I’m looking to help the team in way I can.”

advertisement | advertise on newsday

Carter has played 490 career games, 411 at first base, where he is not considered especially good defensively, and 192 as a designated hitter. He has played 77 games in leftfield and two in right.

On the surface, the move would seem to have the most impact on Bird and Tyler Austin. Throughout the offseason, general manager Brian Cashman said the pair would compete in spring training for the starting job at first. Carter also could be seen as insurance for Aaron Judge. Managing general partner Hal Steinbrenner has said he expects Judge to start in rightfield, but his strikeout total (42 in 84 at-bats) as a rookie concerned many in the organization.

The Yankees signed Holliday to a one-year, $13-million contract in December to be their primary DH and to provide backup options in the outfield and at first.

Bird, 24, is coming off a lost 2016 because of shoulder surgery. After an August call-up in 2015, he hit 11 homers in 46 games (157 at-bats) and played solidly in the field. The lefthanded hitter got through the Arizona Fall League healthy and arrived at the club’s minor-league complex here Monday.

Austin, 25, posted a .241/.300/.458 slash line in 31 games last season. He has been here about three weeks and working out almost every day, primarily at first base. Austin also has been working at third and in the outfield. If Bird, as expected, wins the first-base job, Austin could be kept on the roster as a super-utility player.

Yankees videos

After Cashman signed closer Aroldis Chapman to a five-year, $86-million deal in December, he said he had all but used up the offseason budget Steinbrenner gave him. The franchise’s goal remains to get under the luxury-tax threshold by 2018.

It’s the reason the Yankees had stayed quiet on the free-agent front despite wanting to add another reliever. Still, they were going to be hit with the luxury tax in 2017 regardless because their payroll commitments already were well above this year’s $195-million threshold. Carter presented them with an opportunity they didn’t want to refuse.

“My goal stays the same,” Steinbrenner said last week. “We are going to have a lower payroll this year, which means our luxury tax will be lower. At the end of this year we’ve got three guys coming off the payroll, $50 million to $60 million (with $27.5 million owed Alex Rodriguez and $25 million for CC Sabathia). We’re going to put a lot of that back into the club like we always do, but it’s going to allow me to get down to where I think any team should not have to be more than to win a championship, which is right around the threshold.”