From 0218be351620b69c0c62cace1e371a8747af2954 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 +- internal/service/sharing_tf/model.go | 2 +- 3 files changed, 4 insertions(+), 4 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), diff --git a/internal/service/sharing_tf/model.go b/internal/service/sharing_tf/model.go index ecddf5236e..b50f924d91 100755 --- a/internal/service/sharing_tf/model.go +++ b/internal/service/sharing_tf/model.go @@ -2289,7 +2289,7 @@ type ShareInfo struct { // A list of shared data objects within the share. Objects types.List `tfsdk:"object" tf:"optional"` // Username of current owner of share. - Owner types.String `tfsdk:"owner" tf:"computed"` + Owner types.String `tfsdk:"owner" tf:"computed,optional"` // Storage Location URL (full path) for the share. StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` // Storage root URL for the share.