@@ -14,14 +14,14 @@ import (
1414 "github.com/aws/aws-sdk-go-v2/service/accessanalyzer/types"
1515 "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
1616 "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id"
17- "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
1817 "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
1918 "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
2019 "github.com/hashicorp/terraform-provider-aws/internal/conns"
2120 "github.com/hashicorp/terraform-provider-aws/internal/enum"
2221 "github.com/hashicorp/terraform-provider-aws/internal/errs"
2322 "github.com/hashicorp/terraform-provider-aws/internal/errs/sdkdiag"
2423 "github.com/hashicorp/terraform-provider-aws/internal/flex"
24+ "github.com/hashicorp/terraform-provider-aws/internal/retry"
2525 tftags "github.com/hashicorp/terraform-provider-aws/internal/tags"
2626 "github.com/hashicorp/terraform-provider-aws/internal/tfresource"
2727 "github.com/hashicorp/terraform-provider-aws/internal/verify"
@@ -40,6 +40,8 @@ const (
4040// @Tags(identifierAttribute="arn")
4141// @Testing(existsType="github.com/aws/aws-sdk-go-v2/service/accessanalyzer/types;types.AnalyzerSummary", serialize="true")
4242// @Testing(preCheck="testAccPreCheck")
43+ // @Testing(existsTakesT=true)
44+ // @Testing(destroyTakesT=true)
4345func resourceAnalyzer () * schema.Resource {
4446 return & schema.Resource {
4547 CreateWithoutTimeout : resourceAnalyzerCreate ,
@@ -241,7 +243,7 @@ func resourceAnalyzerRead(ctx context.Context, d *schema.ResourceData, meta any)
241243
242244 analyzer , err := findAnalyzerByName (ctx , conn , d .Id ())
243245
244- if ! d .IsNewResource () && tfresource .NotFound (err ) {
246+ if ! d .IsNewResource () && retry .NotFound (err ) {
245247 log .Printf ("[WARN] IAM Access Analyzer Analyzer (%s) not found, removing from state" , d .Id ())
246248 d .SetId ("" )
247249 return diags
@@ -306,8 +308,7 @@ func findAnalyzerByName(ctx context.Context, conn *accessanalyzer.Client, name s
306308
307309 if errs.IsA [* types.ResourceNotFoundException ](err ) {
308310 return nil , & retry.NotFoundError {
309- LastError : err ,
310- LastRequest : input ,
311+ LastError : err ,
311312 }
312313 }
313314
0 commit comments