VPC is a set of products and features allowing you to build your own virtual private cloud on top of Scaleway's shared public cloud. It currently consists of Private Networks, which allows instances to be interconnected through a dedicated, private, and flexible L2 network.
You can add as many servers to your networks as you want, and add up to eight (8) different networks per server, taking the form of additional network interfaces inside your instance. This allows you to run services isolated from the public internet and expose them to the rest of your infrastructure without worrying about public network filtering.
Instances can be plugged and unplugged from a network at will, even when the instance is running: the network interface will be hot-plugged to the server, and software can be configured to automatically set it up as soon as it appears.
You need to have an HTTP client such as
curl to use Scaleway API. It is
also a good idea to have
jq which will help you to read and parse
JSON output. Make sure you have these two tools before you begin. Otherwise use your package manager
to install them.
To call Scaleway API, you need an
X-Auth-Token. If you don't have one yet, refer to our
doc about generating API keys.
Next, you will need your Project ID to create VPC resources in. If you don't have it, refer to our doc about creating a Project.
Finally, you will need to chose the Availability Zone in which to create your Private Networks. Keep in mind that Private Networks are per zone and not per region, thus you will only be able to connect Instances to networks from the same Availability Zone.
You can customize the name, tags and project ID for the created Private Network.
id field of the response: it is your Private Network ID, and is useable across all
Scaleway products that support Private Networks. Since it will be used in the next steps, we will
put it in a variable for the sake of readability.
To delete your Private Network, you can use the following call:
Please note that the Private Network must be empty to be deleted, so be sure to remove any other Scaleway product from your network prior to deletion.
Each product has its own API to interact with Private Networks, and each will be described here.
Scaleway Instances support Private Networks on a per-server basis. For this, you will need an instance in the same Availability Zone as your Private Network, and the Instance ID. For readability purposes, we will put the Instance ID in a variable:
Then, use the following call to attach the Instance to your Private Network:
id field of the response: it is your Private NIC ID. For readability purposes, we will
put it in a variable:
mac_address field of the response, as it will allow you to identify the Private NIC
inside your Instance. If successful, a new network interface will appear inside your Instance,
ready to be configured to transmit traffic to other instances of the same network, with the MAC
address returned by the API call.
dmesg, you can confirm that the network interface has been plugged:
ip -br link, you can confirm the presence of the network interface, and confirm its
name if several networks are plugged to your instance:
You can now refer to our online documentation on how to configure those network interfaces.
To delete your Private NIC, which equates to unplugging your Instance from the Private Network, you can use the following call:
Then the network interface should disappear from your Instance.
A private network allows interconnecting your instances in an isolated and private network. The network reachability is limited to the instances that are on the same private network. Network Interface Controllers (NICs) are available on the instance and can be freely managed (adding IP addresses, shutdown interface...)
Note that an instance can be a part of multiple private networks.
name_desc. The default value is