Skip to content

Commit

Permalink
Added disk size specification when source_iso (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
hkajikawa committed Aug 19, 2022
1 parent fac637f commit 70f3ce3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions builder/cloudstack/config.go
Expand Up @@ -58,8 +58,7 @@ type Config struct {
// instance. This option is only available (and also required) when using
// source_iso.
DiskOffering string `mapstructure:"disk_offering" required:"false"`
// The size (in GB) of the root disk of the new
// instance. This option is only available when using source_template.
// The size (in GB) of the root disk of the new instance.
DiskSize int64 `mapstructure:"disk_size" required:"false"`
// If `true` make a call to the CloudStack API, after loading image to
// cache, requesting to check and detach ISO file (if any) currently
Expand Down
1 change: 1 addition & 0 deletions builder/cloudstack/step_create_instance.go
Expand Up @@ -58,6 +58,7 @@ func (s *stepCreateInstance) Run(ctx context.Context, state multistep.StateBag)
if config.SourceISO != "" {
p.SetDiskofferingid(config.DiskOffering)
p.SetHypervisor(config.Hypervisor)
p.SetSize(config.DiskSize)
}

// If we use a template, set the root disk size.
Expand Down
3 changes: 1 addition & 2 deletions docs-partials/builder/cloudstack/Config-not-required.mdx
Expand Up @@ -24,8 +24,7 @@
instance. This option is only available (and also required) when using
source_iso.

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

- `eject_iso` (bool) - If `true` make a call to the CloudStack API, after loading image to
cache, requesting to check and detach ISO file (if any) currently
Expand Down
3 changes: 1 addition & 2 deletions docs/builders/cloudstack.mdx
Expand Up @@ -99,8 +99,7 @@ builder.
instance. This option is only available (and also required) when using
`source_iso`.

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

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

0 comments on commit 70f3ce3

Please sign in to comment.