Commit 7653727a authored by Yann KAISER's avatar Yann KAISER

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

parent d4fc3f61
...@@ -82,7 +82,7 @@ func resourceVM() *schema.Resource { ...@@ -82,7 +82,7 @@ func resourceVM() *schema.Resource {
}, },
"disk": &schema.Schema{ "disk": &schema.Schema{
Type: schema.TypeSet, Type: schema.TypeList,
Required: true, Required: true,
Elem: resourceDisk(), Elem: resourceDisk(),
}, },
...@@ -204,8 +204,8 @@ func resourceVMCreate(d *schema.ResourceData, m interface{}) error { ...@@ -204,8 +204,8 @@ func resourceVMCreate(d *schema.ResourceData, m interface{}) error {
} }
} }
diskSet := d.Get("disk").(*schema.Set) diskSet := d.Get("disk").([]interface{})
for _, diskItem := range diskSet.List() { for _, diskItem := range diskSet {
var diskMap = diskItem.(map[string]interface{}) var diskMap = diskItem.(map[string]interface{})
if !diskMap["enabled"].(bool) { if !diskMap["enabled"].(bool) {
continue continue
......
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