Argus/Postgresflex Credentials import documentation and fix (#22)

* Add documentation

* Remove password from datasource

* Fix bug§

* add warning

* Create logAndWarning function
This commit is contained in:
Vicente Pinto 2023-09-25 10:47:28 +01:00 committed by GitHub
parent 9b5ca058ef
commit d3cdbf0e2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 87 additions and 8 deletions

View file

@ -54,3 +54,9 @@ func LogAndAddError(ctx context.Context, diags *diag.Diagnostics, summary, detai
tflog.Error(ctx, summary)
diags.AddError(summary, detail)
}
// LogAndAddWarning Logs the warning and adds it to the diags
func LogAndAddWarning(ctx context.Context, diags *diag.Diagnostics, summary, detail string) {
tflog.Warn(ctx, summary)
diags.AddWarning(summary, detail)
}