Skip to content

Commit

Permalink
Use latest version of ENI data when attempting to detach.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Sep 19, 2019
1 parent c643c74 commit 0257db7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aws/resource_aws_security_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -1435,11 +1435,13 @@ func deleteLingeringLambdaENIs(conn *ec2.EC2, filterName, resourceId string, tim
ContinuousTargetOccurence: 10,
}

_, err = stateConf.WaitForState()
eniRaw, err := stateConf.WaitForState()

if err != nil {
return fmt.Errorf("error waiting for ENI (%s) to become available: %s", eniId, err)
}

eni = eniRaw.(*ec2.NetworkInterface)
}

err = detachNetworkInterface(conn, eni, timeout)
Expand Down

0 comments on commit 0257db7

Please sign in to comment.