Officers visited a farm in Cherry Hinton Road on September 20 last year following information received from members of the public.
They discovered two units containing the cannabis plants, with a street value of up to £564,000 and arrested 32-year-old Liam Peposhi at the scene.
Peposhi admitted cultivating the cannabis but claimed he was doing it to pay off a £16,000 debt.
He pleaded guilty to production of cannabis and was sentenced to two years in prison at Huntingdon Crown Court on Monday (March 29).