Skip to content

Commit

Permalink
AWS delete error when no instances
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGOrtega committed Jan 11, 2021
1 parent fe1090b commit 5b9c967
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions iterative/aws/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,6 @@ func ResourceMachineDelete(ctx context.Context, d *schema.ResourceData, m interf
},
},
})
if err != nil {
return err
}
if len(descResult.Reservations) > 0 && len(descResult.Reservations[0].Instances) > 0 {
instanceID := *descResult.Reservations[0].Instances[0].InstanceId
_, err = svc.TerminateInstances(&ec2.TerminateInstancesInput{
Expand Down

0 comments on commit 5b9c967

Please sign in to comment.