An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
Welcome to Microsoft Q&A
Hello @Fengqizhang-6483 I hope you are doing well,
The error code PublicIpForGatewayIsRequired is occurring because Azure architecture dictates that an internet-facing VPN Gateway cannot exist without a public IP endpoint. The system is actively blocking the deletion because completing the action would leave your gateway without a required IP address.
Because your VPN Gateway is on the Basic SKU, it only supports Basic Public IPs. You cannot remove the IP, and you cannot attach a Standard IP to a Basic gateway.
To meet the June 30, 2026 deprecation deadline, you should not delete the IP reference. Instead, follow this upgrade path:
Step 1: Upgrade the VPN Gateway SKU. First, migrate or resize your VPN Gateway from the Basic SKU to a higher, Standard-compatible SKU (such as VpnGw1).
- Step 2: Upgrade the IP In-Place. Once your gateway is running on the upgraded SKU, navigate directly to your Public IP resource in the Azure portal. You can use the built-in option to upgrade the IP allocation directly from Basic to Standard without needing to delete it.
If my answer helped you resolve your issue, please consider marking it as the correct answer. This helps others in the community find solutions more easily. Thanks!