A guide explaining how to set up and configure Vultr Block Storage volumes for your virtual machines
Vultr Block Storage volume is a mountable HDD or NVMe disk volume you can attach to Vultr Cloud Compute instances. These high-speed volumes offer raw block-level storage to expand your application storage needs for databases, images, audio, and video-based applications. To attach Vultr Block Storage volume to Vultr Cloud Compute instance, both resources must be in the same Vultr Location. Vultr Block Storage volumes support up to 10 TB of data encrypted with Advanced Encryption Standard (AES-256).
Follow this guide to provision Vultr Block Storage volume using the Vultr Customer Portal, API, CLI, or Terraform.
Send a GET
request to the List Regions endpoint and note the ID of your preferred region. For instance, ewr
for the New Jersey region.
$ curl "https://api.vultr.com/v2/regions" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a POST
request to the Create Block Storage endpoint to create a Vultr Block Storage volume.
$ curl "https://api.vultr.com/v2/blocks" \
-X POST \
-H "Authorization: Bearer ${VULTR_API_KEY}" \
-H "Content-Type: application/json" \
--data '{
"region" : "ewr",
"size_gb" : 80,
"label" : "Remote-Block-Storage",
"block_type": "high_perf"
}'
Visit the Create Block Storage endpoint to view additional attributes to add to your request.
Send a GET
request to the List Block Storages endpoint to list all Vultr Block Storage volumes.
$ curl "https://api.vultr.com/v2/blocks" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}" \
-H "Content-Type: application/json"
List the available Vultr Block Storage volume regions and choose your preferred region. For instance ewr
for the New Jersey region.
$ vultr-cli regions list
Create a new Vultr Block Storage volume.
$ vultr-cli block-storage create \
--block-type high_perf \
--region ewr \
--size 80 \
--label Remote-Block-Storage
List all Vultr Block Storage volumes.
$ vultr-cli block-storage list
Run vultr-cli block-storage create --help
to view all options.
Ensure the Vultr Terraform provider is configured in your Terraform project.
Define the Block Storage volume resource.
terraform {
required_providers {
vultr = {
source = "vultr/vultr"
version = "~> 2.23"
}
}
}
provider "vultr" {}
resource "vultr_block" "remote_block_storage" {
region = "ewr"
size_gb = 80
label = "Remote-Block-Storage"
block_type = "high_perf"
}
Apply the configuration and observe the following output:
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
No comments yet.