Added - disk device name

This commit is contained in:
Dainis Tillers 2014-10-16 16:43:52 +03:00
parent 8ee3bb2d16
commit 22616764fc
1 changed files with 9 additions and 0 deletions

View File

@ -81,6 +81,11 @@ func resourceComputeInstance() *schema.Resource {
Optional: true,
ForceNew: true,
},
"device_name": &schema.Schema{
Type: schema.TypeString,
Optional: true,
},
},
},
},
@ -339,6 +344,10 @@ func resourceComputeInstanceCreate(d *schema.ResourceData, meta interface{}) err
disk.InitializeParams.DiskSizeGb = int64(diskSizeGb)
}
if v, ok := d.GetOk(prefix + ".device_name"); ok {
disk.DeviceName = v.(string)
}
disks = append(disks, &disk)
}