The approach to safe fasting depends on your treatment. If you use only insulin sensitizers, you should not experience any major issues when fasting.
For type 2 diabetics taking secretagogues (including incretin-based), just not taking them during the period of the fast should be sufficient. For those on insulin, typically a modest reduction in basal insulin, holding the prandial doses for the meals to be omitted, and taking care not to overeat before and after the fast will yield a safe fast.
But remember, these are just general guidelines and you should ask your doctor for specific recommendations for you.