Skip to content
Odinex Cloud
Terraform providerReferenceResources

odinex_volume_attachment

Attaches a volume to a server. The ID is the volume ID. Do not set server_id on the odinex_volume at the same time.

Attaches a volume to a server. The ID is the volume ID. Do not set server_id on the odinex_volume at the same time.

Example Usage

resource "odinex_volume_attachment" "data" {
  volume_id = odinex_volume.data.id
  server_id = odinex_server.web.id
}

Schema

Required

  • server_id (Number) ID of the server.
  • volume_id (Number) ID of the volume.

Read-Only

  • id (String) Unique ID of the resource.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# The ID is the volume ID.
terraform import odinex_volume_attachment.data 12

On this page