Skip to content

Commit 4d54bdd

Browse files
committed
Sets force_destroy when sweeping
1 parent f0afdb2 commit 4d54bdd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

internal/service/dsql/sweep.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ func RegisterSweepers() {
2121

2222
func sweepClusters(ctx context.Context, client *conns.AWSClient) ([]sweep.Sweepable, error) {
2323
conn := client.DSQLClient(ctx)
24-
var input dsql.ListClustersInput
25-
sweepResources := make([]sweep.Sweepable, 0)
24+
var sweepResources []sweep.Sweepable
2625

26+
var input dsql.ListClustersInput
2727
pages := dsql.NewListClustersPaginator(conn, &input)
2828
for pages.HasMorePages() {
2929
page, err := pages.NextPage(ctx)
@@ -34,8 +34,9 @@ func sweepClusters(ctx context.Context, client *conns.AWSClient) ([]sweep.Sweepa
3434

3535
for _, v := range page.Clusters {
3636
sweepResources = append(sweepResources, framework.NewSweepResource(newClusterResource, client,
37-
framework.NewAttribute(names.AttrIdentifier, aws.ToString(v.Identifier))),
38-
)
37+
framework.NewAttribute(names.AttrIdentifier, aws.ToString(v.Identifier)),
38+
framework.NewAttribute(names.AttrForceDestroy, true),
39+
))
3940
}
4041
}
4142

0 commit comments

Comments
 (0)