You can delete a subnet to release network resources if the subnet is no longer required.
A subnet cannot be deleted if it is being used by an ECS, VPN, or private IP address. To delete a subnet in these cases, you must first delete the ECS, VPN, or private IP address.
The following resources using the subnet have been deleted:
- CCE cluster
- RDS instance
- MRS cluster
- DCS instance
- Elastic load balancer
- Private IP address
- Custom route
- NAT gateway
Check and delete related resources on the management console.
- Log in to the management console.
- Click in the upper left corner and select the desired region and project.
- On the console homepage, under Network, click Virtual Private Cloud.
- In the navigation pane on the left, click Virtual Private Cloud.
- On the Virtual Private Cloud page, locate the VPC from which a subnet is to be deleted and click the VPC name.
- On the Subnet page, locate the target subnet and click Delete.
- Click Yes in the displayed dialog box.