@@ -39,7 +39,7 @@ func (r resourceDbQueryLoggingType) GetSchema(ctx context.Context) (tfsdk.Schema
39
39
Computed : true ,
40
40
},
41
41
"cluster_id" : {
42
- Description : "ID of the cluster with which this DB query logging config will be associated." ,
42
+ Description : "ID of the cluster with which this DB query logging configuration will be associated." ,
43
43
Type : types .StringType ,
44
44
Required : true ,
45
45
},
@@ -216,7 +216,7 @@ func getPgLogExporterConfig(ctx context.Context, accountId string, projectId str
216
216
}
217
217
218
218
if len (specList .GetData ()) < 1 {
219
- return nil , false , "no DB query logging config found for the cluster"
219
+ return nil , false , "no DB query logging configuration found for the cluster"
220
220
}
221
221
return & specList .Data [0 ], true , ""
222
222
}
@@ -284,7 +284,7 @@ func (r resourceDbQueryLogging) Update(ctx context.Context, req tfsdk.UpdateReso
284
284
var planConfig DbQueryLoggingConfig
285
285
resp .Diagnostics .Append (getConfigFromPlan (ctx , req .Plan , & planConfig )... )
286
286
if resp .Diagnostics .HasError () {
287
- tflog .Debug (ctx , "Error while getting the plan for the Db query logging config " )
287
+ tflog .Debug (ctx , "Error while getting the plan for the Db query logging configuration " )
288
288
return
289
289
}
290
290
integrationName := planConfig .IntegrationName .Value
@@ -305,7 +305,7 @@ func (r resourceDbQueryLogging) Update(ctx context.Context, req tfsdk.UpdateReso
305
305
306
306
spec , ok , errMsg := getPgLogExporterConfig (ctx , accountId , projectId , clusterId , apiClient )
307
307
if ! ok {
308
- resp .Diagnostics .AddError ("Unable to fetch DB query logging config " , errMsg )
308
+ resp .Diagnostics .AddError ("Unable to fetch DB query logging configuration " , errMsg )
309
309
return
310
310
}
311
311
@@ -323,13 +323,13 @@ func (r resourceDbQueryLogging) Update(ctx context.Context, req tfsdk.UpdateReso
323
323
// Use planConfig provided in tf file to build new API Pg log exporter config spec
324
324
apiConfigSpec , err := buildDbQueryLoggingSpec (planConfig , integrationId , & spec .Spec .ExportConfig )
325
325
if err != nil {
326
- resp .Diagnostics .AddError ("Unable to update DB query logging config " , GetApiErrorDetails (err ))
326
+ resp .Diagnostics .AddError ("Unable to update DB query logging configuration " , GetApiErrorDetails (err ))
327
327
return
328
328
}
329
329
330
330
_ , _ , err = apiClient .ClusterApi .UpdatePgLogExporterConfig (ctx , accountId , projectId , clusterId , configId ).PgLogExporterConfigSpec (* apiConfigSpec ).Execute ()
331
331
if err != nil {
332
- resp .Diagnostics .AddError (fmt .Sprintf ("Unable to update DB query logging config for cluster %s" , clusterId ), GetApiErrorDetails (err ))
332
+ resp .Diagnostics .AddError (fmt .Sprintf ("Unable to update DB query logging configuration for cluster %s" , clusterId ), GetApiErrorDetails (err ))
333
333
return
334
334
}
335
335
@@ -342,25 +342,25 @@ func (r resourceDbQueryLogging) Update(ctx context.Context, req tfsdk.UpdateReso
342
342
return nil
343
343
}
344
344
if asState == string (openapiclient .TASKACTIONSTATEENUM_FAILED ) {
345
- return fmt .Errorf ("failed to update DB query log config " )
345
+ return fmt .Errorf ("failed to update DB query log configuration " )
346
346
}
347
347
} else {
348
- return retry .RetryableError (errors .New ("unable to check DB query log config update status: " + message ))
348
+ return retry .RetryableError (errors .New ("unable to check DB query log configuration update status: " + message ))
349
349
}
350
- return retry .RetryableError (errors .New ("DB query log config is being updated" ))
350
+ return retry .RetryableError (errors .New ("DB query log configuration is being updated" ))
351
351
})
352
352
353
353
if err != nil {
354
- errorSummary := fmt .Sprintf ("Unable to update DB query log config for cluster: %s" , clusterId )
355
- resp .Diagnostics .AddError (errorSummary , "The operation timed out waiting for DB query log config update operation." )
354
+ errorSummary := fmt .Sprintf ("Unable to update DB query log configuration for cluster: %s" , clusterId )
355
+ resp .Diagnostics .AddError (errorSummary , "The operation timed out waiting for DB query log configuration update operation." )
356
356
return
357
357
}
358
358
359
359
planConfig .ConfigID .Value = configId
360
360
361
361
dbqlConfig , readOK , readErrMsg := resourceRead (ctx , accountId , projectId , clusterId , integrationName , apiClient )
362
362
if ! readOK {
363
- resp .Diagnostics .AddError ("Unable to read the state of Db Query log config " , readErrMsg )
363
+ resp .Diagnostics .AddError ("Unable to read the state of Db Query log configuration " , readErrMsg )
364
364
return
365
365
}
366
366
@@ -382,7 +382,7 @@ func (r resourceDbQueryLogging) Delete(ctx context.Context, req tfsdk.DeleteReso
382
382
383
383
_ , err := apiClient .ClusterApi .RemovePgLogExporterConfig (ctx , accountId , projectId , clusterId , configId ).Execute ()
384
384
if err != nil {
385
- resp .Diagnostics .AddError (fmt .Sprintf ("Unable to remove DB query logging config for cluster: %s" , clusterId ), GetApiErrorDetails (err ))
385
+ resp .Diagnostics .AddError (fmt .Sprintf ("Unable to remove DB query logging configuration for cluster: %s" , clusterId ), GetApiErrorDetails (err ))
386
386
return
387
387
}
388
388
@@ -404,7 +404,7 @@ func (r resourceDbQueryLogging) Delete(ctx context.Context, req tfsdk.DeleteReso
404
404
})
405
405
406
406
if err != nil {
407
- resp .Diagnostics .AddError ("Unable to remove Db Logging config from the cluster " , "The operation timed out waiting for DB Query Logging removal to complete." )
407
+ resp .Diagnostics .AddError ("Unable to remove Db Logging configuration from the cluster " , "The operation timed out waiting for DB Query Logging removal to complete." )
408
408
return
409
409
}
410
410
@@ -461,7 +461,7 @@ func (r resourceDbQueryLogging) Create(ctx context.Context, req tfsdk.CreateReso
461
461
462
462
dbQueryLoggingConfigSpec , err := buildDbQueryLoggingSpec (config , integrationId , openapiclient .NewPgLogExportConfigWithDefaults ())
463
463
if err != nil {
464
- tflog .Warn (ctx , "Unable to build DB query logging config spec" + GetApiErrorDetails (err ))
464
+ tflog .Warn (ctx , "Unable to build DB query logging configuration spec" + GetApiErrorDetails (err ))
465
465
resp .Diagnostics .AddError ("Encountered error while enabling DB Query Logging" , GetApiErrorDetails (err ))
466
466
return
467
467
}
@@ -502,7 +502,7 @@ func (r resourceDbQueryLogging) Create(ctx context.Context, req tfsdk.CreateReso
502
502
dbQueryLoggingConfig , readOK , readErrMsg := resourceRead (ctx , accountId , projectId ,
503
503
clusterId , integrationName , apiClient )
504
504
if ! readOK {
505
- resp .Diagnostics .AddError ("Unable to read the state of Db Query log config for the cluster " , readErrMsg )
505
+ resp .Diagnostics .AddError ("Unable to read the state of Db Query log configuration for the cluster " , readErrMsg )
506
506
return
507
507
}
508
508
0 commit comments