github.com/armen/terraform@v0.5.2-0.20150529052519-caa8117a08f1/website/source/docs/providers/cloudstack/r/disk.html.markdown (about) 1 --- 2 layout: "cloudstack" 3 page_title: "CloudStack: cloudstack_disk" 4 sidebar_current: "docs-cloudstack-resource-disk" 5 description: |- 6 Creates a disk volume from a disk offering. This disk volume will be attached to a virtual machine if the optional parameters are configured. 7 --- 8 9 # cloudstack\_disk 10 11 Creates a disk volume from a disk offering. This disk volume will be attached to 12 a virtual machine if the optional parameters are configured. 13 14 ## Example Usage 15 16 ``` 17 resource "cloudstack_disk" "default" { 18 name = "test-disk" 19 attach = "true" 20 disk_offering = "custom" 21 size = 50 22 virtual-machine = "server-1" 23 zone = "zone-1" 24 } 25 ``` 26 27 ## Argument Reference 28 29 The following arguments are supported: 30 31 * `name` - (Required) The name of the disk volume. Changing this forces a new 32 resource to be created. 33 34 * `attach` - (Optional) Determines whether or not to attach the disk volume to a 35 virtual machine (defaults false). 36 37 * `device` - (Optional) The device to map the disk volume to within the guest OS. 38 39 * `disk_offering` - (Required) The name or ID of the disk offering to use for 40 this disk volume. 41 42 * `size` - (Optional) The size of the disk volume in gigabytes. 43 44 * `shrink_ok` - (Optional) Verifies if the disk volume is allowed to shrink when 45 resizing (defaults false). 46 47 * `virtual_machine` - (Optional) The name of the virtual machine to which you 48 want to attach the disk volume. 49 50 * `zone` - (Required) The name or ID of the zone where this disk volume will be available. 51 Changing this forces a new resource to be created. 52 53 ## Attributes Reference 54 55 The following attributes are exported: 56 57 * `id` - The ID of the disk volume. 58 * `device` - The device the disk volume is mapped to within the guest OS.