Merge pull request #7829 from hashicorp/fix_7828

don't store names of volumes we will be deleting when the instance te…
pull/7830/head
Megan Marsh 7 years ago committed by GitHub
commit 53e61aa69b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save