So it wasn't a valid military target since the collateral damage to an ally was not worth the damage to Russia since Russia is now just shipping its oil via different routes.
Strategic prudence is not the same as the law of war, which made the pipeline a legitimate target for Ukraine. And, for what its worth, Russia’s net income from fossil fuel exports is hurting and their domestic fuel market is in a pinch due to diminished supply.
Not oil, gas. Some people keep getting this mixed up. Russian oil always went out just like Saudi oil does, on tankers.
Russia has put in gas liquefaction gear and terminals on an emergency basis, and is now competing on the global LNG market. Nobody is tied to a sole source for LNG and its become a global commodity.