diff --git a/builder/azure/arm/artifact.go b/builder/azure/arm/artifact.go index fe9d46b0a..d90a178f2 100644 --- a/builder/azure/arm/artifact.go +++ b/builder/azure/arm/artifact.go @@ -42,11 +42,11 @@ type Artifact struct { func NewManagedImageArtifact(osType, resourceGroup, name, location, id, osDiskSnapshotName, osDiskSnapshotPrefix string) (*Artifact, error) { return &Artifact{ - ManagedImageResourceGroupName: resourceGroup, - ManagedImageName: name, - ManagedImageLocation: location, - ManagedImageId: id, - OSType: osType, + ManagedImageResourceGroupName: resourceGroup, + ManagedImageName: name, + ManagedImageLocation: location, + ManagedImageId: id, + OSType: osType, ManagedImageOSDiskSnapshotName: osDiskSnapshotName, ManagedImageDataDiskSnapshotPrefix: osDiskSnapshotPrefix, }, nil diff --git a/builder/azure/arm/config_test.go b/builder/azure/arm/config_test.go index 9dce2a6dd..e99761f84 100644 --- a/builder/azure/arm/config_test.go +++ b/builder/azure/arm/config_test.go @@ -599,14 +599,14 @@ func TestConfigShouldRejectMalformedManagedImageOSDiskSnapshotName(t *testing.T) func TestConfigShouldRejectMalformedManagedImageDataDiskSnapshotPrefix(t *testing.T) { config := map[string]interface{}{ - "image_offer": "ignore", - "image_publisher": "ignore", - "image_sku": "ignore", - "location": "ignore", - "subscription_id": "ignore", - "communicator": "none", - "managed_image_resource_group_name": "ignore", - "managed_image_name": "ignore", + "image_offer": "ignore", + "image_publisher": "ignore", + "image_sku": "ignore", + "location": "ignore", + "subscription_id": "ignore", + "communicator": "none", + "managed_image_resource_group_name": "ignore", + "managed_image_name": "ignore", "managed_image_data_disk_snapshot_prefix": "ignore", // Does not matter for this test case, just pick one. "os_type": constants.Target_Linux, @@ -852,13 +852,13 @@ func TestConfigShouldRejectManagedImageOSDiskSnapshotNameWithoutManagedImageReso func TestConfigShouldRejectImageDataDiskSnapshotPrefixWithoutManagedImageName(t *testing.T) { config := map[string]interface{}{ - "image_offer": "ignore", - "image_publisher": "ignore", - "image_sku": "ignore", - "location": "ignore", - "subscription_id": "ignore", - "communicator": "none", - "managed_image_resource_group_name": "ignore", + "image_offer": "ignore", + "image_publisher": "ignore", + "image_sku": "ignore", + "location": "ignore", + "subscription_id": "ignore", + "communicator": "none", + "managed_image_resource_group_name": "ignore", "managed_image_data_disk_snapshot_prefix": "ignore", // Does not matter for this test case, just pick one. "os_type": constants.Target_Linux, @@ -872,13 +872,13 @@ func TestConfigShouldRejectImageDataDiskSnapshotPrefixWithoutManagedImageName(t func TestConfigShouldRejectImageDataDiskSnapshotPrefixWithoutManagedImageResourceGroupName(t *testing.T) { config := map[string]interface{}{ - "image_offer": "ignore", - "image_publisher": "ignore", - "image_sku": "ignore", - "location": "ignore", - "subscription_id": "ignore", - "communicator": "none", - "managed_image_name": "ignore", + "image_offer": "ignore", + "image_publisher": "ignore", + "image_sku": "ignore", + "location": "ignore", + "subscription_id": "ignore", + "communicator": "none", + "managed_image_name": "ignore", "managed_image_data_disk_snapshot_prefix": "ignore", // Does not matter for this test case, just pick one. "os_type": constants.Target_Linux, @@ -1002,7 +1002,7 @@ func TestConfigShouldRejectCustomAndPlatformManagedImageBuild(t *testing.T) { func TestConfigShouldRejectCustomAndImageUrlForManagedImageBuild(t *testing.T) { config := map[string]interface{}{ - "image_url": "ignore", + "image_url": "ignore", "custom_managed_image_resource_group_name": "ignore", "custom_managed_image_name": "ignore", "location": "ignore", diff --git a/builder/azure/arm/resource_resolver.go b/builder/azure/arm/resource_resolver.go index 80c55bbb1..8b89d78af 100644 --- a/builder/azure/arm/resource_resolver.go +++ b/builder/azure/arm/resource_resolver.go @@ -24,7 +24,7 @@ type resourceResolver struct { func newResourceResolver(client *AzureClient) *resourceResolver { return &resourceResolver{ - client: client, + client: client, findVirtualNetworkResourceGroup: findVirtualNetworkResourceGroup, findVirtualNetworkSubnet: findVirtualNetworkSubnet, } diff --git a/builder/azure/arm/template_factory_test.go b/builder/azure/arm/template_factory_test.go index fcf431336..ac00d33fd 100644 --- a/builder/azure/arm/template_factory_test.go +++ b/builder/azure/arm/template_factory_test.go @@ -261,10 +261,10 @@ growpart: // Ensure the VM template is correct when building from a custom managed image. func TestVirtualMachineDeployment08(t *testing.T) { config := map[string]interface{}{ - "location": "ignore", - "subscription_id": "ignore", - "os_type": constants.Target_Linux, - "communicator": "none", + "location": "ignore", + "subscription_id": "ignore", + "os_type": constants.Target_Linux, + "communicator": "none", "custom_managed_image_resource_group_name": "CustomManagedImageResourceGroupName", "custom_managed_image_name": "CustomManagedImageName", "managed_image_name": "ManagedImageName",