From b5db811a619c14e12f3e5145ca26f15762d2be9f Mon Sep 17 00:00:00 2001 From: Alex Ott Date: Tue, 10 Dec 2024 06:14:54 +0100 Subject: [PATCH] Temporary workaround until OpenAPI spec is fixed --- catalog/resource_credential.go | 4 ++-- catalog/resource_credential_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/catalog/resource_credential.go b/catalog/resource_credential.go index 72f1ea5da1..0f5921c81c 100644 --- a/catalog/resource_credential.go +++ b/catalog/resource_credential.go @@ -88,7 +88,7 @@ func ResourceCredential() common.Resource { } // Bind the current workspace if the credential is isolated, otherwise the read will fail - return bindings.AddCurrentWorkspaceBindings(ctx, d, w, cred.Name, catalog.UpdateBindingsSecurableTypeServiceCredential) + return bindings.AddCurrentWorkspaceBindings(ctx, d, w, cred.Name, catalog.UpdateBindingsSecurableTypeCredential) }, Read: func(ctx context.Context, d *schema.ResourceData, c *common.DatabricksClient) error { w, err := c.WorkspaceClient() @@ -155,7 +155,7 @@ func ResourceCredential() common.Resource { return err } // Bind the current workspace if the credential is isolated, otherwise the read will fail - return bindings.AddCurrentWorkspaceBindings(ctx, d, w, updateCredRequest.NameArg, catalog.UpdateBindingsSecurableTypeServiceCredential) + return bindings.AddCurrentWorkspaceBindings(ctx, d, w, updateCredRequest.NameArg, catalog.UpdateBindingsSecurableTypeCredential) }, Delete: func(ctx context.Context, d *schema.ResourceData, c *common.DatabricksClient) error { force := d.Get("force_destroy").(bool) diff --git a/catalog/resource_credential_test.go b/catalog/resource_credential_test.go index c8f4573d4f..d215106fb7 100644 --- a/catalog/resource_credential_test.go +++ b/catalog/resource_credential_test.go @@ -110,7 +110,7 @@ func TestCreateIsolatedCredential(t *testing.T) { }, nil) w.GetMockWorkspaceBindingsAPI().EXPECT().UpdateBindings(mock.Anything, catalog.UpdateWorkspaceBindingsParameters{ SecurableName: "a", - SecurableType: catalog.UpdateBindingsSecurableTypeServiceCredential, + SecurableType: catalog.UpdateBindingsSecurableTypeCredential, Add: []catalog.WorkspaceBinding{ { WorkspaceId: int64(123456789101112),