Resource

dcloud_volume_attachment

Attaches a volume to an instance in the same region.

Example Usage

resource "dcloud_volume_attachment" "data" {
  volume_id   = dcloud_volume.data.id
  instance_id = dcloud_instance.web.id
}

Schema

Required

  • instance_id (String) The instance to attach to (i-…), in the volume’s zone and not terminated. Must match ^i-[0-9a-f]{6,32}$. Changing it replaces the resource.
  • volume_id (String) The id of the parent resource ({id} in the path). Changing it replaces the resource.

Read-Only

  • id (String) The resource's id.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

terraform import dcloud_volume_attachment.data <volume-id>/<instance-id>

Generated from the provider's schema.