From 6b3bfbb044c4e12d4d3fdf18b65b7b74409a9eb1 Mon Sep 17 00:00:00 2001 From: Jared Baker Date: Tue, 17 Dec 2024 13:55:38 -0500 Subject: [PATCH] r/aws_memorydb_multi_region_cluster: appease the semgrep overlords --- internal/service/memorydb/multi_region_cluster.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/service/memorydb/multi_region_cluster.go b/internal/service/memorydb/multi_region_cluster.go index 126e114d0d7..12e46d086d5 100644 --- a/internal/service/memorydb/multi_region_cluster.go +++ b/internal/service/memorydb/multi_region_cluster.go @@ -370,10 +370,10 @@ func (r *multiRegionClusterResource) Delete(ctx context.Context, req resource.De // Before deleting the multi-region cluster, ensure it is ready for deletion. // Removing an `aws_memorydb_cluster` from a multi-region cluster may temporarily block deletion. output, err := findMultiRegionClusterByName(ctx, conn, state.ID.ValueString()) + if tfresource.NotFound(err) { + return + } if err != nil { - if tfresource.NotFound(err) { - return - } resp.Diagnostics.AddError( create.ProblemStandardMessage(names.MemoryDB, create.ErrActionDeleting, ResNameMultiRegionCluster, state.ID.String(), err), err.Error(),