Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ims
terraform-provider-one
Commits
6fba6e78
Commit
6fba6e78
authored
Dec 04, 2017
by
Yann KAISER
Browse files
Changed the VM Template resource disk handling (List instead of Set)
parent
7653727a
Changes
1
Hide whitespace changes
Inline
Side-by-side
one/resource_vm_template.go
View file @
6fba6e78
...
...
@@ -51,7 +51,7 @@ func resourceVMTemplate() *schema.Resource {
},
"disk"
:
&
schema
.
Schema
{
Type
:
schema
.
Type
Se
t
,
Type
:
schema
.
Type
Lis
t
,
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment