I had that a few months ago. Chances are it's just a stretched muscle/ligament. It will go. My GP gave me some non hyperglycaemic cream called Algesal to apply which is very good.
Obviously can't say for certain but I doubt it's related to your diabetes, especially as your newly diagnosed.
I've had a few cracked ribs over the years and they can be extremely uncomfortable, but as ever it's best to get a proper diagnosis from your Dr if the pain persists.