don't store names of volumes we will be deleting when the instance terminates
This commit is contained in:
parent
0e59154458
commit
d4b6a61445
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue