Added Group attribute to cloudstack instance resource
This commit is contained in:
parent
75bd44e29d
commit
cf607e8a58
|
@ -93,6 +93,12 @@ func resourceCloudStackInstance() *schema.Resource {
|
|||
Optional: true,
|
||||
Default: false,
|
||||
},
|
||||
|
||||
"group": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -193,6 +199,11 @@ func resourceCloudStackInstanceCreate(d *schema.ResourceData, meta interface{})
|
|||
p.SetUserdata(ud)
|
||||
}
|
||||
|
||||
// If there is a group supplied, add it to the parameter struct
|
||||
if group, ok := d.GetOk("group"); ok {
|
||||
p.SetGroup(group.(string))
|
||||
}
|
||||
|
||||
// Create the new instance
|
||||
r, err := cs.VirtualMachine.DeployVirtualMachine(p)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue