Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxtof committed Aug 7, 2023
1 parent 694c5b5 commit cc73441
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
12 changes: 7 additions & 5 deletions builder/nutanix/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@ type ClusterConfig struct {
}

type VmDisk struct {
ImageType string `mapstructure:"image_type" json:"image_type" required:"false"`
SourceImageName string `mapstructure:"source_image_name" json:"source_image_name" required:"false"`
SourceImageUUID string `mapstructure:"source_image_uuid" json:"source_image_uuid" required:"false"`
SourceImageURI string `mapstructure:"source_image_uri" json:"source_image_uri" required:"false"`
DiskSizeGB int64 `mapstructure:"disk_size_gb" json:"disk_size_gb" required:"false"`
ImageType string `mapstructure:"image_type" json:"image_type" required:"false"`
SourceImageName string `mapstructure:"source_image_name" json:"source_image_name" required:"false"`
SourceImageUUID string `mapstructure:"source_image_uuid" json:"source_image_uuid" required:"false"`
SourceImageURI string `mapstructure:"source_image_uri" json:"source_image_uri" required:"false"`
SourceImageDelete bool `mapstructure:"source_image_delete" json:"source_image_delete" required:"false"`
SourceImageForce bool `mapstructure:"source_image_force" json:"source_image_force" required:"false"`
DiskSizeGB int64 `mapstructure:"disk_size_gb" json:"disk_size_gb" required:"false"`
}

type VmNIC struct {
Expand Down
24 changes: 14 additions & 10 deletions builder/nutanix/config.hcl2spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions docs/builders/nutanix.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ Sample:
- `source_image_name` (string) - Name of the image used as disk source.
- `source_image_uuid` (string) - UUID of the image used as disk source.
- `source_image_uri` (string) - URI of the image used as disk source (if image is not already on the cluster, it will download and store it before launching output image creation process).
- `source_image_delete` (bool) - Delete source image once build process is completed (default is false).
- `source_image_force` (bool) - Always download and replace source image even if already exist (default is false).
- `disk_size_gb` (number) - size of the disk (in gigabytes).

Sample:
Expand All @@ -103,6 +105,8 @@ Sample:
- `image_type` (string) - "ISO_IMAGE".
- `source_image_name` (string) - Name of the ISO image to mount.
- `source_image_uuid` (string) - UUID of the ISO image to mount.
- `source_image_delete` (bool) - Delete source image once build process is completed (default is false).
- `source_image_force` (bool) - Always download and replace source image even if already exist (default is false).

Sample:
```hcl
Expand Down

0 comments on commit cc73441

Please sign in to comment.