From 3eaf7f38b0ccf35b77c71247f65e0e629859be52 Mon Sep 17 00:00:00 2001 From: Marcin Matlaszek Date: Mon, 29 Jun 2015 15:39:27 +0200 Subject: [PATCH] Fix adding launch permissions for created ami. --- builder/amazon/common/step_modify_ami_attributes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/amazon/common/step_modify_ami_attributes.go b/builder/amazon/common/step_modify_ami_attributes.go index a0c5dccfb..cf37fc5ac 100644 --- a/builder/amazon/common/step_modify_ami_attributes.go +++ b/builder/amazon/common/step_modify_ami_attributes.go @@ -56,8 +56,8 @@ func (s *StepModifyAMIAttributes) Run(state multistep.StateBag) multistep.StepAc users := make([]*string, len(s.Users)) adds := make([]*ec2.LaunchPermission, len(s.Users)) for i, u := range s.Users { - users[i] = &u - adds[i] = &ec2.LaunchPermission{UserID: &u} + users[i] = aws.String(&u) + adds[i] = &ec2.LaunchPermission{UserID: aws.String(&u)} } options["users"] = &ec2.ModifyImageAttributeInput{ UserIDs: users,