From de591cff776887b80c514a2e076a1cdcc4e30c9c Mon Sep 17 00:00:00 2001 From: Amrita Dutta Date: Tue, 18 Jun 2019 23:48:38 +0000 Subject: [PATCH] Fix append in builder.go --- builder/azure/arm/builder.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builder/azure/arm/builder.go b/builder/azure/arm/builder.go index 56ed25e45..b2e0fce15 100644 --- a/builder/azure/arm/builder.go +++ b/builder/azure/arm/builder.go @@ -158,7 +158,8 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack } if foundMandatoryReplicationRegion == false { // return nil, fmt.Errorf("SIG requires that replication regions %v include the region %s in which the Managed Image resides", b.config.SharedGalleryDestination.SigDestinationReplicationRegions, b.config.manageImageLocation) - b.stateBag.Put(constants.ArmManagedImageSharedGalleryReplicationRegions, append(b.config.SharedGalleryDestination.SigDestinationReplicationRegions, b.config.manageImageLocation)) + b.config.SharedGalleryDestination.SigDestinationReplicationRegions = append(b.config.SharedGalleryDestination.SigDestinationReplicationRegions, b.config.manageImageLocation) + b.stateBag.Put(constants.ArmManagedImageSharedGalleryReplicationRegions, b.config.SharedGalleryDestination.SigDestinationReplicationRegions) ui.Say(fmt.Sprintf("Adding Managed Image region SIG replications regions %v", b.config.SharedGalleryDestination.SigDestinationReplicationRegions)) } }