To resolve the subnet deletion error due to an existing Service Association Link (SAL) with your Azure MySQL Flexible Server, follow these steps:
1. Ensure all resources in the subnet, including the MySQL Flexible Server, are deleted.
2. Manually remove the SAL from the subnet using Azure CLI or PowerShell, as Terraform doesn’t directly manage SALs.
• Use az network vnet subnet update with the --remove serviceAssociationLinks option in Azure CLI.
3. Retry deleting the subnet with Terraform after removing the SAL.
4. If the subnet was manually modified or removed, update the Terraform state using terraform refresh or terraform state rm.
Make sure your account has the necessary permissions and there are no locks on the resources. If the problem continues, contact Azure Support for further assistance.