It became a group of seven, with Costa, Izaguirre and Van Garderen among those to bridge across, but the leading group came back together again with little more than 9km to go.
Still the attacks continued, before Rolland made the telling acceleration and bolted clear of his former breakaway companions.
Once again there was hesitation further back and this time it proved costly – the Frenchman gaining by the pedal stroke.
He did not ease off once as he soloed to stage success – Cannondale-Drapac’s first at a Grand Tour since Davide Formolo at the 2015 Giro d’Italia.
Costa won the sprint for second place, while Polanc crossed 2’14” down – enough to encourage QuickStep Floors to keep driving the pace in the bunch, but not enough to cause any panic.
The bunch eventually finished 7’53” in arrears, meaning Adam Yates (Orica-Scott) dropes back out of the top ten behind Polanc, but stage 18 in the Dolomites is the next big challenge for the GC men.
Giro d’Italia 2017: stage 17 – result
1) Pierre Rolland (FRA) – Cannondale-Drapac – 5.42.56hrs
2) Rui Costa (POR) – UAE Team Emirates +24”
3) Gorka Izaguirre (ESP) – Movistar – ST
4) Rory Sutherland (AUS) – Movistar
5) Matteo Busato (ITA) – Wilier Triestina-Selle Italia
6) Dries Devenyns (BEL) – QuickStep Floors
7) Felix Grosschartner (AUT) – CCC Sprandi Polkowice
8) Omar Fraile (ESP) – Dimension Data
9) Michael Woods (CAN) – Cannondale-Drapac
10) Julien Bernard (FRA) – Trek-Segafredo
General classification
1) Tom Dumoulin (NED) – Team Sunweb – 76.05.38hrs
2) Nairo Quintana (COL) – Movistar +31”
3) Vincenzo Nibali (ITA) – Bahrain-Merida +1.12
4) Thibaut Pinot (FRA) – FDJ +2.38
5) Ilnur Zakarin (RUS) – Katusha +2.40
6) Domenico Pozzovivo (ITA) – Ag2r-La Mondiale +3.05
7) Bauke Mollema (NED) – Trek-Segafredo +3.49
8) Bob Jungels (LUX) – QuickStep Floors +4.35
9) Steven Kruijswijk (NED) – LottoNL-Jumbo +6.20
10) Jan Polanc (SVN) – UAE Team Emirates +6.33