diff --git a/go.mod b/go.mod index 6455e6b0f..9b9c0bf59 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/aiven/terraform-provider-aiven go 1.21.1 require ( - github.com/aiven/aiven-go-client v1.36.0 + github.com/aiven/aiven-go-client/v2 v2.0.0 github.com/dave/jennifer v1.7.0 github.com/docker/go-units v0.5.0 github.com/ettle/strcase v0.1.1 diff --git a/go.sum b/go.sum index 2fdfde8c8..499c5067c 100644 --- a/go.sum +++ b/go.sum @@ -201,8 +201,8 @@ github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= -github.com/aiven/aiven-go-client v1.36.0 h1:AUuldvYdk2b9wu4v7L9qx01d6ZB5VckiMgRW37yxZVE= -github.com/aiven/aiven-go-client v1.36.0/go.mod h1:3Hh1PDNcqNNCYrkU/jSAHMV/b/ynoy73fwhBPKnMe6I= +github.com/aiven/aiven-go-client/v2 v2.0.0 h1:eqeJveyqB1RKDUjT212gNjFujLqx45SXwokRlhjYARU= +github.com/aiven/aiven-go-client/v2 v2.0.0/go.mod h1:x0xhzxWEKAwKv0xY5FvECiI6tesWshcPHvjwl0B/1SU= github.com/aiven/go-api-schemas v1.27.1-0.20230823111901-1e0306909d02 h1:nFAKxncY/5aokoDdnKRvUVsjV6MKQq0Cf/21uAPRjDg= github.com/aiven/go-api-schemas v1.27.1-0.20230823111901-1e0306909d02/go.mod h1:RmQ8MfxwxAP2ji9eJtP6dICOaTMcQD9b5aQT3Bp7uzI= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= diff --git a/internal/sdkprovider/service/mysql/mysql_database.go b/internal/sdkprovider/service/mysql/mysql_database.go index 433fbe7da..3167b979c 100644 --- a/internal/sdkprovider/service/mysql/mysql_database.go +++ b/internal/sdkprovider/service/mysql/mysql_database.go @@ -112,6 +112,7 @@ func resourceMySQLDatabaseDelete(ctx context.Context, d *schema.ResourceData, m } waiter := schemautil.DatabaseDeleteWaiter{ + Context: ctx, Client: client, ProjectName: projectName, ServiceName: serviceName, diff --git a/internal/sdkprovider/service/pg/pg_database.go b/internal/sdkprovider/service/pg/pg_database.go index bfc18f4ed..1001fb85b 100644 --- a/internal/sdkprovider/service/pg/pg_database.go +++ b/internal/sdkprovider/service/pg/pg_database.go @@ -144,6 +144,7 @@ func resourcePGDatabaseDelete(ctx context.Context, d *schema.ResourceData, m int } waiter := schemautil.DatabaseDeleteWaiter{ + Context: ctx, Client: client, ProjectName: projectName, ServiceName: serviceName, diff --git a/internal/sdkprovider/service/pg/pg_user.go b/internal/sdkprovider/service/pg/pg_user.go index 4425ffddf..e84fc0480 100644 --- a/internal/sdkprovider/service/pg/pg_user.go +++ b/internal/sdkprovider/service/pg/pg_user.go @@ -130,7 +130,7 @@ func resourcePGUserUpdate(ctx context.Context, d *schema.ResourceData, m interfa op := "set-access-control" - _, err = client.ServiceUsers.Update(projectName, serviceName, username, + _, err = client.ServiceUsers.Update(ctx, projectName, serviceName, username, aiven.ModifyServiceUserRequest{ AccessControl: &aiven.AccessControl{ PostgresAllowReplication: &allowReplication,