@@ -251,7 +251,7 @@ func (r *SettingsResource) ImportState(ctx context.Context, req resource.ImportS
251
251
}
252
252
253
253
func readApiConfig (ctx context.Context , state * SettingsResourceModel , client * api.ClientWithResponses ) diag.Diagnostics {
254
- httpResp , err := client .GetPostgRESTConfigWithResponse (ctx , state .Id .ValueString ())
254
+ httpResp , err := client .V1GetPostgrestServiceConfigWithResponse (ctx , state .Id .ValueString ())
255
255
if err != nil {
256
256
msg := fmt .Sprintf ("Unable to read api settings, got error: %s" , err )
257
257
return diag.Diagnostics {diag .NewErrorDiagnostic ("Client Error" , msg )}
@@ -280,7 +280,7 @@ func updateApiConfig(ctx context.Context, plan *SettingsResourceModel, client *a
280
280
return diags
281
281
}
282
282
283
- httpResp , err := client .UpdatePostgRESTConfigWithResponse (ctx , plan .ProjectRef .ValueString (), body )
283
+ httpResp , err := client .V1UpdatePostgrestServiceConfigWithResponse (ctx , plan .ProjectRef .ValueString (), body )
284
284
if err != nil {
285
285
msg := fmt .Sprintf ("Unable to update api settings, got error: %s" , err )
286
286
return diag.Diagnostics {diag .NewErrorDiagnostic ("Client Error" , msg )}
@@ -298,7 +298,7 @@ func updateApiConfig(ctx context.Context, plan *SettingsResourceModel, client *a
298
298
}
299
299
300
300
func readAuthConfig (ctx context.Context , state * SettingsResourceModel , client * api.ClientWithResponses ) diag.Diagnostics {
301
- httpResp , err := client .GetV1AuthConfigWithResponse (ctx , state .Id .ValueString ())
301
+ httpResp , err := client .V1GetAuthServiceConfigWithResponse (ctx , state .Id .ValueString ())
302
302
if err != nil {
303
303
msg := fmt .Sprintf ("Unable to read auth settings, got error: %s" , err )
304
304
return diag.Diagnostics {diag .NewErrorDiagnostic ("Client Error" , msg )}
@@ -325,7 +325,7 @@ func updateAuthConfig(ctx context.Context, plan *SettingsResourceModel, client *
325
325
return diags
326
326
}
327
327
328
- httpResp , err := client .UpdateV1AuthConfigWithResponse (ctx , plan .ProjectRef .ValueString (), body )
328
+ httpResp , err := client .V1UpdateAuthServiceConfigWithResponse (ctx , plan .ProjectRef .ValueString (), body )
329
329
if err != nil {
330
330
msg := fmt .Sprintf ("Unable to update auth settings, got error: %s" , err )
331
331
return diag.Diagnostics {diag .NewErrorDiagnostic ("Client Error" , msg )}
@@ -343,7 +343,7 @@ func updateAuthConfig(ctx context.Context, plan *SettingsResourceModel, client *
343
343
}
344
344
345
345
func readDatabaseConfig (ctx context.Context , state * SettingsResourceModel , client * api.ClientWithResponses ) diag.Diagnostics {
346
- httpResp , err := client .GetConfigWithResponse (ctx , state .Id .ValueString ())
346
+ httpResp , err := client .V1GetPostgresConfigWithResponse (ctx , state .Id .ValueString ())
347
347
if err != nil {
348
348
msg := fmt .Sprintf ("Unable to read database settings, got error: %s" , err )
349
349
return diag.Diagnostics {diag .NewErrorDiagnostic ("Client Error" , msg )}
@@ -370,7 +370,7 @@ func updateDatabaseConfig(ctx context.Context, plan *SettingsResourceModel, clie
370
370
return diags
371
371
}
372
372
373
- httpResp , err := client .UpdateConfigWithResponse (ctx , plan .ProjectRef .ValueString (), body )
373
+ httpResp , err := client .V1UpdatePostgresConfigWithResponse (ctx , plan .ProjectRef .ValueString (), body )
374
374
if err != nil {
375
375
msg := fmt .Sprintf ("Unable to update database settings, got error: %s" , err )
376
376
return diag.Diagnostics {diag .NewErrorDiagnostic ("Client Error" , msg )}
@@ -434,7 +434,7 @@ type NetworkConfig struct {
434
434
}
435
435
436
436
func readNetworkConfig (ctx context.Context , state * SettingsResourceModel , client * api.ClientWithResponses ) diag.Diagnostics {
437
- httpResp , err := client .GetNetworkRestrictionsWithResponse (ctx , state .Id .ValueString ())
437
+ httpResp , err := client .V1GetNetworkRestrictionsWithResponse (ctx , state .Id .ValueString ())
438
438
if err != nil {
439
439
msg := fmt .Sprintf ("Unable to read network settings, got error: %s" , err )
440
440
return diag.Diagnostics {diag .NewErrorDiagnostic ("Client Error" , msg )}
@@ -470,7 +470,7 @@ func updateNetworkConfig(ctx context.Context, plan *SettingsResourceModel, clien
470
470
return diags
471
471
}
472
472
473
- body := api.ApplyNetworkRestrictionsJSONRequestBody {
473
+ body := api.NetworkRestrictionsRequest {
474
474
DbAllowedCidrs : & []string {},
475
475
DbAllowedCidrsV6 : & []string {},
476
476
}
@@ -491,7 +491,7 @@ func updateNetworkConfig(ctx context.Context, plan *SettingsResourceModel, clien
491
491
}
492
492
}
493
493
494
- httpResp , err := client .ApplyNetworkRestrictionsWithResponse (ctx , plan .ProjectRef .ValueString (), body )
494
+ httpResp , err := client .V1UpdateNetworkRestrictionsWithResponse (ctx , plan .ProjectRef .ValueString (), body )
495
495
if err != nil {
496
496
msg := fmt .Sprintf ("Unable to update network settings, got error: %s" , err )
497
497
return diag.Diagnostics {diag .NewErrorDiagnostic ("Client Error" , msg )}
0 commit comments