diff --git a/bundle/direct/apply.go b/bundle/direct/apply.go index e327cb8563..8932455a5a 100644 --- a/bundle/direct/apply.go +++ b/bundle/direct/apply.go @@ -80,11 +80,16 @@ func (d *DeploymentUnit) Create(ctx context.Context, db *dstate.DeploymentState, } func (d *DeploymentUnit) Recreate(ctx context.Context, db *dstate.DeploymentState, oldID string, newState any) error { + oldState, err := d.loadPersistedState(db) + if err != nil { + return err + } + // Note, unlike Delete(), we hard error on 403 here intentionally. // MANAGED_BY_PARENT is still disregarded — the subsequent Create with // replace_existing=true will reconfigure the parent-managed resource in // place, matching the Terraform provider's recreate behaviour. - err := d.Adapter.DoDelete(ctx, oldID) + err = d.Adapter.DoDelete(ctx, oldID, oldState) if err != nil && !isResourceGone(err) && !isManagedByParent(err) { return fmt.Errorf("deleting old id=%s: %w", oldID, err) } @@ -170,7 +175,12 @@ func (d *DeploymentUnit) UpdateWithID(ctx context.Context, db *dstate.Deployment } func (d *DeploymentUnit) Delete(ctx context.Context, db *dstate.DeploymentState, oldID string) error { - err := d.Adapter.DoDelete(ctx, oldID) + oldState, err := d.loadPersistedState(db) + if err != nil { + return err + } + + err = d.Adapter.DoDelete(ctx, oldID, oldState) if err != nil && !isResourceGone(err) && !isManagedByParent(err) { // Rather than failing delete and requiring user to unbind, we perform unbind automatically there. // Some services, e.g. jobs, return 403 for missing resources if caller did not have permissions to it when job existed. @@ -215,6 +225,23 @@ func parseState(destType reflect.Type, raw json.RawMessage) (any, error) { return reflect.ValueOf(destPtr).Elem().Interface(), nil } +// loadPersistedState reads and parses the resource's last-persisted state for +// the DoDelete call. Returns a zero-value state pointer when nothing has been +// persisted yet (e.g. delete after a partial-create failure), so the call site +// always passes a typed value. +func (d *DeploymentUnit) loadPersistedState(db *dstate.DeploymentState) (any, error) { + stateType := d.Adapter.StateType() + dbentry, ok := db.GetResourceEntry(d.ResourceKey) + if !ok || len(dbentry.State) == 0 { + return reflect.New(stateType.Elem()).Interface(), nil + } + state, err := parseState(stateType, dbentry.State) + if err != nil { + return nil, fmt.Errorf("parsing persisted state: %w", err) + } + return state, nil +} + func (d *DeploymentUnit) refreshRemoteState(ctx context.Context, id string) error { if d.RemoteState != nil { return nil diff --git a/bundle/direct/dresources/adapter.go b/bundle/direct/dresources/adapter.go index 5e46dad540..34c9a485f6 100644 --- a/bundle/direct/dresources/adapter.go +++ b/bundle/direct/dresources/adapter.go @@ -42,9 +42,11 @@ type IResource interface { // Example: func (r *ResourceJob) DoRead(ctx context.Context, id string) (*jobs.Job, error) DoRead(ctx context.Context, id string) (remoteState any, e error) - // DoDelete deletes the resource. - // Example: func (r *ResourceJob) DoDelete(ctx context.Context, id string) error - DoDelete(ctx context.Context, id string) error + // DoDelete deletes the resource. The state argument is the last-persisted + // state for the resource; resources that don't need it should accept it as + // _ to satisfy the interface. + // Example: func (r *ResourceJob) DoDelete(ctx context.Context, id string, _ *jobs.JobSettings) error + DoDelete(ctx context.Context, id string, state any) error // [Optional] OverrideChangeDesc can implement custom logic to update a given ChangeDesc; it is run last after built-in classifiers and field triggers. OverrideChangeDesc(ctx context.Context, path *structpath.PathNode, changedesc *ChangeDesc, remoteState any) error @@ -264,6 +266,7 @@ func (a *Adapter) validate() error { validations := []any{ "PrepareState return", a.prepareState.OutTypes[0], stateType, "DoCreate newState", a.doCreate.InTypes[1], stateType, + "DoDelete state", a.doDelete.InTypes[2], stateType, } // If RemapState is implemented, validate its signature. @@ -399,12 +402,9 @@ func (a *Adapter) DoRead(ctx context.Context, id string) (any, error) { return outs[0], nil } -func (a *Adapter) DoDelete(ctx context.Context, id string) error { - _, err := a.doDelete.Call(ctx, id) - if err != nil { - return err - } - return nil +func (a *Adapter) DoDelete(ctx context.Context, id string, state any) error { + _, err := a.doDelete.Call(ctx, id, state) + return err } // normalizeNilPointer converts a nil pointer wrapped in an interface to a nil interface. diff --git a/bundle/direct/dresources/alert.go b/bundle/direct/dresources/alert.go index 4fa4e410a1..a18641e810 100644 --- a/bundle/direct/dresources/alert.go +++ b/bundle/direct/dresources/alert.go @@ -59,7 +59,7 @@ func (r *ResourceAlert) DoUpdate(ctx context.Context, id string, config *sql.Ale } // DoDelete deletes the alert by id. -func (r *ResourceAlert) DoDelete(ctx context.Context, id string) error { +func (r *ResourceAlert) DoDelete(ctx context.Context, id string, _ *sql.AlertV2) error { return r.client.AlertsV2.TrashAlert(ctx, sql.TrashAlertV2Request{ Id: id, Purge: true, diff --git a/bundle/direct/dresources/all_test.go b/bundle/direct/dresources/all_test.go index 2c0a2e52f2..f1d61a80c7 100644 --- a/bundle/direct/dresources/all_test.go +++ b/bundle/direct/dresources/all_test.go @@ -849,7 +849,7 @@ func testCRUD(t *testing.T, group string, adapter *Adapter, client *databricks.W assert.Equal(t, val, remoteValue, "path=%q\nnewState=%s\nremappedState=%s", path.String(), jsonDump(newState), jsonDump(remappedState)) })) - err = adapter.DoDelete(ctx, createdID) + err = adapter.DoDelete(ctx, createdID, newState) require.NoError(t, err) p, err := structpath.ParsePath("name") diff --git a/bundle/direct/dresources/app.go b/bundle/direct/dresources/app.go index 8cae2e50e6..2d2e062048 100644 --- a/bundle/direct/dresources/app.go +++ b/bundle/direct/dresources/app.go @@ -316,7 +316,7 @@ func deploymentToAppConfig(d *apps.AppDeployment) *resources.AppConfig { return config } -func (r *ResourceApp) DoDelete(ctx context.Context, id string) error { +func (r *ResourceApp) DoDelete(ctx context.Context, id string, _ *AppState) error { _, err := r.client.Apps.DeleteByName(ctx, id) return err } diff --git a/bundle/direct/dresources/catalog.go b/bundle/direct/dresources/catalog.go index 2e090ddfb8..1ce28b5412 100644 --- a/bundle/direct/dresources/catalog.go +++ b/bundle/direct/dresources/catalog.go @@ -104,7 +104,7 @@ func (r *ResourceCatalog) DoUpdateWithID(ctx context.Context, id string, config return newID, response, nil } -func (r *ResourceCatalog) DoDelete(ctx context.Context, id string) error { +func (r *ResourceCatalog) DoDelete(ctx context.Context, id string, _ *catalog.CreateCatalog) error { return r.client.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{ Name: id, Force: true, diff --git a/bundle/direct/dresources/cluster.go b/bundle/direct/dresources/cluster.go index 46148a2655..c7557db035 100644 --- a/bundle/direct/dresources/cluster.go +++ b/bundle/direct/dresources/cluster.go @@ -117,7 +117,7 @@ func (r *ResourceCluster) DoResize(ctx context.Context, id string, config *compu return err } -func (r *ResourceCluster) DoDelete(ctx context.Context, id string) error { +func (r *ResourceCluster) DoDelete(ctx context.Context, id string, _ *compute.ClusterSpec) error { return r.client.Clusters.PermanentDeleteByClusterId(ctx, id) } diff --git a/bundle/direct/dresources/dashboard.go b/bundle/direct/dresources/dashboard.go index 6c4a9f1f61..dbf492a0be 100644 --- a/bundle/direct/dresources/dashboard.go +++ b/bundle/direct/dresources/dashboard.go @@ -357,7 +357,7 @@ func (r *ResourceDashboard) DoUpdate(ctx context.Context, id string, config *Das return responseToState(updateResp, publishResp, dashboard.SerializedDashboard, config.Published), nil } -func (r *ResourceDashboard) DoDelete(ctx context.Context, id string) error { +func (r *ResourceDashboard) DoDelete(ctx context.Context, id string, _ *DashboardState) error { return r.client.Lakeview.Trash(ctx, dashboards.TrashDashboardRequest{ DashboardId: id, }) diff --git a/bundle/direct/dresources/database_catalog.go b/bundle/direct/dresources/database_catalog.go index ea97574d4b..9bffa708d7 100644 --- a/bundle/direct/dresources/database_catalog.go +++ b/bundle/direct/dresources/database_catalog.go @@ -45,7 +45,7 @@ func (r *ResourceDatabaseCatalog) DoUpdate(ctx context.Context, id string, confi return nil, err } -func (r *ResourceDatabaseCatalog) DoDelete(ctx context.Context, id string) error { +func (r *ResourceDatabaseCatalog) DoDelete(ctx context.Context, id string, _ *database.DatabaseCatalog) error { return r.client.Database.DeleteDatabaseCatalog(ctx, database.DeleteDatabaseCatalogRequest{ Name: id, }) diff --git a/bundle/direct/dresources/database_instance.go b/bundle/direct/dresources/database_instance.go index d3bceda4b7..2169a61fc8 100644 --- a/bundle/direct/dresources/database_instance.go +++ b/bundle/direct/dresources/database_instance.go @@ -60,7 +60,7 @@ func (d *ResourceDatabaseInstance) WaitAfterCreate(ctx context.Context, id strin return nil, err } -func (d *ResourceDatabaseInstance) DoDelete(ctx context.Context, name string) error { +func (d *ResourceDatabaseInstance) DoDelete(ctx context.Context, name string, _ *database.DatabaseInstance) error { return d.client.Database.DeleteDatabaseInstance(ctx, database.DeleteDatabaseInstanceRequest{ Name: name, Purge: true, diff --git a/bundle/direct/dresources/experiment.go b/bundle/direct/dresources/experiment.go index de62720fe8..bedabc8136 100644 --- a/bundle/direct/dresources/experiment.go +++ b/bundle/direct/dresources/experiment.go @@ -68,7 +68,7 @@ func (r *ResourceExperiment) DoUpdate(ctx context.Context, id string, config *ml return nil, r.client.Experiments.UpdateExperiment(ctx, updateReq) } -func (r *ResourceExperiment) DoDelete(ctx context.Context, id string) error { +func (r *ResourceExperiment) DoDelete(ctx context.Context, id string, _ *ml.CreateExperiment) error { return r.client.Experiments.DeleteExperiment(ctx, ml.DeleteExperiment{ ExperimentId: id, }) diff --git a/bundle/direct/dresources/external_location.go b/bundle/direct/dresources/external_location.go index a9715b0619..64eace48eb 100644 --- a/bundle/direct/dresources/external_location.go +++ b/bundle/direct/dresources/external_location.go @@ -117,7 +117,7 @@ func (r *ResourceExternalLocation) DoUpdateWithID(ctx context.Context, id string return newID, response, nil } -func (r *ResourceExternalLocation) DoDelete(ctx context.Context, id string) error { +func (r *ResourceExternalLocation) DoDelete(ctx context.Context, id string, _ *catalog.CreateExternalLocation) error { return r.client.ExternalLocations.Delete(ctx, catalog.DeleteExternalLocationRequest{ Name: id, Force: true, diff --git a/bundle/direct/dresources/grants.go b/bundle/direct/dresources/grants.go index 8bb1906122..c5b15e920b 100644 --- a/bundle/direct/dresources/grants.go +++ b/bundle/direct/dresources/grants.go @@ -128,7 +128,7 @@ func (r *ResourceGrants) DoUpdate(ctx context.Context, _ string, state *GrantsSt return nil, err } -func (r *ResourceGrants) DoDelete(ctx context.Context, id string) error { +func (r *ResourceGrants) DoDelete(ctx context.Context, id string, _ *GrantsState) error { // Similar to permissions, we do nothing there. // We could delete all grants there, but it would be confusing to explain wrt permissions. return nil diff --git a/bundle/direct/dresources/job.go b/bundle/direct/dresources/job.go index 9477bf5251..40ea745f09 100644 --- a/bundle/direct/dresources/job.go +++ b/bundle/direct/dresources/job.go @@ -141,7 +141,7 @@ func (r *ResourceJob) DoUpdate(ctx context.Context, id string, config *jobs.JobS return nil, r.client.Jobs.Reset(ctx, request) } -func (r *ResourceJob) DoDelete(ctx context.Context, id string) error { +func (r *ResourceJob) DoDelete(ctx context.Context, id string, _ *jobs.JobSettings) error { idInt, err := parseJobID(id) if err != nil { return err diff --git a/bundle/direct/dresources/model.go b/bundle/direct/dresources/model.go index 52a3b1075d..9d04231456 100644 --- a/bundle/direct/dresources/model.go +++ b/bundle/direct/dresources/model.go @@ -97,7 +97,7 @@ func (r *ResourceMlflowModel) DoUpdate(ctx context.Context, id string, config *m }, nil } -func (r *ResourceMlflowModel) DoDelete(ctx context.Context, id string) error { +func (r *ResourceMlflowModel) DoDelete(ctx context.Context, id string, _ *ml.CreateModelRequest) error { return r.client.ModelRegistry.DeleteModel(ctx, ml.DeleteModelRequest{ Name: id, }) diff --git a/bundle/direct/dresources/model_serving_endpoint.go b/bundle/direct/dresources/model_serving_endpoint.go index 35aec6ffd4..ccab3a13de 100644 --- a/bundle/direct/dresources/model_serving_endpoint.go +++ b/bundle/direct/dresources/model_serving_endpoint.go @@ -327,6 +327,6 @@ func (r *ResourceModelServingEndpoint) DoUpdate(ctx context.Context, id string, return nil, nil } -func (r *ResourceModelServingEndpoint) DoDelete(ctx context.Context, id string) error { +func (r *ResourceModelServingEndpoint) DoDelete(ctx context.Context, id string, _ *serving.CreateServingEndpoint) error { return r.client.ServingEndpoints.DeleteByName(ctx, id) } diff --git a/bundle/direct/dresources/permissions.go b/bundle/direct/dresources/permissions.go index eac5e2dcdb..6755dac69c 100644 --- a/bundle/direct/dresources/permissions.go +++ b/bundle/direct/dresources/permissions.go @@ -259,7 +259,7 @@ func (r *ResourcePermissions) DoUpdate(ctx context.Context, _ string, newState * // it themselves. Trying to fix permissions back requires // - making assumptions on what it should look like // - storing current user somewhere or storing original permissions somewhere -func (r *ResourcePermissions) DoDelete(ctx context.Context, id string) error { +func (r *ResourcePermissions) DoDelete(ctx context.Context, id string, _ *PermissionsState) error { // intentional noop return nil } diff --git a/bundle/direct/dresources/pipeline.go b/bundle/direct/dresources/pipeline.go index 9a59ab4e40..3ce1e26ac5 100644 --- a/bundle/direct/dresources/pipeline.go +++ b/bundle/direct/dresources/pipeline.go @@ -170,7 +170,7 @@ func (r *ResourcePipeline) DoUpdate(ctx context.Context, id string, config *pipe return nil, r.client.Pipelines.Update(ctx, request) } -func (r *ResourcePipeline) DoDelete(ctx context.Context, id string) error { +func (r *ResourcePipeline) DoDelete(ctx context.Context, id string, _ *pipelines.CreatePipeline) error { return r.client.Pipelines.DeleteByPipelineId(ctx, id) } diff --git a/bundle/direct/dresources/postgres_branch.go b/bundle/direct/dresources/postgres_branch.go index f2b2a982ed..632b15ad84 100644 --- a/bundle/direct/dresources/postgres_branch.go +++ b/bundle/direct/dresources/postgres_branch.go @@ -171,7 +171,7 @@ func (r *ResourcePostgresBranch) DoUpdate(ctx context.Context, id string, config return makePostgresBranchRemote(result), nil } -func (r *ResourcePostgresBranch) DoDelete(ctx context.Context, id string) error { +func (r *ResourcePostgresBranch) DoDelete(ctx context.Context, id string, _ *PostgresBranchState) error { waiter, err := r.client.Postgres.DeleteBranch(ctx, postgres.DeleteBranchRequest{ Name: id, }) diff --git a/bundle/direct/dresources/postgres_endpoint.go b/bundle/direct/dresources/postgres_endpoint.go index 81821afeb4..f99054f4c8 100644 --- a/bundle/direct/dresources/postgres_endpoint.go +++ b/bundle/direct/dresources/postgres_endpoint.go @@ -217,7 +217,7 @@ func (r *ResourcePostgresEndpoint) DoUpdate(ctx context.Context, id string, conf return r.waitForReconciliation(ctx, id) } -func (r *ResourcePostgresEndpoint) DoDelete(ctx context.Context, id string) error { +func (r *ResourcePostgresEndpoint) DoDelete(ctx context.Context, id string, _ *PostgresEndpointState) error { // Retry loop to handle "Endpoint reconciliation still in progress" errors deadline := time.Now().Add(endpointReconciliationTimeout) for { diff --git a/bundle/direct/dresources/postgres_project.go b/bundle/direct/dresources/postgres_project.go index d19834876c..24b6689304 100644 --- a/bundle/direct/dresources/postgres_project.go +++ b/bundle/direct/dresources/postgres_project.go @@ -168,7 +168,7 @@ func (r *ResourcePostgresProject) DoUpdate(ctx context.Context, id string, confi return makePostgresProjectRemote(result), nil } -func (r *ResourcePostgresProject) DoDelete(ctx context.Context, id string) error { +func (r *ResourcePostgresProject) DoDelete(ctx context.Context, id string, _ *PostgresProjectState) error { waiter, err := r.client.Postgres.DeleteProject(ctx, postgres.DeleteProjectRequest{ Name: id, Purge: false, diff --git a/bundle/direct/dresources/quality_monitor.go b/bundle/direct/dresources/quality_monitor.go index 3866779618..c66fed4e0b 100644 --- a/bundle/direct/dresources/quality_monitor.go +++ b/bundle/direct/dresources/quality_monitor.go @@ -110,7 +110,7 @@ func (r *ResourceQualityMonitor) DoUpdate(ctx context.Context, id string, config return response, nil } -func (r *ResourceQualityMonitor) DoDelete(ctx context.Context, id string) error { +func (r *ResourceQualityMonitor) DoDelete(ctx context.Context, id string, _ *QualityMonitorState) error { //nolint:staticcheck // Direct quality_monitor resource still uses legacy monitor endpoints; v1 data-quality migration is separate work. _, err := r.client.QualityMonitors.Delete(ctx, catalog.DeleteQualityMonitorRequest{ TableName: id, diff --git a/bundle/direct/dresources/registered_model.go b/bundle/direct/dresources/registered_model.go index e191f52b8b..888870a758 100644 --- a/bundle/direct/dresources/registered_model.go +++ b/bundle/direct/dresources/registered_model.go @@ -98,7 +98,7 @@ func (r *ResourceRegisteredModel) DoUpdate(ctx context.Context, id string, confi return response, nil } -func (r *ResourceRegisteredModel) DoDelete(ctx context.Context, id string) error { +func (r *ResourceRegisteredModel) DoDelete(ctx context.Context, id string, _ *catalog.CreateRegisteredModelRequest) error { return r.client.RegisteredModels.Delete(ctx, catalog.DeleteRegisteredModelRequest{ FullName: id, }) diff --git a/bundle/direct/dresources/schema.go b/bundle/direct/dresources/schema.go index 783b87caf9..f082ea6c54 100644 --- a/bundle/direct/dresources/schema.go +++ b/bundle/direct/dresources/schema.go @@ -69,7 +69,7 @@ func (r *ResourceSchema) DoUpdate(ctx context.Context, id string, config *catalo return response, nil } -func (r *ResourceSchema) DoDelete(ctx context.Context, id string) error { +func (r *ResourceSchema) DoDelete(ctx context.Context, id string, _ *catalog.CreateSchema) error { return r.client.Schemas.Delete(ctx, catalog.DeleteSchemaRequest{ FullName: id, Force: true, diff --git a/bundle/direct/dresources/secret_scope.go b/bundle/direct/dresources/secret_scope.go index 420424997a..c811dc84d7 100644 --- a/bundle/direct/dresources/secret_scope.go +++ b/bundle/direct/dresources/secret_scope.go @@ -78,6 +78,6 @@ func (r *ResourceSecretScope) DoCreate(ctx context.Context, state *SecretScopeCo // DoUpdate is not intentionally implemented here because scopes do not support a update API. All fields are marked to // return a recreate trigger. -func (r *ResourceSecretScope) DoDelete(ctx context.Context, id string) error { +func (r *ResourceSecretScope) DoDelete(ctx context.Context, id string, _ *SecretScopeConfig) error { return r.client.Secrets.DeleteScopeByScope(ctx, id) } diff --git a/bundle/direct/dresources/secret_scope_acls.go b/bundle/direct/dresources/secret_scope_acls.go index dc03544e9c..ef04cb7cb6 100644 --- a/bundle/direct/dresources/secret_scope_acls.go +++ b/bundle/direct/dresources/secret_scope_acls.go @@ -115,7 +115,7 @@ func (r *ResourceSecretScopeAcls) DoUpdate(ctx context.Context, id string, state } // Removing ACLs is a no-op, to match the behavior for permissions and grants. -func (r *ResourceSecretScopeAcls) DoDelete(ctx context.Context, id string) error { +func (r *ResourceSecretScopeAcls) DoDelete(ctx context.Context, id string, _ *SecretScopeAclsState) error { return nil } diff --git a/bundle/direct/dresources/sql_warehouse.go b/bundle/direct/dresources/sql_warehouse.go index 2e8caa4a4a..704f9f6618 100644 --- a/bundle/direct/dresources/sql_warehouse.go +++ b/bundle/direct/dresources/sql_warehouse.go @@ -89,6 +89,6 @@ func (r *ResourceSqlWarehouse) DoUpdate(ctx context.Context, id string, config * return nil, nil } -func (r *ResourceSqlWarehouse) DoDelete(ctx context.Context, oldID string) error { +func (r *ResourceSqlWarehouse) DoDelete(ctx context.Context, oldID string, _ *sql.CreateWarehouseRequest) error { return r.client.Warehouses.DeleteById(ctx, oldID) } diff --git a/bundle/direct/dresources/synced_database_table.go b/bundle/direct/dresources/synced_database_table.go index 94182b729f..d45c6fb3fc 100644 --- a/bundle/direct/dresources/synced_database_table.go +++ b/bundle/direct/dresources/synced_database_table.go @@ -45,7 +45,7 @@ func (r *ResourceSyncedDatabaseTable) DoUpdate(ctx context.Context, id string, c return nil, err } -func (r *ResourceSyncedDatabaseTable) DoDelete(ctx context.Context, id string) error { +func (r *ResourceSyncedDatabaseTable) DoDelete(ctx context.Context, id string, _ *database.SyncedDatabaseTable) error { return r.client.Database.DeleteSyncedDatabaseTable(ctx, database.DeleteSyncedDatabaseTableRequest{ Name: id, PurgeData: false, diff --git a/bundle/direct/dresources/vector_search_endpoint.go b/bundle/direct/dresources/vector_search_endpoint.go index 39211ca63a..b3b44bb2c8 100644 --- a/bundle/direct/dresources/vector_search_endpoint.go +++ b/bundle/direct/dresources/vector_search_endpoint.go @@ -110,6 +110,6 @@ func (r *ResourceVectorSearchEndpoint) DoUpdate(ctx context.Context, id string, return nil, nil } -func (r *ResourceVectorSearchEndpoint) DoDelete(ctx context.Context, id string) error { +func (r *ResourceVectorSearchEndpoint) DoDelete(ctx context.Context, id string, _ *vectorsearch.CreateEndpoint) error { return r.client.VectorSearchEndpoints.DeleteEndpointByEndpointName(ctx, id) } diff --git a/bundle/direct/dresources/volume.go b/bundle/direct/dresources/volume.go index 35196bdb38..73bf7a79b4 100644 --- a/bundle/direct/dresources/volume.go +++ b/bundle/direct/dresources/volume.go @@ -110,7 +110,7 @@ func (r *ResourceVolume) DoUpdateWithID(ctx context.Context, id string, config * return response.FullName, response, nil } -func (r *ResourceVolume) DoDelete(ctx context.Context, id string) error { +func (r *ResourceVolume) DoDelete(ctx context.Context, id string, _ *catalog.CreateVolumeRequestContent) error { return r.client.Volumes.DeleteByName(ctx, id) }