provider/openstack: Making Block Device Size Required

The `volume_size` of a `block_device` was originally set to Optional,
but it's a required parameter in the OpenStack/Nova API. While it's
possible to infer a default size of the block device, making it required
more closely matches the Nova CLI client as well as provides consistent
experience when working with multiple block_devices.
This commit is contained in:
Joe Topjian 2016-02-27 04:13:26 +00:00
parent 93b552a58c
commit 41e6851c15
2 changed files with 2 additions and 2 deletions

View File

@ -201,7 +201,7 @@ func resourceComputeInstanceV2() *schema.Resource {
}, },
"volume_size": &schema.Schema{ "volume_size": &schema.Schema{
Type: schema.TypeInt, Type: schema.TypeInt,
Optional: true, Required: true,
}, },
"destination_type": &schema.Schema{ "destination_type": &schema.Schema{
Type: schema.TypeString, Type: schema.TypeString,

View File

@ -121,7 +121,7 @@ The `block_device` block supports:
* `source_type` - (Required) The source type of the device. Must be one of * `source_type` - (Required) The source type of the device. Must be one of
"image", "volume", or "snapshot". "image", "volume", or "snapshot".
* `volume_size` - (Optional) The size of the volume to create (in gigabytes). * `volume_size` - (Required) The size of the volume to create (in gigabytes).
* `boot_index` - (Optional) The boot index of the volume. It defaults to 0. * `boot_index` - (Optional) The boot index of the volume. It defaults to 0.