One move. It’s all the Giants need to make. It virtually could assure a division title so long as other players have their normal years. It would solidify the roster. It would shift the balance of power in the National League West.

It would be signing Zack Greinke.

Greinke isn’t a prototypical Dodger if only because he loves the Giants. The manager, the players, even the park (1.78 ERA in four starts). He had a good time at the All-Star Game when his catcher was Buster Posey and his manager was Bruce Bochy, who picked him over Madison Bumgarner to start, and said he didn’t know who to root for in last year’s World Series because he liked the Giants’ players so much.

And the Royals were his first team.

Greinke is expected to opt out of his L.A. deal, pooh-pooh the remaining three years and $71 million and dive into free agency, in which he could make $30 million or more a year. That’s Clayton Kershaw’s average annual salary. And Max Scherzer’s.

So for Greinke: Five years and $150 million for starters?

Signing Greinke would strengthen the Giants and weaken the Dodgers, whose only recourse would be signing David Price — it’s probably their plan, anyway. The bidding for Greinke will be intense, and the Dodgers and Yankees will be at the forefront, but the Giants can duke it out with the big boys, especially with tens of millions of dollars off the books.

They’ve doled out four of the 20 richest average-annual-salary contracts for pitchers in history: Matt Cain, Tim Lincecum, Barry Zito and Lincecum again. It would have been five had Jon Lester accepted their offer last winter.

Greinke turns 32 in October but is considered a good investment after averaging 31.5 starts a season since 2008 and coming off an all-time season: 19-3, 1.66 ERA, 0.844 WHIP. He averaged seven innings a start, a tad more than Jake Arrieta and Bumgarner.

Giving someone $30 million a year would be odd with Bumgarner owning a team-friendly deal through 2019 (including two club options), and perhaps the Giants would extend their left-hander a couple of years with upfront bonus money.

Greinke loves the Giants but kills the Giants (7-0, 2.19, 10 starts), and having him rather than facing him would solve a lot of problems.

John Shea is a San Francisco Chronicle staff writer. E-mail: jshea@sfchronicle.com Twitter: @JohnSheaHey