You don’t have to create a VPC before you launch your first instance. If you launch without --subnet-urn, the platform uses your project’s default VPC, and creates it the first time a launch needs it. Every later launch without a subnet reuses the same default VPC and its subnet.
What the default VPC contains
The default VPC differs from a VPC you create in two ways:
- It has an Internet Gateway attached from the start.
- Its subnet has auto-assign public IP turned on, so every instance launched into it gets a Floating IP.
Everything else is the same as for any other VPC: a random private /16 IPv4 range, an IPv6 range, a main route table, a default network ACL and a default security group. For the address rules, see VPC and subnet addressing.
The default security group admits SSH, HTTP, HTTPS and ICMP from anywhere, and all traffic from other members of the same group. An instance in the default VPC with a public address answers ping and accepts SSH right after launch; every other port needs an ingress rule. See Security groups.
A VPC you create with create-vpc never becomes a project’s default VPC.
Auto-assigned public IPs
A subnet’s auto-assign public IP setting decides whether instances launched into it get a Floating IP automatically. The default VPC’s subnet has it on; you can turn it on or off for any subnet. See Create a VPC and subnets.
When the setting is on, the platform allocates a Floating IP and associates it with the instance’s network interface at launch. If that fails for any reason, for example because no public address is available, the launch still succeeds and the instance runs without a public IP.
An auto-assigned Floating IP is released when you terminate the instance. You don’t have to release it yourself. To keep a public address across instances, allocate a Floating IP yourself instead; the platform never releases an address you allocated. See Floating IPs.
Changing the setting affects only instances launched afterwards. Turning it on doesn’t give a Floating IP to running instances, and turning it off doesn’t take one away.
When to use your own VPC instead
Create your own VPC when you want private-only instances, your own address range, or more than one subnet. Name its subnet with --subnet-urn when you launch. For the launch command, see Launch an instance.