Skip to content

Commit

Permalink
Uses correct SkipSweepError function for AWS SDK for Go v2
Browse files Browse the repository at this point in the history
  • Loading branch information
gdavison committed Oct 12, 2024
1 parent 902f701 commit d42b5e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions internal/service/appstream/sweep.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/aws/aws-sdk-go-v2/service/appstream"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-provider-aws/internal/sweep"
"github.com/hashicorp/terraform-provider-aws/internal/sweep/awsv1"
"github.com/hashicorp/terraform-provider-aws/internal/sweep/awsv2"
"github.com/hashicorp/terraform-provider-aws/names"
)

Expand Down Expand Up @@ -67,7 +67,7 @@ func sweepDirectoryConfigs(region string) error {
return !lastPage
})

if awsv1.SkipSweepError(err) {
if awsv2.SkipSweepError(err) {
log.Printf("[WARN] Skipping AppStream Directory Config sweep for %s: %s", region, err)
return nil
}
Expand Down Expand Up @@ -115,7 +115,7 @@ func sweepFleets(region string) error {
return !lastPage
})

if awsv1.SkipSweepError(err) {
if awsv2.SkipSweepError(err) {
log.Printf("[WARN] Skipping AppStream Fleet sweep for %s: %s", region, err)
return nil
}
Expand Down Expand Up @@ -163,7 +163,7 @@ func sweepImageBuilders(region string) error {
return !lastPage
})

if awsv1.SkipSweepError(err) {
if awsv2.SkipSweepError(err) {
log.Printf("[WARN] Skipping AppStream Image Builder sweep for %s: %s", region, err)
return nil
}
Expand Down Expand Up @@ -211,7 +211,7 @@ func sweepStacks(region string) error {
return !lastPage
})

if awsv1.SkipSweepError(err) {
if awsv2.SkipSweepError(err) {
log.Printf("[WARN] Skipping AppStream Stack sweep for %s: %s", region, err)
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions internal/service/autoscalingplans/sweep.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/aws/aws-sdk-go-v2/service/autoscalingplans"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-provider-aws/internal/sweep"
"github.com/hashicorp/terraform-provider-aws/internal/sweep/awsv1"
"github.com/hashicorp/terraform-provider-aws/internal/sweep/awsv2"
"github.com/hashicorp/terraform-provider-aws/names"
)

Expand Down Expand Up @@ -53,7 +53,7 @@ func sweepScalingPlans(region string) error {
return !lastPage
})

if awsv1.SkipSweepError(err) {
if awsv2.SkipSweepError(err) {
log.Printf("[WARN] Skipping Auto Scaling Scaling Plan sweep for %s: %s", region, err)
return nil
}
Expand Down

0 comments on commit d42b5e2

Please sign in to comment.