Vine entered the eighth and final stage with the smallest of margins to attempt to overcome, but Diaz was well protected by his Delko teammates all day, ensuring the victory for the Spaniard.
The 25-year-old Queenslander rode hard as his team helped him mount a final attack on top spot, but he was unable to make up significant ground and crashed on a tight corner with 2km left in the race.
Vine didn't lose any time due to the crash being in the last 3km, but this meant he still finished with the one second gap to Diaz, and lamented the result in a post to his Instagram, although he was still happy with his efforts.
"I'd be lying if I didn't admit, I'm disappointed not to have taken the overall win," Vine wrote. "I never stopped believing.
"I still thought I could somehow get the GC being just 1 second off, so obviously, it's a bit rough not being able to take the win.
"But I can walk away saying I gave it absolutely everything I had. The team backed me and we fought as hard as we could."
Meanwhile, 35-year-old Cavendish showed no signs of slowing down as he capped a very strong performance at the Tour, riding smartly and timing his sprint in the final stretch to overtake Jasper Philipsen (Alpecin-Fenix) for the stage win.