Skip to content

Commit

Permalink
don't store names of volumes we will be deleting when the instance te…
Browse files Browse the repository at this point in the history
…rminates
  • Loading branch information
SwampDragons committed Jul 1, 2019
1 parent 0e59154 commit d4b6a61
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions builder/amazon/ebsvolume/step_tag_ebs_volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ func (s *stepTagEBSVolumes) Run(ctx context.Context, state multistep.StateBag) m
for _, instanceBlockDevices := range instance.BlockDeviceMappings {
for _, configVolumeMapping := range s.VolumeMapping {
if configVolumeMapping.DeviceName == *instanceBlockDevices.DeviceName {
if configVolumeMapping.DeleteOnTermination {
continue
}
volumes[*ec2conn.Config.Region] = append(
volumes[*ec2conn.Config.Region],
*instanceBlockDevices.Ebs.VolumeId)
Expand Down

0 comments on commit d4b6a61

Please sign in to comment.