---
title: Attach Instances
url: https://docs.vultr.com/products/storage/block-storage/management/attach-instances
description: Learn how to connect and manage Block Storage volumes with your Vultr instances for expanded storage capacity.
publish_date: 2024-09-23T20:20:34.831796Z
last_updated: 2026-05-27T20:17:34.267132Z
---

# How to Manage Attachments for Vultr Block Storage Volume

Attaching a Vultr Block Storage volume to a Vultr Cloud Compute instance allows the instance to discover the new storage device. You can then mount the volume to the file system to expand storage. Ensure the Vultr Block Storage volume and the Vultr Cloud Compute instance are in the same region before attaching the volume. You can also remove the attachment if you no longer wish to associate the volume with the instance.

Follow this guide to manage attachments for Vultr Block Storage volume using the Vultr Console, Vultr API, and Vultr CLI.

=== "Vultr Console"

    1. Navigate to **Products** and select **Cloud Storage**.
    1. Click **Block Storage**. Then, select the target Vultr Block Storage volume.
    1. Navigate to **Attach to:** and select the Cloud Compute instance.
    1. Confirm that you want to attach the Block Storage volume.
    1. Click **Detach** if you want to remove the Block Storage volume from the Vultr Cloud Compute instance.

=== "Vultr API"

    1. Send a `GET` request to the [**List Block Storages** endpoint](https://www.vultr.com/api/#tag/block/operation/list-blocks) and note the Vultr Block Storage volume `ID`.

        ```console
        $ curl "https://api.vultr.com/v2/blocks" \
            -X GET \
            -H "Authorization: Bearer ${VULTR_API_KEY}"
        ```

    1. Send a `GET` request to the [List Cloud Compute Instances](https://www.vultr.com/api/#tag/instances/operation/list-instances) endpoint and note the Vultr Cloud Compute instance `ID`.

        ```console
        $ curl "https://api.vultr.com/v2/instances" \
            -X GET \
            -H "Authorization: Bearer ${VULTR_API_KEY}"
        ```

    1. Send a `POST` request to the [Attach Block Storage](https://www.vultr.com/api/#tag/block/operation/attach-block) endpoint, specify a Vultr Block Storage volume ID and a Vultr Cloud Compute instance ID. Then, specify the `"live" : true` option to attach the volume without restarting the Vultr Cloud Compute instance.

        ```console
        $ curl "https://api.vultr.com/v2/blocks/block_storage_id/attach" \
            -X POST \
            -H "Authorization: Bearer ${VULTR_API_KEY}" \
            -H "Content-Type: application/json" \
            --data '{
                "instance_id" : "cloud_compute_instance_id",
                "live" : true
            }'
        ```

    1. Send a `POST` request to the [**Detach Block Storage** endpoint](https://www.vultr.com/api/#tag/block/operation/detach-block) to detach the Block Storage volume from the Vultr Cloud Compute instance.

        ```console
        $ curl "https://api.vultr.com/v2/blocks/block_storage_id/detach" \
            -X POST \
            -H "Authorization: Bearer ${VULTR_API_KEY}" \
            -H "Content-Type: application/json" \
            --data '{
                "live" : true
            }'
        ```

        Visit the [**Detach Block Storage** endpoint](https://www.vultr.com/api/#tag/block/operation/detach-block) to view additional attributes to add to your request.

=== "Vultr CLI"

    1. List all Vultr Block Storage volumes and note the ID of the target volume. For instance, `6856bb78-e67b-416c-8fc1-2473c66fa016`.

        ```console
        $ vultr-cli block-storage list
        ```

    1. List all Vultr Cloud Compute instances and note the instance ID. For instance, `6cd130db-ae61-4995-8f44-7c57daa532fe`.

        ```console
        $ vultr-cli instance list
        ```

    1. Attach the volume to the instance by specifying the Vultr Block Storage volume ID and Vultr Cloud Compute instance ID.

        ```console
        $ vultr-cli block-storage attach block_storage_id \
        --instance instance_id
        ```

    1. Detach a Vultr Block Storage volume from a Vultr Cloud Compute instance by specifying the Vultr Block Storage volume ID.

        ```console
        $ vultr-cli block-storage detach block_storage_id
        ```   
    
        Run `vultr-cli block-storage detach --help` to view all options.
    
=== "Terraform"

    1. Open your existing Terraform configuration for the volume (and instance).

    1. Attach: add `attached_to_instance` to your `vultr_block` resource and apply.

        ```terraform
        resource "vultr_block" "remote_block_storage" {
            # ...existing fields (region, size_gb, label, block_type)
            attached_to_instance = vultr_instance.server.id
        }
        ```

    1. Detach: remove the field from the resource and apply.

        ```terraform
        resource "vultr_block" "remote_block_storage" {
            # ...existing fields (region, size_gb, label, block_type)
            # attached_to_instance removed to detach
        }
        ```
