Skip to content

Commit

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

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/kafka"
Expand All @@ -20,6 +19,7 @@ import (
"github.com/hashicorp/terraform-provider-aws/internal/errs"
"github.com/hashicorp/terraform-provider-aws/internal/errs/sdkdiag"
"github.com/hashicorp/terraform-provider-aws/internal/flex"
tfslices "github.com/hashicorp/terraform-provider-aws/internal/slices"
"github.com/hashicorp/terraform-provider-aws/internal/tfresource"
"github.com/hashicorp/terraform-provider-aws/internal/verify"
)
Expand Down Expand Up @@ -163,7 +163,7 @@ func findSCRAMSecretsByClusterARN(ctx context.Context, conn *kafka.Client, clust
}

func associateSRAMSecrets(ctx context.Context, conn *kafka.Client, clusterARN string, secretARNs []string) error {
for chunk := range slices.Chunk(secretARNs, scramSecretBatchSize) {
for _, chunk := range tfslices.Chunks(secretARNs, scramSecretBatchSize) {
input := &kafka.BatchAssociateScramSecretInput{
ClusterArn: aws.String(clusterARN),
SecretArnList: chunk,
Expand All @@ -184,7 +184,7 @@ func associateSRAMSecrets(ctx context.Context, conn *kafka.Client, clusterARN st
}

func disassociateSRAMSecrets(ctx context.Context, conn *kafka.Client, clusterARN string, secretARNs []string) error {
for chunk := range slices.Chunk(secretARNs, scramSecretBatchSize) {
for _, chunk := range tfslices.Chunks(secretARNs, scramSecretBatchSize) {
input := &kafka.BatchDisassociateScramSecretInput{
ClusterArn: aws.String(clusterARN),
SecretArnList: chunk,
Expand Down

0 comments on commit f797f26

Please sign in to comment.