44 "context"
55 "net/http"
66
7- dctapi "github.com/delphix/dct-sdk-go/v14 "
7+ dctapi "github.com/delphix/dct-sdk-go/v21 "
88 "github.com/hashicorp/terraform-plugin-log/tflog"
99 "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
1010 "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
@@ -146,7 +146,7 @@ func resourceDatabasePostgressqlCreate(ctx context.Context, d *schema.ResourceDa
146146 sourceCreateParameters .SetEngineId (v .(string ))
147147 }
148148
149- req := client .SourcesApi .CreatePostgresSource (ctx )
149+ req := client .SourcesAPI .CreatePostgresSource (ctx )
150150
151151 apiRes , httpRes , err := req .PostgresSourceCreateParameters (* sourceCreateParameters ).Execute ()
152152 if diags := apiErrorResponseHelper (ctx , apiRes , httpRes , err ); diags != nil {
@@ -184,12 +184,12 @@ func resourceDatabasePostgressqlRead(ctx context.Context, d *schema.ResourceData
184184 source_id := d .Id ()
185185
186186 res , diags := PollForObjectExistence (ctx , func () (interface {}, * http.Response , error ) {
187- return client .SourcesApi .GetSourceById (ctx , source_id ).Execute ()
187+ return client .SourcesAPI .GetSourceById (ctx , source_id ).Execute ()
188188 })
189189
190190 if diags != nil {
191191 _ , diags := PollForObjectDeletion (ctx , func () (interface {}, * http.Response , error ) {
192- return client .SourcesApi .GetSourceById (ctx , source_id ).Execute ()
192+ return client .SourcesAPI .GetSourceById (ctx , source_id ).Execute ()
193193 })
194194 // This would imply error in poll for deletion so we just log and exit.
195195 if diags != nil {
@@ -262,7 +262,7 @@ func resourceDatabasePostgressqlUpdate(ctx context.Context, d *schema.ResourceDa
262262 updateSourceParam .SetName (d .Get ("name" ).(string ))
263263 }
264264
265- res , httpRes , err := client .SourcesApi .UpdatePostgresSourceById (ctx , d .Get ("id" ).(string )).PostgresSourceUpdateParameters (* updateSourceParam ).Execute ()
265+ res , httpRes , err := client .SourcesAPI .UpdatePostgresSourceById (ctx , d .Get ("id" ).(string )).PostgresSourceUpdateParameters (* updateSourceParam ).Execute ()
266266
267267 if diags := apiErrorResponseHelper (ctx , nil , httpRes , err ); diags != nil {
268268 // revert and set the old value to the changed keys
@@ -290,7 +290,7 @@ func resourceDatabasePostgressqlDelete(ctx context.Context, d *schema.ResourceDa
290290
291291 source_id := d .Id ()
292292
293- res , httpRes , err := client .SourcesApi .DeleteSource (ctx , source_id ).Execute ()
293+ res , httpRes , err := client .SourcesAPI .DeleteSource (ctx , source_id ).Execute ()
294294
295295 if diags := apiErrorResponseHelper (ctx , res , httpRes , err ); diags != nil {
296296 return diags
@@ -306,7 +306,7 @@ func resourceDatabasePostgressqlDelete(ctx context.Context, d *schema.ResourceDa
306306 }
307307
308308 _ , diags := PollForObjectDeletion (ctx , func () (interface {}, * http.Response , error ) {
309- return client .SourcesApi .GetSourceById (ctx , source_id ).Execute ()
309+ return client .SourcesAPI .GetSourceById (ctx , source_id ).Execute ()
310310 })
311311
312312 return diags
0 commit comments