From b9b5bb2951864d05c1d03448fc92c3c82c345716 Mon Sep 17 00:00:00 2001 From: Paul Meyer Date: Sun, 2 Jun 2019 19:29:45 +0000 Subject: [PATCH] Use DiskStorageAccountTypes --- builder/azure/chroot/builder.go | 6 +++--- builder/azure/chroot/step_create_new_disk.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builder/azure/chroot/builder.go b/builder/azure/chroot/builder.go index d5446fa4d..8023db7f5 100644 --- a/builder/azure/chroot/builder.go +++ b/builder/azure/chroot/builder.go @@ -175,13 +175,13 @@ func checkDiskCacheType(s string) interface{} { } func checkStorageAccountType(s string) interface{} { - for _, v := range compute.PossibleStorageAccountTypesValues() { - if compute.StorageAccountTypes(s) == v { + for _, v := range compute.PossibleDiskStorageAccountTypesValues() { + if compute.DiskStorageAccountTypes(s) == v { return nil } } return fmt.Errorf("%q is not a valid value (%v)", - s, compute.PossibleStorageAccountTypesValues()) + s, compute.PossibleDiskStorageAccountTypesValues()) } func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (packer.Artifact, error) { diff --git a/builder/azure/chroot/step_create_new_disk.go b/builder/azure/chroot/step_create_new_disk.go index 098adb25f..c2eb15ca3 100644 --- a/builder/azure/chroot/step_create_new_disk.go +++ b/builder/azure/chroot/step_create_new_disk.go @@ -33,7 +33,7 @@ func (s StepCreateNewDisk) Run(ctx context.Context, state multistep.StateBag) mu disk := compute.Disk{ Sku: &compute.DiskSku{ - Name: "", + Name: compute.DiskStorageAccountTypes(s.DiskStorageAccountType), }, //Zones: nil, DiskProperties: &compute.DiskProperties{