The sale of the subs is not an act of war but it isn't exactly a friendly act. I suspect that a portion of the reason for the sale is the Germans placating their violent and vocal Muslim population by selling arms to an avowed enemy of India and Hinduism.
No, it’s because HDW is a large industrial constituency and they would like the money and work that this purchase entails. Same reason U.S. congress rubber stamps everything Boeing sells to Saudi Arabia, because of the money.