Skip to content

Commit

Permalink
Fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Jan 31, 2024
1 parent d1b277c commit 731bea8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/service/cognitoidp/user_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ func resourceUserGroupDelete(ctx context.Context, d *schema.ResourceData, meta i
UserPoolId: aws.String(userPoolID),
})

if tfawserr.ErrCodeEquals(err, cognitoidentityprovider.ErrCodeResourceNotFoundException) {
return diags
}

if err != nil {
return sdkdiag.AppendErrorf(diags, "deleting Cognito User Group (%s): %s", d.Id(), err)
}
Expand Down Expand Up @@ -207,7 +211,7 @@ func userGroupCreateResourceID(userPoolID, groupName string) string {
}

func userGroupParseResourceID(id string) (string, string, error) {
parts := strings.Split(id, userGroupResourceIDSeparator)
parts := strings.SplitN(id, userGroupResourceIDSeparator, 2)

if len(parts) == 2 && parts[0] != "" && parts[1] != "" {
return parts[0], parts[1], nil
Expand Down

0 comments on commit 731bea8

Please sign in to comment.