From 2868971a9ba7dd13162a0720eea64ed4e34b6329 Mon Sep 17 00:00:00 2001 From: Patrick Double Date: Thu, 9 Aug 2018 07:14:14 -0500 Subject: [PATCH] Fixes per code review --- builder/azure/arm/builder.go | 9 ++------- website/source/docs/post-processors/vagrant.html.md | 4 ++-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/builder/azure/arm/builder.go b/builder/azure/arm/builder.go index 03c6801cf..ed42f2ac3 100644 --- a/builder/azure/arm/builder.go +++ b/builder/azure/arm/builder.go @@ -254,14 +254,9 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe return nil, errors.New("Build was halted.") } - osType := "Linux" - if b.config.OSType == constants.Target_Windows { - osType = "Windows" - } - if b.config.isManagedImage() { managedImageID := fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/images/%s", b.config.SubscriptionID, b.config.ManagedImageResourceGroupName, b.config.ManagedImageName) - return NewManagedImageArtifact(osType, b.config.ManagedImageResourceGroupName, b.config.ManagedImageName, b.config.manageImageLocation, managedImageID) + return NewManagedImageArtifact(b.config.OSType, b.config.ManagedImageResourceGroupName, b.config.ManagedImageName, b.config.manageImageLocation, managedImageID) } else if template, ok := b.stateBag.GetOk(constants.ArmCaptureTemplate); ok { return NewArtifact( template.(*CaptureTemplate), @@ -273,7 +268,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe sasUrl, _ := blob.GetSASURI(options) return sasUrl }, - osType) + b.config.OSType) } return &Artifact{}, nil diff --git a/website/source/docs/post-processors/vagrant.html.md b/website/source/docs/post-processors/vagrant.html.md index 260339e7f..632c080f5 100644 --- a/website/source/docs/post-processors/vagrant.html.md +++ b/website/source/docs/post-processors/vagrant.html.md @@ -31,8 +31,8 @@ Currently, the Vagrant post-processor can create boxes for the following providers. - AWS +- Azure - DigitalOcean -- Google - Azure - Hyper-V - LXC @@ -107,9 +107,9 @@ where it will be set to 0. The available provider names are: - `aws` +- `azure` - `digitalocean` - `google` -- `azure` - `hyperv` - `parallels` - `libvirt`