Your resignation is a formal statement of your intention to leave a job or position. • He announced his resignation as the PM's senior adviser.
If you describe something as a bolt from the blue, you mean that it is a complete surprise. The expression is a metaphor. The 'bolt' is a lightning bolt (as in the photo on The Guardian's front page), and 'the blue' is the sky. In fact, just hours after the surprise news that Pope Benedict XVI is to quit the papacy, a lightning bolt struck St Peter's Basilica. A message from above?