This commit is contained in:
parent
517d319c2c
commit
f68d5e82f3
|
@ -197,12 +197,11 @@ func resourceAwsIamUserDelete(d *schema.ResourceData, meta interface{}) error {
|
|||
UserName: aws.String(d.Id()),
|
||||
})
|
||||
if err != nil {
|
||||
if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" {
|
||||
return nil
|
||||
}
|
||||
if iamerr, ok := err.(awserr.Error); !ok || iamerr.Code() != "NoSuchEntity" {
|
||||
return fmt.Errorf("Error deleting Account Login Profile: %s", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
request := &iam.DeleteUserInput{
|
||||
UserName: aws.String(d.Id()),
|
||||
|
|
Loading…
Reference in New Issue