Merge pull request #7070 from serbaut/root_disk_size
provider/cloudstack: add root_disk_size
This commit is contained in:
commit
e51fb92ab5
|
@ -124,6 +124,12 @@ func resourceCloudStackInstance() *schema.Resource {
|
|||
Optional: true,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"root_disk_size": &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
ForceNew: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -252,6 +258,11 @@ func resourceCloudStackInstanceCreate(d *schema.ResourceData, meta interface{})
|
|||
p.SetGroup(group.(string))
|
||||
}
|
||||
|
||||
// If there is a root_disk_size supplied, add it to the parameter struct
|
||||
if rootdisksize, ok := d.GetOk("root_disk_size"); ok {
|
||||
p.SetRootdisksize(int64(rootdisksize.(int)))
|
||||
}
|
||||
|
||||
// Create the new instance
|
||||
r, err := cs.VirtualMachine.DeployVirtualMachine(p)
|
||||
if err != nil {
|
||||
|
|
|
@ -66,6 +66,10 @@ The following arguments are supported:
|
|||
* `expunge` - (Optional) This determines if the instance is expunged when it is
|
||||
destroyed (defaults false)
|
||||
|
||||
* `root_disk_size` - (Optional) The size of the root disk in
|
||||
gigabytes. The root disk is resized on deploy. Only applies to
|
||||
template-based deployments.
|
||||
|
||||
## Attributes Reference
|
||||
|
||||
The following attributes are exported:
|
||||
|
|
Loading…
Reference in New Issue