diff options
author | Duncan Mac-Vicar P <dmacvicar@suse.de> | 2016-03-20 00:08:24 +0100 |
---|---|---|
committer | Duncan Mac-Vicar P <dmacvicar@suse.de> | 2016-03-20 00:08:24 +0100 |
commit | 8496660254ab1bb662d5f257cdf8040d6b229eb3 (patch) | |
tree | dee45841c87bf7c83f82d065363f9214b8f3fc6c /libvirt/resource_libvirt_volume.go | |
parent | b04c660ab38731036e6f1a602376e090fbdee31c (diff) | |
download | terraform-provider-libvirt-8496660254ab1bb662d5f257cdf8040d6b229eb3.tar terraform-provider-libvirt-8496660254ab1bb662d5f257cdf8040d6b229eb3.tar.gz |
base_volume -> base_volume_id to make it consistent with volume_id in disk
Diffstat (limited to 'libvirt/resource_libvirt_volume.go')
-rw-r--r-- | libvirt/resource_libvirt_volume.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libvirt/resource_libvirt_volume.go b/libvirt/resource_libvirt_volume.go index 76e73d02..b811c584 100644 --- a/libvirt/resource_libvirt_volume.go +++ b/libvirt/resource_libvirt_volume.go @@ -35,7 +35,7 @@ func volumeCommonSchema() map[string]*schema.Schema { Computed: true, ForceNew: true, }, - "base_volume": &schema.Schema{ + "base_volume_id": &schema.Schema{ Type: schema.TypeString, Optional: true, ForceNew: true, @@ -110,17 +110,17 @@ func resourceLibvirtVolumeCreate(d *schema.ResourceData, meta interface{}) error volumeDef.Capacity.Amount = size } else { _, noSize := d.GetOk("size") - _, noBaseVol := d.GetOk("base_volume") + _, noBaseVol := d.GetOk("base_volume_id") if noSize && noBaseVol { - return fmt.Errorf("'size' needs to be specified if no 'source' or 'base_vol' is given.") + return fmt.Errorf("'size' needs to be specified if no 'source' or 'base_volume_id' is given.") } volumeDef.Capacity.Amount = d.Get("size").(int) } - if baseVolumeId, ok := d.GetOk("base_volume"); ok { + if baseVolumeId, ok := d.GetOk("base_volume_id"); ok { if _, ok := d.GetOk("size"); ok { - return fmt.Errorf("'size' can't be specified when also 'base_volume' is given (the size will be set to the size of the backing image.") + return fmt.Errorf("'size' can't be specified when also 'base_volume_id' is given (the size will be set to the size of the backing image.") } volumeDef.BackingStore = new(defBackingStore) |