diff --git a/builder/openstack/image_config.go b/builder/openstack/image_config.go index 7a903ebae..f17ad753d 100644 --- a/builder/openstack/image_config.go +++ b/builder/openstack/image_config.go @@ -14,7 +14,7 @@ type ImageConfig struct { ImageMetadata map[string]string `mapstructure:"metadata"` ImageVisibility imageservice.ImageVisibility `mapstructure:"image_visibility"` ImageMembers []string `mapstructure:"image_members"` - DiskFormat string `mapstructure:"disk_format"` + ImageDiskFormat string `mapstructure:"image_disk_format"` } func (c *ImageConfig) Prepare(ctx *interpolate.Context) []error { diff --git a/builder/openstack/step_create_image.go b/builder/openstack/step_create_image.go index 0a871adf0..260596ffb 100644 --- a/builder/openstack/step_create_image.go +++ b/builder/openstack/step_create_image.go @@ -47,7 +47,7 @@ func (s *stepCreateImage) Run(_ context.Context, state multistep.StateBag) multi } volume := state.Get("volume_id").(string) image, err := volumeactions.UploadImage(blockStorageClient, volume, volumeactions.UploadImageOpts{ - DiskFormat: config.DiskFormat, + DiskFormat: config.ImageDiskFormat, ImageName: config.ImageName, }).Extract() if err != nil {