Skip to content

Commit 70f3ce3

Browse files
authored
Added disk size specification when source_iso (#35)
1 parent fac637f commit 70f3ce3

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

builder/cloudstack/config.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ type Config struct {
5858
// instance. This option is only available (and also required) when using
5959
// source_iso.
6060
DiskOffering string `mapstructure:"disk_offering" required:"false"`
61-
// The size (in GB) of the root disk of the new
62-
// instance. This option is only available when using source_template.
61+
// The size (in GB) of the root disk of the new instance.
6362
DiskSize int64 `mapstructure:"disk_size" required:"false"`
6463
// If `true` make a call to the CloudStack API, after loading image to
6564
// cache, requesting to check and detach ISO file (if any) currently

builder/cloudstack/step_create_instance.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ func (s *stepCreateInstance) Run(ctx context.Context, state multistep.StateBag)
5858
if config.SourceISO != "" {
5959
p.SetDiskofferingid(config.DiskOffering)
6060
p.SetHypervisor(config.Hypervisor)
61+
p.SetSize(config.DiskSize)
6162
}
6263

6364
// If we use a template, set the root disk size.

docs-partials/builder/cloudstack/Config-not-required.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
instance. This option is only available (and also required) when using
2525
source_iso.
2626

27-
- `disk_size` (int64) - The size (in GB) of the root disk of the new
28-
instance. This option is only available when using source_template.
27+
- `disk_size` (int64) - The size (in GB) of the root disk of the new instance.
2928

3029
- `eject_iso` (bool) - If `true` make a call to the CloudStack API, after loading image to
3130
cache, requesting to check and detach ISO file (if any) currently

docs/builders/cloudstack.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ builder.
9999
instance. This option is only available (and also required) when using
100100
`source_iso`.
101101

102-
- `disk_size` (number) - The size (in GB) of the root disk of the new
103-
instance. This option is only available when using `source_template`.
102+
- `disk_size` (number) - The size (in GB) of the root disk of the new instance.
104103

105104
- `expunge` (boolean) - Set to `true` to expunge the instance when it is
106105
destroyed. Defaults to `false`.

0 commit comments

Comments
 (0)