Just as the Nazis responded to Poland allying with Britain and France.
Today's Russia doesn't hold much in comparison with the goals of Nazi Germany - but you're correct that both responded to geo-political events that put opposition power too close to their center of command.
Now they are gonna have NATO directly on their borders. Didn’t work out as Putin thought it would, did it. Lol.