@Badr HOUSSNI , Yes, your approach is right. To change subnet address range the resources, need to be deleted/migrated to another subnet. Being said that we also need to be cautious while deleting resources as there might be some components still attached to the subnet which will not allow you to delete the subnet. For example, if you have deleted a VM without deleting the NIC then the NIC turns to ghosted NIC and will not allow subnet deletion. I have done a quick repro on this,
Subnet 1 and subnet are created out of single address range /16:
Changing address range of subnet 1 without deleting subnet2:
After deleting subnet 2 there will be no space for overlapping:
----------
If you think your question has been answered, click "Mark as Answer" if just helped click "Vote as helpful". This can be beneficial to other community members reading this forum thread.