From ae3cf48f710b04f7eca68877689a61271170fa50 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Thu, 2 May 2019 14:38:56 -0700 Subject: [PATCH] in ebs, don't clean up temporary amis from encryption step. that's handled in step_copy_ami now --- builder/amazon/ebs/step_create_ami.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/builder/amazon/ebs/step_create_ami.go b/builder/amazon/ebs/step_create_ami.go index f68b961da..68d8c7084 100644 --- a/builder/amazon/ebs/step_create_ami.go +++ b/builder/amazon/ebs/step_create_ami.go @@ -95,12 +95,10 @@ func (s *stepCreateAMI) Cleanup(state multistep.StateBag) { if s.image == nil { return } - config := state.Get("config").(*Config) _, cancelled := state.GetOk(multistep.StateCancelled) _, halted := state.GetOk(multistep.StateHalted) - encryptBootSet := config.AMIEncryptBootVolume != nil - if !cancelled && !halted && !encryptBootSet { + if !cancelled && !halted { return } @@ -108,7 +106,7 @@ func (s *stepCreateAMI) Cleanup(state multistep.StateBag) { ui := state.Get("ui").(packer.Ui) ui.Say("Deregistering the AMI and deleting associated snapshots because " + - "of cancellation, error or it was temporary (encrypt_boot was set)...") + "of cancellation, or error...") resp, err := ec2conn.DescribeImages(&ec2.DescribeImagesInput{ ImageIds: []*string{s.image.ImageId},