Skip to content

Commit

Permalink
Revert "Replace 'tfslices.Chunks' with 'slices.Chunk' - connect."
Browse files Browse the repository at this point in the history
This reverts commit e56ae32.
  • Loading branch information
jar-b committed Sep 10, 2024
1 parent 9ec42d9 commit c40facf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/service/connect/routing_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"context"
"fmt"
"log"
"slices"
"strings"

"github.com/aws/aws-sdk-go-v2/aws"
Expand All @@ -21,6 +20,7 @@ import (
"github.com/hashicorp/terraform-provider-aws/internal/enum"
"github.com/hashicorp/terraform-provider-aws/internal/errs"
"github.com/hashicorp/terraform-provider-aws/internal/errs/sdkdiag"
tfslices "github.com/hashicorp/terraform-provider-aws/internal/slices"
tftags "github.com/hashicorp/terraform-provider-aws/internal/tags"
"github.com/hashicorp/terraform-provider-aws/internal/tfresource"
"github.com/hashicorp/terraform-provider-aws/internal/verify"
Expand Down Expand Up @@ -361,7 +361,8 @@ func updateRoutingProfileQueueAssociations(ctx context.Context, conn *connect.Cl
// the respective queues based on the diff detected

// disassociate first since Queue and channel type combination cannot be duplicated
for chunk := range slices.Chunk(del, routingProfileQueueAssociationChunkSize) {
chunks := tfslices.Chunks(del, routingProfileQueueAssociationChunkSize)
for _, chunk := range chunks {
var queueReferences []awstypes.RoutingProfileQueueReference
for _, v := range chunk {
if v := v.QueueReference; v != nil {
Expand All @@ -384,7 +385,8 @@ func updateRoutingProfileQueueAssociations(ctx context.Context, conn *connect.Cl
}
}

for chunk := range slices.Chunk(add, routingProfileQueueAssociationChunkSize) {
chunks = tfslices.Chunks(add, routingProfileQueueAssociationChunkSize)
for _, chunk := range chunks {
input := &connect.AssociateRoutingProfileQueuesInput{
InstanceId: aws.String(instanceID),
QueueConfigs: chunk,
Expand Down

0 comments on commit c40facf

Please sign in to comment.