Officers fired tyre-deflation rounds at the raiders' Mercedes after they tried to ram a police car to escape.
Two further rounds were discharged at another car which was mistakenly thought to be involved.
The Police Investigations and Review Commissioner (Pirc) said the officers' response was "wholly justified."
No members of the public were injured during the incident on 12 February last year.
The five men were arrested outside the restaurant after stealing an ATM in Carnoustie earlier that day.
Seven men were convicted of blowing up cash machines at banks and supermarkets across England and Scotland at Liverpool Crown Court this week.
The Pirc report said the police firearms response was "necessary and proportionate" due to the high risk posed to the public.
Commissioner Kate Frame said: "The police response, to what was a significant threat to public safety and the officers themselves, was wholly justified.
"They had reliable intelligence to indicate they were dealing with suspects who had access to firearms, a history of extreme violence and who had previously used high-powered stolen vehicles to ram police vehicles and escape.
"When the suspects then used the same dangerous tactic to try and avoid arrest during this incident, the use of tyre deflation rounds to disable their vehicle was not only necessary but proportionate."

The Hammersmith and City Line has been suspended between Edgware Road and Hammersmith over fears debris could fall on to the tracks.
The Circle Line is also closed partly due to the fire and partly because of planned engineering work.
Transport for London (TfL) said the move had been made "at the request of the London Fire Brigade".
The fire broke out at the 24-storey block, which contained 120 one and two-bedroom flats, early on Wednesday morning.
Police presume 58 people have died but have warned the figure could grow.
A sign at Ladbroke Grove station said "owing to the safety of the Tower" the lines had been partly suspended.
The London Fire Brigade confirmed it had requested the lines be temporarily closed because of a "short-term risk of some debris falling on to the tracks".
A spokesman said teams were working to secure the debris so the lines could be reopened as soon as possible.
Police firearms officers who cornered an ATM theft gang at an Arbroath McDonald's restaurant shot at a car not involved in the crime, it has emerged.
[NEXT_CONCEPT]
Two London Tube lines remained part suspended on Sunday due to safety concerns with Grenfell Tower.