Commit 6fba6e78 authored by Yann KAISER's avatar Yann KAISER

Changed the VM Template resource disk handling (List instead of Set)

parent 7653727a
......@@ -51,7 +51,7 @@ func resourceVMTemplate() *schema.Resource {
},
"disk": &schema.Schema{
Type: schema.TypeSet,
Type: schema.TypeList,
Optional: true,
Elem: resourceDisk(),
},
......@@ -181,8 +181,8 @@ func resourceVMTemplateCreate(d *schema.ResourceData, m interface{}) error {
template.NICList = append(template.NICList, &network)
}
diskSet := d.Get("disk").(*schema.Set)
for _, diskRes := range diskSet.List() {
diskSet := d.Get("disk").([]interface{})
for _, diskRes := range diskSet {
var diskMap = diskRes.(map[string]interface{})
disk, err := CreateDisk(d.Get("name").(string), diskMap, imageSession)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment