In this chapter of Anushashana Parva of Mahabharata Lord Shiva tells the reason why his neck is blue. He states:
देवकार्यार्थ सिद्ध्धयर्थम् पिनाकं मे करे स्थितम् ।।
इन्द्रेण च पुरा वज्रं क्षिप्तं श्रीकाङ्क्षिणा मम ।
दग्ध्वा कण्ठं तु तद्यातं तेन श्रीकण्ठता मम ।।
The bow Pinaka is always in my hand for accomplishing the purposes of the deities. In days of yore, Indra, desirous of acquiring my prosperity, had hurled his thunderbolt at me. With that weapon my throat was scorched. For this reason I have become blue-throated.
Similarly in this chapter of Harivamsha Parva Lord Krishna also states:
दत्तः प्रहारः कुलिशेन पूर्वं
तवेशान सुरराज्ञातिवीर्य ।
कन्ठे नैल्यं तेन ते यत्प्रवृत्तं
तस्मात्ख्यातस्त्वं नीलकण्ठेति कल्पः ॥२-७४-३१
O highly valiant lord! Long ago, the king of deva-s, Indra struck your neck with vajra. Hence there was a mark of blue. Hence you became famous as the one with blue neck. You perceive all. Even then you pardon all such deeds.
The most famous reason for why Lord Shivas neck is blue is that he drank the Kãlakuta poison during Samundra Manthan which made his neck blue. However the blue necked epithet is itself described in SataRudriya portion of YajurVeda, and also in Kaivalya Upanishad which I also discuss here. Epithets described in the Vedas are eternal so there can be many stories which make Lord Rudras neck blue. Similarly the above story is one of them.
So, my question is:
➡What is the story of Indra attacking on Lord Shiva's neck with his Vajra?
As a sidenote, Indra also tried to attack Lord Shiva just after Tripura Samhara when Mahadeva took Vyuptakesha form as discussed here.. Here Lord Shiva paralyses Indras arm as:
Sakra, through ill-feeling endeavoured to strike that child with his thunderbolt. The divine lord Mahadeva, smiling, quickly paralysed the arm of the enraged Sakra.
Similarly in the chapter 29 of Rudra Samhita, Shiva Purana, Sati is condemning all Gods and sages about their participation in Dakshas sacrifice. Particularly for Indra she says:
इन्द्र त्वं किं न जानासि महादेवस्य विक्रमम् ।
भस्मिकृत पविस्तेन हरेण क्रुरकर्मणा ।।
Oh Indra you are all aware of the prowess of Mahadeva. The lord - performer of difficult tasks reduced your Vajra to ashes.
So, it is possible that Sati here is hinting the same incident to Indra.