From 41e6851c1577b81630f74926710eeda9ad21a728 Mon Sep 17 00:00:00 2001 From: Joe Topjian Date: Sat, 27 Feb 2016 04:13:26 +0000 Subject: [PATCH] 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. --- .../openstack/resource_openstack_compute_instance_v2.go | 2 +- .../providers/openstack/r/compute_instance_v2.html.markdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/providers/openstack/resource_openstack_compute_instance_v2.go b/builtin/providers/openstack/resource_openstack_compute_instance_v2.go index 2115c0b99..28803da70 100644 --- a/builtin/providers/openstack/resource_openstack_compute_instance_v2.go +++ b/builtin/providers/openstack/resource_openstack_compute_instance_v2.go @@ -201,7 +201,7 @@ func resourceComputeInstanceV2() *schema.Resource { }, "volume_size": &schema.Schema{ Type: schema.TypeInt, - Optional: true, + Required: true, }, "destination_type": &schema.Schema{ Type: schema.TypeString, diff --git a/website/source/docs/providers/openstack/r/compute_instance_v2.html.markdown b/website/source/docs/providers/openstack/r/compute_instance_v2.html.markdown index ef91edfaa..2b8dc1b55 100644 --- a/website/source/docs/providers/openstack/r/compute_instance_v2.html.markdown +++ b/website/source/docs/providers/openstack/r/compute_instance_v2.html.markdown @@ -121,7 +121,7 @@ The `block_device` block supports: * `source_type` - (Required) The source type of the device. Must be one of "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.