@@ -23,7 +23,7 @@ import (
2323 "github.com/hashicorp/terraform-plugin-log/tflog"
2424 "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
2525 "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff"
26- "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
26+ sdkretry "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
2727 "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
2828 "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
2929 "github.com/hashicorp/terraform-provider-aws/internal/conns"
@@ -32,6 +32,7 @@ import (
3232 "github.com/hashicorp/terraform-provider-aws/internal/errs"
3333 "github.com/hashicorp/terraform-provider-aws/internal/errs/sdkdiag"
3434 "github.com/hashicorp/terraform-provider-aws/internal/flex"
35+ "github.com/hashicorp/terraform-provider-aws/internal/retry"
3536 tfslices "github.com/hashicorp/terraform-provider-aws/internal/slices"
3637 tftags "github.com/hashicorp/terraform-provider-aws/internal/tags"
3738 "github.com/hashicorp/terraform-provider-aws/internal/tfresource"
@@ -2851,7 +2852,7 @@ func findDBInstances(ctx context.Context, conn *rds.Client, input *rds.DescribeD
28512852 page , err := pages .NextPage (ctx , optFns ... )
28522853
28532854 if errs.IsA [* types.DBInstanceNotFoundFault ](err ) {
2854- return nil , & retry .NotFoundError {
2855+ return nil , & sdkretry .NotFoundError {
28552856 LastError : err ,
28562857 LastRequest : input ,
28572858 }
@@ -2871,8 +2872,8 @@ func findDBInstances(ctx context.Context, conn *rds.Client, input *rds.DescribeD
28712872 return output , nil
28722873}
28732874
2874- func statusDBInstance (ctx context. Context , conn * rds.Client , id string , optFns ... func (* rds.Options )) retry.StateRefreshFunc {
2875- return func () (any , string , error ) {
2875+ func statusDBInstance (conn * rds.Client , id string , optFns ... func (* rds.Options )) retry.StateRefreshFunc {
2876+ return func (ctx context. Context ) (any , string , error ) {
28762877 output , err := findDBInstanceByID (ctx , conn , id , optFns ... )
28772878
28782879 if tfresource .NotFound (err ) {
@@ -2916,7 +2917,7 @@ func waitDBInstanceAvailable(ctx context.Context, conn *rds.Client, id string, t
29162917 instanceStatusUpgrading ,
29172918 },
29182919 Target : []string {instanceStatusAvailable , instanceStatusStorageOptimization },
2919- Refresh : statusDBInstance (ctx , conn , id ),
2920+ Refresh : statusDBInstance (conn , id ),
29202921 Timeout : timeout ,
29212922 }
29222923 options .Apply (stateConf )
@@ -2950,7 +2951,7 @@ func waitDBInstanceStopped(ctx context.Context, conn *rds.Client, id string, tim
29502951 instanceStatusUpgrading ,
29512952 },
29522953 Target : []string {instanceStatusStopped },
2953- Refresh : statusDBInstance (ctx , conn , id ),
2954+ Refresh : statusDBInstance (conn , id ),
29542955 Timeout : timeout ,
29552956 ContinuousTargetOccurence : 2 ,
29562957 Delay : 10 * time .Second ,
@@ -2994,7 +2995,7 @@ func waitDBInstanceDeleted(ctx context.Context, conn *rds.Client, id string, tim
29942995 instanceStatusStorageOptimization ,
29952996 },
29962997 Target : []string {},
2997- Refresh : statusDBInstance (ctx , conn , id ),
2998+ Refresh : statusDBInstance (conn , id ),
29982999 Timeout : timeout ,
29993000 }
30003001 options .Apply (stateConf )
@@ -3021,7 +3022,7 @@ func findBlueGreenDeploymentByID(ctx context.Context, conn *rds.Client, id strin
30213022
30223023 // Eventual consistency check.
30233024 if aws .ToString (output .BlueGreenDeploymentIdentifier ) != id {
3024- return nil , & retry .NotFoundError {
3025+ return nil , & sdkretry .NotFoundError {
30253026 LastRequest : input ,
30263027 }
30273028 }
@@ -3047,7 +3048,7 @@ func findBlueGreenDeployments(ctx context.Context, conn *rds.Client, input *rds.
30473048 page , err := pages .NextPage (ctx )
30483049
30493050 if errs.IsA [* types.BlueGreenDeploymentNotFoundFault ](err ) {
3050- return nil , & retry .NotFoundError {
3051+ return nil , & sdkretry .NotFoundError {
30513052 LastError : err ,
30523053 LastRequest : input ,
30533054 }
@@ -3067,8 +3068,8 @@ func findBlueGreenDeployments(ctx context.Context, conn *rds.Client, input *rds.
30673068 return output , nil
30683069}
30693070
3070- func statusBlueGreenDeployment (ctx context. Context , conn * rds.Client , id string ) retry.StateRefreshFunc {
3071- return func () (any , string , error ) {
3071+ func statusBlueGreenDeployment (conn * rds.Client , id string ) retry.StateRefreshFunc {
3072+ return func (ctx context. Context ) (any , string , error ) {
30723073 output , err := findBlueGreenDeploymentByID (ctx , conn , id )
30733074
30743075 if tfresource .NotFound (err ) {
@@ -3094,7 +3095,7 @@ func waitBlueGreenDeploymentAvailable(ctx context.Context, conn *rds.Client, id
30943095 stateConf := & retry.StateChangeConf {
30953096 Pending : []string {"PROVISIONING" },
30963097 Target : []string {"AVAILABLE" },
3097- Refresh : statusBlueGreenDeployment (ctx , conn , id ),
3098+ Refresh : statusBlueGreenDeployment (conn , id ),
30983099 Timeout : timeout ,
30993100 }
31003101 options .Apply (stateConf )
@@ -3120,7 +3121,7 @@ func waitBlueGreenDeploymentSwitchoverCompleted(ctx context.Context, conn *rds.C
31203121 stateConf := & retry.StateChangeConf {
31213122 Pending : []string {"AVAILABLE" , "SWITCHOVER_IN_PROGRESS" },
31223123 Target : []string {"SWITCHOVER_COMPLETED" },
3123- Refresh : statusBlueGreenDeployment (ctx , conn , id ),
3124+ Refresh : statusBlueGreenDeployment (conn , id ),
31243125 Timeout : timeout ,
31253126 }
31263127 options .Apply (stateConf )
@@ -3150,7 +3151,7 @@ func waitBlueGreenDeploymentDeleted(ctx context.Context, conn *rds.Client, id st
31503151 stateConf := & retry.StateChangeConf {
31513152 Pending : []string {"PROVISIONING" , "AVAILABLE" , "SWITCHOVER_IN_PROGRESS" , "SWITCHOVER_COMPLETED" , "INVALID_CONFIGURATION" , "SWITCHOVER_FAILED" , "DELETING" },
31523153 Target : []string {},
3153- Refresh : statusBlueGreenDeployment (ctx , conn , id ),
3154+ Refresh : statusBlueGreenDeployment (conn , id ),
31543155 Timeout : timeout ,
31553156 }
31563157 options .Apply (stateConf )
0 commit comments