diff --git a/builder/amazon/chroot/builder.go b/builder/amazon/chroot/builder.go index d8589a30b..9ca967bb5 100644 --- a/builder/amazon/chroot/builder.go +++ b/builder/amazon/chroot/builder.go @@ -189,6 +189,11 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe &StepEarlyCleanup{}, &StepSnapshot{}, &StepRegisterAMI{}, + &awscommon.StepModifyAMIAttributes{ + Description: b.config.AMIDescription, + Users: b.config.AMIUsers, + Groups: b.config.AMIGroups, + }, &awscommon.StepAMIRegionCopy{ Regions: b.config.AMIRegions, Tags: b.config.AMITags, @@ -196,11 +201,6 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe &awscommon.StepCreateTags{ Tags: b.config.AMITags, }, - &awscommon.StepModifyAMIAttributes{ - Description: b.config.AMIDescription, - Users: b.config.AMIUsers, - Groups: b.config.AMIGroups, - }, } // Run! diff --git a/builder/amazon/ebs/builder.go b/builder/amazon/ebs/builder.go index f7bdc48e7..409b14d72 100644 --- a/builder/amazon/ebs/builder.go +++ b/builder/amazon/ebs/builder.go @@ -104,6 +104,11 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe &common.StepProvision{}, &stepStopInstance{}, &stepCreateAMI{}, + &awscommon.StepModifyAMIAttributes{ + Description: b.config.AMIDescription, + Users: b.config.AMIUsers, + Groups: b.config.AMIGroups, + }, &awscommon.StepAMIRegionCopy{ Regions: b.config.AMIRegions, Tags: b.config.AMITags, @@ -111,11 +116,6 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe &awscommon.StepCreateTags{ Tags: b.config.AMITags, }, - &awscommon.StepModifyAMIAttributes{ - Description: b.config.AMIDescription, - Users: b.config.AMIUsers, - Groups: b.config.AMIGroups, - }, } // Run! diff --git a/builder/amazon/instance/builder.go b/builder/amazon/instance/builder.go index 53f73dc80..e288e0bea 100644 --- a/builder/amazon/instance/builder.go +++ b/builder/amazon/instance/builder.go @@ -210,6 +210,12 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe &StepBundleVolume{}, &StepUploadBundle{}, &StepRegisterAMI{}, + &awscommon.StepModifyAMIAttributes{ + Description: b.config.AMIDescription, + Users: b.config.AMIUsers, + Groups: b.config.AMIGroups, + ProductCodes: b.config.AMIProductCodes, + }, &awscommon.StepAMIRegionCopy{ Regions: b.config.AMIRegions, Tags: b.config.AMITags, @@ -217,12 +223,6 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe &awscommon.StepCreateTags{ Tags: b.config.AMITags, }, - &awscommon.StepModifyAMIAttributes{ - Description: b.config.AMIDescription, - Users: b.config.AMIUsers, - Groups: b.config.AMIGroups, - ProductCodes: b.config.AMIProductCodes, - }, } // Run!