Configure VPCs
A Virtual Private Cloud (VPC) provides an isolated network environment for your resources within a region. This guide shows you how to create, view, and delete VPCs using the evroc CLI.
Prerequisites
- Access to an evroc organization and project.
- evroc CLI installed and configured.
View VPCs
List all VPCs in your project:
evroc networking virtualprivatecloud list
View details of a specific VPC:
evroc networking virtualprivatecloud get my-vpc
The output shows the VPC's stack type, IPv4 CIDR block (if dual-stack), and IPv6 CIDR block.
Create a VPC
When you create a VPC, you choose its stack type. A VPC's stack type constrains what stack types its subnets can use.
Create a dual-stack VPC
A dual-stack VPC supports both IPv4 and IPv6. This is the default and recommended choice.
evroc networking virtualprivatecloud create my-vpc
The VPC has both IPv4 and IPv6 connectivity and is created with:
- An IPv4 CIDR block of
10.0.0.0/16(assigned automatically if you don't specify one) - A
/56IPv6 CIDR block allocated from the service's pool
To specify a custom IPv4 CIDR block:
evroc networking virtualprivatecloud create my-vpc \
--ipv4-cidr-block=172.16.0.0/12
The IPv4 CIDR must be within one of the RFC 1918 private ranges: 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16.
Create an IPv6-only VPC
An IPv6-only VPC has no IPv4 CIDR block. All subnets in this VPC must be IPv6-only.
evroc networking virtualprivatecloud create my-vpc \
--stack-type=ipv6-only
Delete a VPC
Delete a VPC that has no subnets:
evroc networking virtualprivatecloud delete my-vpc
Important: You can't delete a VPC that contains subnets. Delete all subnets in the VPC first.
Next steps
- Configure subnets in your VPC
- Learn about IPv6 networking