Skip to content

Commit

Permalink
Temporary workaround until OpenAPI spec is fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
alexott authored and hectorcast-db committed Dec 17, 2024
1 parent 985fc30 commit b5db811
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions catalog/resource_credential.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion catalog/resource_credential_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit b5db811

Please sign in to comment.