mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
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()),
|
||||
})
|
||||
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)
|
||||
}
|
||||
return fmt.Errorf("Error deleting Account Login Profile: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user