Attach a secure VPC network to a Vultr VX1™ Cloud Compute instance via Portal or API.
A Virtual Private Cloud (VPC) network creates a secure and isolated private networking interface to enable connections to other instances attached to the same network. You can attach multiple instances to the VPC network to enable secure connections between a Vultr VX1 Cloud Compute instance and other instances attached to the same VPC network.
Follow this guide to attach a VPC network to a Vultr VX1™ Cloud Compute instance using the Vultr Customer Portal, or API.
Send a GET request to the List Instances endpoint and note your target instance's ID.
$ curl "https://api.vultr.com/v2/instances" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a GET request to the List VPCs endpoint to list all available VPCs and note the target VPC network ID.
$ curl "https://api.vultr.com/v2/vpcs" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a POST request to the Attach VPC to Instance endpoint to attach the VPC network to the instance.
$ curl "https://api.vultr.com/v2/instances/{instance-id}/vpcs/attach" \
-X POST \
-H "Authorization: Bearer ${VULTR_API_KEY}" \
-H "Content-Type: application/json" \
--data '{
"vpc_id": "<vpc-id>"
}'
If successful, you receive a 200 HTTP response.