India actually attacked Sri Lanka, although bit later than 1971.
You have to understand that 1971 war happened at the peak of ‘cold war’, and so, both superpowers were indirect party to this war. Sri Lanka was in USA camp in those days, and so, naturally they allowed their resources to be used by an USA ally named Pakistan.
During the war, India had planned a blitzkrieg attack on Pakistan’s infantry in Dhaka, in order to end the war early. This was very important, because the Pakistani Army had left many of the roads to Dhaka undefended, moving their defenses at the bridge-heads and defensive strong-points, expecting to hold the Indian Army at these positions long enough, till the UN and USA’s pressure could halt the Indian advance. That was their ‘master plan’ (and no plan B).
Decisive airdrops of Meghna Heli Bridge on 09 Dec, followed by Tangail Airdrop on 11 Dec, could ensure a huge encirclement of Pakistani forces in Dhaka itself, only because a significant number of infantry was approaching from Indian side.
Sam Manekshaw had taken 8 months to prepare for this operation, and had planned it to a T. Now, considering a run time shuffling of the resources, and pulling out a subset for the southern front, would have diluted, as well as delayed above execution (or worse, could have failed it as well, had USA intervened further).
Although Indira Gandhi didn’t forget Sri Lanka’s assistance for the cause of Pakistan. And few years later, when she was back in power and this time, since opposition was not sniffing at her back, she devised the revenge:
India, through its intelligence agency Research and Analysis Wing (RAW), provided arms, training and monetary support to six Sri Lankan Tamil insurgent groups including the LTTE. During that period, 32 camps were set up in India to train these 495 LTTE insurgents, including 90 women who were trained in 10 batches. The first batch of Tigers were trained in Establishment 22 based in Chakrata, Uttarakhand. The second batch, including LTTE intelligence chief Pottu Amman, trained in Himachal Pradesh. Prabakaran visited the first and the second batch of Tamil Tigers to see them training.
Eight other batches of LTTE were trained in Tamil Nadu. Thenmozhi Rajaratnam alias Dhanu, who carried out the assassination of Rajiv Gandhi and Sivarasan—the key conspirator were among the militants trained by RAW, in Nainital, India.
Reference: Liberation Tigers of Tamil Eelam
LTTE was encouraged by Indira Gandhi herself, and that was her revenge for 1971 war only (also, there is a theory of supposed pressure from KGB).
Although, this turned out to be the worst episode in India’s foreign doctrine. Since then, India has avoided its’ level best, to stay away from state sponsored terrorism.
So, why India didn’t attack Sri Lanka in 1971, because it would have been foolish, and more important, Sam Manekshaw would NOT have allowed it at all. He was an independent executioner and didn’t take orders from politicians in military matters.
In his own words, “I wonder whether those of our political masters who have been put in charge of the defense of the country can distinguish a mortar from a motor; a gun from a howitzer; a guerrilla from a gorilla, although a great many resemble the latter.”
Answer by Niketan on Quora.