This feature is in public preview.
Create a subnet
Create subnets to allow instances to communicate with each other. A subnet lives in one availability zone, identified by its region and availability zone. Instances attached to the subnet must be in that same zone. In the console, open Networks and select Create Network. While launching an instance, you can also select Create network under Network. With the CLI, pass the workspace, a name, the region, the availability zone, and a CIDR (Classless Inter-Domain Routing) block.POST request to /preview/v2/subnets.
cidr block must fall within one of the private address ranges, be a /28 or larger, and have no host bits set (for example, 10.1.0.0/16).
10.1.0.0/24 subnet, the first instance receives 10.1.0.4. The /28 minimum leaves room for these reserved addresses. Each subnet supports up to 256 live instances, subject to available addresses. Use a /23 or larger subnet for 256 instances; a /24 has 251 assignable addresses.
List subnets
With the CLI, list the subnets in the active workspace. Pass--all to list
every workspace where you can list subnets.
GET request. Pass workspace to scope the list to one workspace; omit it to
list every workspace where you can list subnets.
Get subnet details
With the CLI, pass the subnet’s name. The CLI looks it up in the active workspace.Attach instances to a subnet
Specify the subnet when you create an instance. Pass its ID or resource path in the optionalsubnet field of the create request. See Instances for the other creation fields. You cannot attach, detach, or move a running instance to another subnet.
In the console, choose a pool and SKU, then select the subnet from the Network menu. With the CLI, pass --subnet.
--private-ip option, or the API’s private_ip field. An address stays reserved until the instance’s host confirms teardown, so a terminated instance can hold its address for a short time after it stops.
Delete a subnet
Deletion fails while an instance is attached, including after termination is requested but before its host confirms teardown. With the CLI, pass the subnet’s name. The CLI asks you to type the name to confirm; pass--yes to
skip the prompt.
DELETE request with the subnet’s ID or resource path.