Create or delete a network
Create a private network (VPC) with an address range of your choice, and delete one that nothing uses any more.
Last updated 18 November 2026View as Markdown
A network costs nothing. Instances you launch without one join the region's default network.
Prerequisites
- Permission for
ec2:CreateVpc; deleting needsec2:DeleteVpc. - In the console, also
ec2:DescribeVpcsto open Networks (without it the page says "Access denied") and a network's page (without it the page is not found). - Room in the VPCs quota (the default network counts).
Create a network
- Open Compute, then Networks, and choose Create network.
- (Optional) For Name, enter prod.
- For Region, choose the region. A network cannot be moved later.
- For Address range, enter the range, or keep
10.0.0.0/16. - Choose Create network.
You can also create one from the Network picker of the launch form.
dcloud ec2 vpcs create --region-id de1 --name prod --cidr-block 10.1.0.0/16POST /ec2/api/vpcs
{ "regionId": "de1", "name": "prod", "cidrBlock": "10.1.0.0/16" }resource "dcloud_vpc" "prod" {
name = "prod"
cidr_block = "10.1.0.0/16"
}The range is a private IPv4 range (RFC 1918), /8 to /24, starting on its boundary; another is
refused with 400. The answer is 201; the network is pending until it exists at the provider,
then available. It has no subnets: instances take any free address in the range until you
create a subnet.
Delete a network
- Open the network, then choose Danger zone.
- Choose Delete network, enter the network name, and choose Delete network.
dcloud ec2 vpcs delete vpc-uuidDELETE /ec2/api/vpcs/0ea56c91-0000-4000-8000-000000000001Remove the dcloud_vpc resource and run terraform apply.
The network and its subnets are removed. The delete is refused:
400"Cannot delete the default VPC".409"Delete what is still in this VPC first: NAT gateway …" while it has a NAT gateway.409"Delete what is still in this VPC first: …" naming every instance that is not terminated, database, cache and VPN gateway still in it.
Related
Did this page help you?