Skip to content

Commit

Permalink
R/aws_workspaces_ip_group: Ignore ResourceNotFoundException on Delete.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Oct 15, 2024
1 parent 065f63a commit 2da1a22
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/service/workspaces/ip_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
"github.com/hashicorp/terraform-provider-aws/internal/conns"
"github.com/hashicorp/terraform-provider-aws/internal/errs"
"github.com/hashicorp/terraform-provider-aws/internal/errs/sdkdiag"
tftags "github.com/hashicorp/terraform-provider-aws/internal/tags"
"github.com/hashicorp/terraform-provider-aws/internal/tfresource"
Expand Down Expand Up @@ -172,6 +173,10 @@ func resourceIPGroupDelete(ctx context.Context, d *schema.ResourceData, meta int
GroupId: aws.String(d.Id()),
})

if errs.IsA[*types.ResourceNotFoundException](err) {
return diags
}

if err != nil {
return sdkdiag.AppendErrorf(diags, "deleting WorkSpaces IP Group (%s): %s", d.Id(), err)
}
Expand Down

0 comments on commit 2da1a22

Please sign in to comment.