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