Fix error handling on object storage service enablement (#165)

* Fix error handling on objecto storage service enablement

* Add message about depends_on

* Update docs
This commit is contained in:
Vicente Pinto 2023-12-18 14:51:32 +00:00 committed by GitHub
parent 35275fd336
commit 506d1afdc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 9 deletions

View file

@ -186,7 +186,7 @@ func (r *credentialResource) Create(ctx context.Context, req resource.CreateRequ
// Handle project init
err := enableProject(ctx, &model, r.client)
if resp.Diagnostics.HasError() {
if err != nil {
core.LogAndAddError(ctx, &resp.Diagnostics, "Error creating credential", fmt.Sprintf("Enabling object storage project before creation: %v", err))
return
}