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()),
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
request := &iam.DeleteUserInput{
|
request := &iam.DeleteUserInput{
|
||||||
UserName: aws.String(d.Id()),
|
UserName: aws.String(d.Id()),
|
||||||
|
|
Loading…
Reference in New Issue