diff --git a/internal/providers/pluginfw/resources/library/resource_library.go b/internal/providers/pluginfw/resources/library/resource_library.go index 17ac722bf..95cc36e2a 100644 --- a/internal/providers/pluginfw/resources/library/resource_library.go +++ b/internal/providers/pluginfw/resources/library/resource_library.go @@ -9,7 +9,6 @@ import ( "github.com/databricks/terraform-provider-databricks/clusters" "github.com/databricks/terraform-provider-databricks/common" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" - pluginfwcontext "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/context" "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/converters" "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/databricks/terraform-provider-databricks/internal/service/compute_tf" @@ -105,7 +104,6 @@ func (r *LibraryResource) Configure(ctx context.Context, req resource.ConfigureR } func (r *LibraryResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { - ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) w, diags := r.Client.GetWorkspaceClient() resp.Diagnostics.Append(diags...) if resp.Diagnostics.HasError() { @@ -150,7 +148,6 @@ func (r *LibraryResource) Create(ctx context.Context, req resource.CreateRequest } func (r *LibraryResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { - ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) w, diags := r.Client.GetWorkspaceClient() resp.Diagnostics.Append(diags...) if resp.Diagnostics.HasError() { @@ -188,7 +185,6 @@ func (r *LibraryResource) Update(ctx context.Context, req resource.UpdateRequest } func (r *LibraryResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { - ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) w, diags := r.Client.GetWorkspaceClient() resp.Diagnostics.Append(diags...) if resp.Diagnostics.HasError() { diff --git a/internal/providers/pluginfw/resources/qualitymonitor/resource_quality_monitor.go b/internal/providers/pluginfw/resources/qualitymonitor/resource_quality_monitor.go index 7a0445ddb..f87d2b28c 100644 --- a/internal/providers/pluginfw/resources/qualitymonitor/resource_quality_monitor.go +++ b/internal/providers/pluginfw/resources/qualitymonitor/resource_quality_monitor.go @@ -11,7 +11,6 @@ import ( "github.com/databricks/databricks-sdk-go/service/catalog" "github.com/databricks/terraform-provider-databricks/common" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" - pluginfwcontext "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/context" "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/converters" "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/databricks/terraform-provider-databricks/internal/service/catalog_tf" @@ -99,7 +98,6 @@ func (d *QualityMonitorResource) ImportState(ctx context.Context, req resource.I } func (r *QualityMonitorResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { - ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) w, diags := r.Client.GetWorkspaceClient() resp.Diagnostics.Append(diags...) if resp.Diagnostics.HasError() { @@ -139,7 +137,6 @@ func (r *QualityMonitorResource) Create(ctx context.Context, req resource.Create } func (r *QualityMonitorResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { - ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) w, diags := r.Client.GetWorkspaceClient() resp.Diagnostics.Append(diags...) if resp.Diagnostics.HasError() { @@ -172,7 +169,6 @@ func (r *QualityMonitorResource) Read(ctx context.Context, req resource.ReadRequ } func (r *QualityMonitorResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { - ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) w, diags := r.Client.GetWorkspaceClient() resp.Diagnostics.Append(diags...) if resp.Diagnostics.HasError() { @@ -215,7 +211,6 @@ func (r *QualityMonitorResource) Update(ctx context.Context, req resource.Update } func (r *QualityMonitorResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { - ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) w, diags := r.Client.GetWorkspaceClient() resp.Diagnostics.Append(diags...) if resp.Diagnostics.HasError() { diff --git a/internal/providers/pluginfw/resources/sharing/resource_share.go b/internal/providers/pluginfw/resources/sharing/resource_share.go index b96cd0e97..ce6b6d88b 100644 --- a/internal/providers/pluginfw/resources/sharing/resource_share.go +++ b/internal/providers/pluginfw/resources/sharing/resource_share.go @@ -9,7 +9,6 @@ import ( "github.com/databricks/databricks-sdk-go/service/sharing" "github.com/databricks/terraform-provider-databricks/common" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" - pluginfwcontext "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/context" "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/converters" "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/databricks/terraform-provider-databricks/internal/service/sharing_tf" @@ -163,8 +162,6 @@ func (d *ShareResource) Configure(ctx context.Context, req resource.ConfigureReq } func (r *ShareResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { - ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) - w, diags := r.Client.GetWorkspaceClient() resp.Diagnostics.Append(diags...) if resp.Diagnostics.HasError() { @@ -226,8 +223,6 @@ func (r *ShareResource) Create(ctx context.Context, req resource.CreateRequest, } func (r *ShareResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { - ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) - var existingState ShareInfoExtended resp.Diagnostics.Append(req.State.Get(ctx, &existingState)...) if resp.Diagnostics.HasError() { @@ -281,8 +276,6 @@ func (r *ShareResource) Read(ctx context.Context, req resource.ReadRequest, resp } func (r *ShareResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { - ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) - var state ShareInfoExtended resp.Diagnostics.Append(req.State.Get(ctx, &state)...) if resp.Diagnostics.HasError() { @@ -380,8 +373,6 @@ func (r *ShareResource) Update(ctx context.Context, req resource.UpdateRequest, } func (r *ShareResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { - ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) - w, diags := r.Client.GetWorkspaceClient() resp.Diagnostics.Append(diags...) if resp.Diagnostics.HasError() {