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
7653727a
Commit
7653727a
authored
Dec 04, 2017
by
Yann KAISER
Browse files
Changed the VM resource disk handling (List instead of Set)
parent
d4fc3f61
Changes
1
Hide whitespace changes
Inline
Side-by-side
one/resource_vm_instance.go
View file @
7653727a
...
...
@@ -82,7 +82,7 @@ func resourceVM() *schema.Resource {
},
"disk"
:
&
schema
.
Schema
{
Type
:
schema
.
Type
Se
t
,
Type
:
schema
.
Type
Lis
t
,
Required
:
true
,
Elem
:
resourceDisk
(),
},
...
...
@@ -204,8 +204,8 @@ func resourceVMCreate(d *schema.ResourceData, m interface{}) error {
}
}
diskSet
:=
d
.
Get
(
"disk"
)
.
(
*
schema
.
Set
)
for
_
,
diskItem
:=
range
diskSet
.
List
()
{
diskSet
:=
d
.
Get
(
"disk"
)
.
(
[]
interface
{}
)
for
_
,
diskItem
:=
range
diskSet
{
var
diskMap
=
diskItem
.
(
map
[
string
]
interface
{})
if
!
diskMap
[
"enabled"
]
.
(
bool
)
{
continue
...
...
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