In surgical patients, diabetes is associated with increased length of hospital stay and complications. Optimal glycaemic control is important to reduce complications, and enhanced recovery after surgery/fast-track protocols reduce the impact of surgery on glucose homeostasis. Guidelines for perioperative diabetes management are complex and not always supported by highest-grade evidence; this also includes guidelines for use of newer peroral antidiabetic drugs. Technology for automated insulin delivery based on continuous glucose monitoring is available and could potentially simplify and improve perioperative diabetic management, as argued in this review.