From 89868e71c4dab662d5b8f3a94e6a9370cdebcb40 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Mon, 8 Dec 2025 12:04:20 +0000 Subject: [PATCH 1/6] Upgrade Go SDK to v0.93.0 --- .codegen/_openapi_sha | 2 +- .gitattributes | 1 + .../internal/schema/annotations_openapi.yml | 10 +- .../schema/annotations_openapi_overrides.yml | 4 + bundle/schema/jsonschema.json | 6 +- cmd/workspace/cmd.go | 2 + cmd/workspace/database/database.go | 2 + cmd/workspace/lakeview/lakeview.go | 4 + .../workspace-entity-tag-assignments.go | 412 ++++++++++++++++++ go.mod | 2 +- go.sum | 4 +- .../bundles/jobs/_models/cluster_spec.py | 6 +- 12 files changed, 439 insertions(+), 16 deletions(-) create mode 100755 cmd/workspace/workspace-entity-tag-assignments/workspace-entity-tag-assignments.go diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index 6d4ada17b6..15c31f0e40 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -8f5eedbc991c4f04ce1284406577b0c92d59a224 \ No newline at end of file +8b2cd47cbac64b32e120601110a5fc70b8189ba4 \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index 392472e6f7..3cf3669eda 100755 --- a/.gitattributes +++ b/.gitattributes @@ -168,6 +168,7 @@ cmd/workspace/volumes/volumes.go linguist-generated=true cmd/workspace/warehouses/warehouses.go linguist-generated=true cmd/workspace/workspace-bindings/workspace-bindings.go linguist-generated=true cmd/workspace/workspace-conf/workspace-conf.go linguist-generated=true +cmd/workspace/workspace-entity-tag-assignments/workspace-entity-tag-assignments.go linguist-generated=true cmd/workspace/workspace-iam-v2/workspace-iam-v2.go linguist-generated=true cmd/workspace/workspace-settings-v2/workspace-settings-v2.go linguist-generated=true cmd/workspace/workspace/workspace.go linguist-generated=true diff --git a/bundle/internal/schema/annotations_openapi.yml b/bundle/internal/schema/annotations_openapi.yml index 1ae72629ff..038d8959be 100644 --- a/bundle/internal/schema/annotations_openapi.yml +++ b/bundle/internal/schema/annotations_openapi.yml @@ -243,8 +243,7 @@ github.com/databricks/cli/bundle/config/resources.Cluster: "enable_elastic_disk": "description": |- Autoscaling Local Storage: when enabled, this cluster will dynamically acquire additional disk - space when its Spark workers are running low on disk space. This feature requires specific AWS - permissions to function correctly - refer to the User Guide for more details. + space when its Spark workers are running low on disk space. "enable_local_disk_encryption": "description": |- Whether to enable LUKS on cluster VMs' local disks @@ -1702,8 +1701,7 @@ github.com/databricks/databricks-sdk-go/service/compute.ClusterSpec: "enable_elastic_disk": "description": |- Autoscaling Local Storage: when enabled, this cluster will dynamically acquire additional disk - space when its Spark workers are running low on disk space. This feature requires specific AWS - permissions to function correctly - refer to the User Guide for more details. + space when its Spark workers are running low on disk space. "enable_local_disk_encryption": "description": |- Whether to enable LUKS on cluster VMs' local disks @@ -4961,7 +4959,9 @@ github.com/databricks/databricks-sdk-go/service/sql.AlertV2Notification: Whether to notify alert subscribers when alert returns back to normal. "retrigger_seconds": "description": |- - Number of seconds an alert must wait after being triggered to rearm itself. After rearming, it can be triggered again. If 0 or not specified, the alert will not be triggered again. + Number of seconds an alert waits after being triggered before it is allowed to send another notification. + If set to 0 or omitted, the alert will not send any further notifications after the first trigger + Setting this value to 1 allows the alert to send a notification on every evaluation where the condition is met, effectively making it always retrigger for notification purposes. "subscriptions": {} github.com/databricks/databricks-sdk-go/service/sql.AlertV2Operand: "column": {} diff --git a/bundle/internal/schema/annotations_openapi_overrides.yml b/bundle/internal/schema/annotations_openapi_overrides.yml index 427c184570..85435c5ce3 100644 --- a/bundle/internal/schema/annotations_openapi_overrides.yml +++ b/bundle/internal/schema/annotations_openapi_overrides.yml @@ -645,6 +645,10 @@ github.com/databricks/cli/bundle/config/resources.SqlWarehousePermissionLevel: CAN_MONITOR - |- CAN_VIEW +github.com/databricks/cli/bundle/config/resources.SyncedDatabaseTable: + "lifecycle": + "description": |- + PLACEHOLDER github.com/databricks/cli/bundle/config/resources.Volume: "_": "markdown_description": |- diff --git a/bundle/schema/jsonschema.json b/bundle/schema/jsonschema.json index bc035f427f..bf8dc42ac0 100644 --- a/bundle/schema/jsonschema.json +++ b/bundle/schema/jsonschema.json @@ -310,7 +310,7 @@ "$ref": "#/$defs/string" }, "enable_elastic_disk": { - "description": "Autoscaling Local Storage: when enabled, this cluster will dynamically acquire additional disk\nspace when its Spark workers are running low on disk space. This feature requires specific AWS\npermissions to function correctly - refer to the User Guide for more details.", + "description": "Autoscaling Local Storage: when enabled, this cluster will dynamically acquire additional disk\nspace when its Spark workers are running low on disk space.", "$ref": "#/$defs/bool" }, "enable_local_disk_encryption": { @@ -3825,7 +3825,7 @@ "$ref": "#/$defs/string" }, "enable_elastic_disk": { - "description": "Autoscaling Local Storage: when enabled, this cluster will dynamically acquire additional disk\nspace when its Spark workers are running low on disk space. This feature requires specific AWS\npermissions to function correctly - refer to the User Guide for more details.", + "description": "Autoscaling Local Storage: when enabled, this cluster will dynamically acquire additional disk\nspace when its Spark workers are running low on disk space.", "$ref": "#/$defs/bool" }, "enable_local_disk_encryption": { @@ -9138,7 +9138,7 @@ "$ref": "#/$defs/bool" }, "retrigger_seconds": { - "description": "Number of seconds an alert must wait after being triggered to rearm itself. After rearming, it can be triggered again. If 0 or not specified, the alert will not be triggered again.", + "description": "Number of seconds an alert waits after being triggered before it is allowed to send another notification.\nIf set to 0 or omitted, the alert will not send any further notifications after the first trigger\nSetting this value to 1 allows the alert to send a notification on every evaluation where the condition is met, effectively making it always retrigger for notification purposes.", "$ref": "#/$defs/int" }, "subscriptions": { diff --git a/cmd/workspace/cmd.go b/cmd/workspace/cmd.go index fbe23fb6c5..4e6daa1dc4 100755 --- a/cmd/workspace/cmd.go +++ b/cmd/workspace/cmd.go @@ -114,6 +114,7 @@ import ( workspace "github.com/databricks/cli/cmd/workspace/workspace" workspace_bindings "github.com/databricks/cli/cmd/workspace/workspace-bindings" workspace_conf "github.com/databricks/cli/cmd/workspace/workspace-conf" + workspace_entity_tag_assignments "github.com/databricks/cli/cmd/workspace/workspace-entity-tag-assignments" workspace_iam_v2 "github.com/databricks/cli/cmd/workspace/workspace-iam-v2" workspace_settings_v2 "github.com/databricks/cli/cmd/workspace/workspace-settings-v2" "github.com/spf13/cobra" @@ -237,6 +238,7 @@ func All() []*cobra.Command { out = append(out, workspace.New()) out = append(out, workspace_bindings.New()) out = append(out, workspace_conf.New()) + out = append(out, workspace_entity_tag_assignments.New()) out = append(out, workspace_iam_v2.New()) out = append(out, workspace_settings_v2.New()) diff --git a/cmd/workspace/database/database.go b/cmd/workspace/database/database.go index 0b1fc4b6cf..cda2ff1733 100755 --- a/cmd/workspace/database/database.go +++ b/cmd/workspace/database/database.go @@ -755,6 +755,8 @@ func newDeleteSyncedDatabaseTable() *cobra.Command { var deleteSyncedDatabaseTableReq database.DeleteSyncedDatabaseTableRequest + cmd.Flags().BoolVar(&deleteSyncedDatabaseTableReq.PurgeData, "purge-data", deleteSyncedDatabaseTableReq.PurgeData, `Optional.`) + cmd.Use = "delete-synced-database-table NAME" cmd.Short = `Delete a Synced Database Table.` cmd.Long = `Delete a Synced Database Table.` diff --git a/cmd/workspace/lakeview/lakeview.go b/cmd/workspace/lakeview/lakeview.go index 283a02c3b4..7db81cfe12 100755 --- a/cmd/workspace/lakeview/lakeview.go +++ b/cmd/workspace/lakeview/lakeview.go @@ -74,6 +74,8 @@ func newCreate() *cobra.Command { cmd.Flags().Var(&createJson, "json", `either inline JSON string or @path/to/file.json with request body`) + cmd.Flags().StringVar(&createReq.DatasetCatalog, "dataset-catalog", createReq.DatasetCatalog, `Sets the default catalog for all datasets in this dashboard.`) + cmd.Flags().StringVar(&createReq.DatasetSchema, "dataset-schema", createReq.DatasetSchema, `Sets the default schema for all datasets in this dashboard.`) cmd.Flags().StringVar(&createReq.Dashboard.DisplayName, "display-name", createReq.Dashboard.DisplayName, `The display name of the dashboard.`) cmd.Flags().StringVar(&createReq.Dashboard.SerializedDashboard, "serialized-dashboard", createReq.Dashboard.SerializedDashboard, `The contents of the dashboard in serialized string form.`) cmd.Flags().StringVar(&createReq.Dashboard.WarehouseId, "warehouse-id", createReq.Dashboard.WarehouseId, `The warehouse ID used to run the dashboard.`) @@ -1099,6 +1101,8 @@ func newUpdate() *cobra.Command { cmd.Flags().Var(&updateJson, "json", `either inline JSON string or @path/to/file.json with request body`) + cmd.Flags().StringVar(&updateReq.DatasetCatalog, "dataset-catalog", updateReq.DatasetCatalog, `Sets the default catalog for all datasets in this dashboard.`) + cmd.Flags().StringVar(&updateReq.DatasetSchema, "dataset-schema", updateReq.DatasetSchema, `Sets the default schema for all datasets in this dashboard.`) cmd.Flags().StringVar(&updateReq.Dashboard.DisplayName, "display-name", updateReq.Dashboard.DisplayName, `The display name of the dashboard.`) cmd.Flags().StringVar(&updateReq.Dashboard.SerializedDashboard, "serialized-dashboard", updateReq.Dashboard.SerializedDashboard, `The contents of the dashboard in serialized string form.`) cmd.Flags().StringVar(&updateReq.Dashboard.WarehouseId, "warehouse-id", updateReq.Dashboard.WarehouseId, `The warehouse ID used to run the dashboard.`) diff --git a/cmd/workspace/workspace-entity-tag-assignments/workspace-entity-tag-assignments.go b/cmd/workspace/workspace-entity-tag-assignments/workspace-entity-tag-assignments.go new file mode 100755 index 0000000000..b9216caece --- /dev/null +++ b/cmd/workspace/workspace-entity-tag-assignments/workspace-entity-tag-assignments.go @@ -0,0 +1,412 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package workspace_entity_tag_assignments + +import ( + "fmt" + + "github.com/databricks/cli/cmd/root" + "github.com/databricks/cli/libs/cmdctx" + "github.com/databricks/cli/libs/cmdio" + "github.com/databricks/cli/libs/flags" + "github.com/databricks/databricks-sdk-go/service/tags" + "github.com/spf13/cobra" +) + +// Slice with functions to override default command behavior. +// Functions can be added from the `init()` function in manually curated files in this directory. +var cmdOverrides []func(*cobra.Command) + +func New() *cobra.Command { + cmd := &cobra.Command{ + Use: "workspace-entity-tag-assignments", + Short: `Manage tag assignments on workspace-scoped objects.`, + Long: `Manage tag assignments on workspace-scoped objects.`, + GroupID: "tags", + RunE: root.ReportUnknownSubcommand, + } + + // Add methods + cmd.AddCommand(newCreateTagAssignment()) + cmd.AddCommand(newDeleteTagAssignment()) + cmd.AddCommand(newGetTagAssignment()) + cmd.AddCommand(newListTagAssignments()) + cmd.AddCommand(newUpdateTagAssignment()) + + // Apply optional overrides to this command. + for _, fn := range cmdOverrides { + fn(cmd) + } + + return cmd +} + +// start create-tag-assignment command + +// Slice with functions to override default command behavior. +// Functions can be added from the `init()` function in manually curated files in this directory. +var createTagAssignmentOverrides []func( + *cobra.Command, + *tags.CreateTagAssignmentRequest, +) + +func newCreateTagAssignment() *cobra.Command { + cmd := &cobra.Command{} + + var createTagAssignmentReq tags.CreateTagAssignmentRequest + createTagAssignmentReq.TagAssignment = tags.TagAssignment{} + var createTagAssignmentJson flags.JsonFlag + + cmd.Flags().Var(&createTagAssignmentJson, "json", `either inline JSON string or @path/to/file.json with request body`) + + cmd.Flags().StringVar(&createTagAssignmentReq.TagAssignment.TagValue, "tag-value", createTagAssignmentReq.TagAssignment.TagValue, `The value of the tag.`) + + cmd.Use = "create-tag-assignment ENTITY_TYPE ENTITY_ID TAG_KEY" + cmd.Short = `Create a tag assignment for an entity.` + cmd.Long = `Create a tag assignment for an entity. + + Create a tag assignment + + Arguments: + ENTITY_TYPE: The type of entity to which the tag is assigned. Allowed values are + dashboards, geniespaces + ENTITY_ID: The identifier of the entity to which the tag is assigned + TAG_KEY: The key of the tag. The characters , . : / - = and leading/trailing spaces + are not allowed` + + cmd.Annotations = make(map[string]string) + + cmd.Args = func(cmd *cobra.Command, args []string) error { + if cmd.Flags().Changed("json") { + err := root.ExactArgs(0)(cmd, args) + if err != nil { + return fmt.Errorf("when --json flag is specified, no positional arguments are required. Provide 'entity_type', 'entity_id', 'tag_key' in your JSON input") + } + return nil + } + check := root.ExactArgs(3) + return check(cmd, args) + } + + cmd.PreRunE = root.MustWorkspaceClient + cmd.RunE = func(cmd *cobra.Command, args []string) (err error) { + ctx := cmd.Context() + w := cmdctx.WorkspaceClient(ctx) + + if cmd.Flags().Changed("json") { + diags := createTagAssignmentJson.Unmarshal(&createTagAssignmentReq.TagAssignment) + if diags.HasError() { + return diags.Error() + } + if len(diags) > 0 { + err := cmdio.RenderDiagnosticsToErrorOut(ctx, diags) + if err != nil { + return err + } + } + } + if !cmd.Flags().Changed("json") { + createTagAssignmentReq.TagAssignment.EntityType = args[0] + } + if !cmd.Flags().Changed("json") { + createTagAssignmentReq.TagAssignment.EntityId = args[1] + } + if !cmd.Flags().Changed("json") { + createTagAssignmentReq.TagAssignment.TagKey = args[2] + } + + response, err := w.WorkspaceEntityTagAssignments.CreateTagAssignment(ctx, createTagAssignmentReq) + if err != nil { + return err + } + return cmdio.Render(ctx, response) + } + + // Disable completions since they are not applicable. + // Can be overridden by manual implementation in `override.go`. + cmd.ValidArgsFunction = cobra.NoFileCompletions + + // Apply optional overrides to this command. + for _, fn := range createTagAssignmentOverrides { + fn(cmd, &createTagAssignmentReq) + } + + return cmd +} + +// start delete-tag-assignment command + +// Slice with functions to override default command behavior. +// Functions can be added from the `init()` function in manually curated files in this directory. +var deleteTagAssignmentOverrides []func( + *cobra.Command, + *tags.DeleteTagAssignmentRequest, +) + +func newDeleteTagAssignment() *cobra.Command { + cmd := &cobra.Command{} + + var deleteTagAssignmentReq tags.DeleteTagAssignmentRequest + + cmd.Use = "delete-tag-assignment ENTITY_TYPE ENTITY_ID TAG_KEY" + cmd.Short = `Delete a tag assignment for an entity.` + cmd.Long = `Delete a tag assignment for an entity. + + Delete a tag assignment + + Arguments: + ENTITY_TYPE: The type of entity to which the tag is assigned. Allowed values are + dashboards, geniespaces + ENTITY_ID: The identifier of the entity to which the tag is assigned + TAG_KEY: The key of the tag. The characters , . : / - = and leading/trailing spaces + are not allowed` + + cmd.Annotations = make(map[string]string) + + cmd.Args = func(cmd *cobra.Command, args []string) error { + check := root.ExactArgs(3) + return check(cmd, args) + } + + cmd.PreRunE = root.MustWorkspaceClient + cmd.RunE = func(cmd *cobra.Command, args []string) (err error) { + ctx := cmd.Context() + w := cmdctx.WorkspaceClient(ctx) + + deleteTagAssignmentReq.EntityType = args[0] + deleteTagAssignmentReq.EntityId = args[1] + deleteTagAssignmentReq.TagKey = args[2] + + err = w.WorkspaceEntityTagAssignments.DeleteTagAssignment(ctx, deleteTagAssignmentReq) + if err != nil { + return err + } + return nil + } + + // Disable completions since they are not applicable. + // Can be overridden by manual implementation in `override.go`. + cmd.ValidArgsFunction = cobra.NoFileCompletions + + // Apply optional overrides to this command. + for _, fn := range deleteTagAssignmentOverrides { + fn(cmd, &deleteTagAssignmentReq) + } + + return cmd +} + +// start get-tag-assignment command + +// Slice with functions to override default command behavior. +// Functions can be added from the `init()` function in manually curated files in this directory. +var getTagAssignmentOverrides []func( + *cobra.Command, + *tags.GetTagAssignmentRequest, +) + +func newGetTagAssignment() *cobra.Command { + cmd := &cobra.Command{} + + var getTagAssignmentReq tags.GetTagAssignmentRequest + + cmd.Use = "get-tag-assignment ENTITY_TYPE ENTITY_ID TAG_KEY" + cmd.Short = `Get a tag assignment for an entity.` + cmd.Long = `Get a tag assignment for an entity. + + Get a tag assignment + + Arguments: + ENTITY_TYPE: The type of entity to which the tag is assigned. Allowed values are + dashboards, geniespaces + ENTITY_ID: The identifier of the entity to which the tag is assigned + TAG_KEY: The key of the tag. The characters , . : / - = and leading/trailing spaces + are not allowed` + + cmd.Annotations = make(map[string]string) + + cmd.Args = func(cmd *cobra.Command, args []string) error { + check := root.ExactArgs(3) + return check(cmd, args) + } + + cmd.PreRunE = root.MustWorkspaceClient + cmd.RunE = func(cmd *cobra.Command, args []string) (err error) { + ctx := cmd.Context() + w := cmdctx.WorkspaceClient(ctx) + + getTagAssignmentReq.EntityType = args[0] + getTagAssignmentReq.EntityId = args[1] + getTagAssignmentReq.TagKey = args[2] + + response, err := w.WorkspaceEntityTagAssignments.GetTagAssignment(ctx, getTagAssignmentReq) + if err != nil { + return err + } + return cmdio.Render(ctx, response) + } + + // Disable completions since they are not applicable. + // Can be overridden by manual implementation in `override.go`. + cmd.ValidArgsFunction = cobra.NoFileCompletions + + // Apply optional overrides to this command. + for _, fn := range getTagAssignmentOverrides { + fn(cmd, &getTagAssignmentReq) + } + + return cmd +} + +// start list-tag-assignments command + +// Slice with functions to override default command behavior. +// Functions can be added from the `init()` function in manually curated files in this directory. +var listTagAssignmentsOverrides []func( + *cobra.Command, + *tags.ListTagAssignmentsRequest, +) + +func newListTagAssignments() *cobra.Command { + cmd := &cobra.Command{} + + var listTagAssignmentsReq tags.ListTagAssignmentsRequest + + cmd.Flags().IntVar(&listTagAssignmentsReq.PageSize, "page-size", listTagAssignmentsReq.PageSize, `Optional.`) + cmd.Flags().StringVar(&listTagAssignmentsReq.PageToken, "page-token", listTagAssignmentsReq.PageToken, `Pagination token to go to the next page of tag assignments.`) + + cmd.Use = "list-tag-assignments ENTITY_TYPE ENTITY_ID" + cmd.Short = `List tag assignments for an entity.` + cmd.Long = `List tag assignments for an entity. + + List the tag assignments for an entity + + Arguments: + ENTITY_TYPE: The type of entity to which the tag is assigned. Allowed values are + dashboards, geniespaces + ENTITY_ID: The identifier of the entity to which the tag is assigned` + + cmd.Annotations = make(map[string]string) + + cmd.Args = func(cmd *cobra.Command, args []string) error { + check := root.ExactArgs(2) + return check(cmd, args) + } + + cmd.PreRunE = root.MustWorkspaceClient + cmd.RunE = func(cmd *cobra.Command, args []string) (err error) { + ctx := cmd.Context() + w := cmdctx.WorkspaceClient(ctx) + + listTagAssignmentsReq.EntityType = args[0] + listTagAssignmentsReq.EntityId = args[1] + + response := w.WorkspaceEntityTagAssignments.ListTagAssignments(ctx, listTagAssignmentsReq) + return cmdio.RenderIterator(ctx, response) + } + + // Disable completions since they are not applicable. + // Can be overridden by manual implementation in `override.go`. + cmd.ValidArgsFunction = cobra.NoFileCompletions + + // Apply optional overrides to this command. + for _, fn := range listTagAssignmentsOverrides { + fn(cmd, &listTagAssignmentsReq) + } + + return cmd +} + +// start update-tag-assignment command + +// Slice with functions to override default command behavior. +// Functions can be added from the `init()` function in manually curated files in this directory. +var updateTagAssignmentOverrides []func( + *cobra.Command, + *tags.UpdateTagAssignmentRequest, +) + +func newUpdateTagAssignment() *cobra.Command { + cmd := &cobra.Command{} + + var updateTagAssignmentReq tags.UpdateTagAssignmentRequest + updateTagAssignmentReq.TagAssignment = tags.TagAssignment{} + var updateTagAssignmentJson flags.JsonFlag + + cmd.Flags().Var(&updateTagAssignmentJson, "json", `either inline JSON string or @path/to/file.json with request body`) + + cmd.Flags().StringVar(&updateTagAssignmentReq.TagAssignment.TagValue, "tag-value", updateTagAssignmentReq.TagAssignment.TagValue, `The value of the tag.`) + + cmd.Use = "update-tag-assignment ENTITY_TYPE ENTITY_ID TAG_KEY UPDATE_MASK" + cmd.Short = `Update a tag assignment for an entity.` + cmd.Long = `Update a tag assignment for an entity. + + Update a tag assignment + + Arguments: + ENTITY_TYPE: The type of entity to which the tag is assigned. Allowed values are + dashboards, geniespaces + ENTITY_ID: The identifier of the entity to which the tag is assigned + TAG_KEY: The key of the tag. The characters , . : / - = and leading/trailing spaces + are not allowed + UPDATE_MASK: The field mask must be a single string, with multiple fields separated by + commas (no spaces). The field path is relative to the resource object, + using a dot (.) to navigate sub-fields (e.g., author.given_name). + Specification of elements in sequence or map fields is not allowed, as + only the entire collection field can be specified. Field names must + exactly match the resource field names. + + A field mask of * indicates full replacement. It’s recommended to + always explicitly list the fields being updated and avoid using * + wildcards, as it can lead to unintended results if the API changes in the + future.` + + cmd.Annotations = make(map[string]string) + + cmd.Args = func(cmd *cobra.Command, args []string) error { + check := root.ExactArgs(4) + return check(cmd, args) + } + + cmd.PreRunE = root.MustWorkspaceClient + cmd.RunE = func(cmd *cobra.Command, args []string) (err error) { + ctx := cmd.Context() + w := cmdctx.WorkspaceClient(ctx) + + if cmd.Flags().Changed("json") { + diags := updateTagAssignmentJson.Unmarshal(&updateTagAssignmentReq.TagAssignment) + if diags.HasError() { + return diags.Error() + } + if len(diags) > 0 { + err := cmdio.RenderDiagnosticsToErrorOut(ctx, diags) + if err != nil { + return err + } + } + } + updateTagAssignmentReq.EntityType = args[0] + updateTagAssignmentReq.EntityId = args[1] + updateTagAssignmentReq.TagKey = args[2] + updateTagAssignmentReq.UpdateMask = args[3] + + response, err := w.WorkspaceEntityTagAssignments.UpdateTagAssignment(ctx, updateTagAssignmentReq) + if err != nil { + return err + } + return cmdio.Render(ctx, response) + } + + // Disable completions since they are not applicable. + // Can be overridden by manual implementation in `override.go`. + cmd.ValidArgsFunction = cobra.NoFileCompletions + + // Apply optional overrides to this command. + for _, fn := range updateTagAssignmentOverrides { + fn(cmd, &updateTagAssignmentReq) + } + + return cmd +} + +// end service WorkspaceEntityTagAssignments diff --git a/go.mod b/go.mod index c785b7d9fd..f84c4b2149 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/BurntSushi/toml v1.5.0 // MIT github.com/Masterminds/semver/v3 v3.4.0 // MIT github.com/briandowns/spinner v1.23.1 // Apache 2.0 - github.com/databricks/databricks-sdk-go v0.92.0 // Apache 2.0 + github.com/databricks/databricks-sdk-go v0.93.0 // Apache 2.0 github.com/fatih/color v1.18.0 // MIT github.com/google/uuid v1.6.0 // BSD-3-Clause github.com/gorilla/mux v1.8.1 // BSD 3-Clause diff --git a/go.sum b/go.sum index 4727b8947e..564ae3d942 100644 --- a/go.sum +++ b/go.sum @@ -29,8 +29,8 @@ github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZ github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s= github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= -github.com/databricks/databricks-sdk-go v0.92.0 h1:Pvm/LvEXetOYJPgQFeewhmtkKC4z79AK3PHC5tlC+VQ= -github.com/databricks/databricks-sdk-go v0.92.0/go.mod h1:hWoHnHbNLjPKiTm5K/7bcIv3J3Pkgo5x9pPzh8K3RVE= +github.com/databricks/databricks-sdk-go v0.93.0 h1:ov+n+pZBI8ZpKscZiPf9OxuwVVm9eftaZyoGENdO754= +github.com/databricks/databricks-sdk-go v0.93.0/go.mod h1:hWoHnHbNLjPKiTm5K/7bcIv3J3Pkgo5x9pPzh8K3RVE= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/python/databricks/bundles/jobs/_models/cluster_spec.py b/python/databricks/bundles/jobs/_models/cluster_spec.py index e2ecff716a..3d3ae44aa8 100644 --- a/python/databricks/bundles/jobs/_models/cluster_spec.py +++ b/python/databricks/bundles/jobs/_models/cluster_spec.py @@ -138,8 +138,7 @@ class ClusterSpec: enable_elastic_disk: VariableOrOptional[bool] = None """ Autoscaling Local Storage: when enabled, this cluster will dynamically acquire additional disk - space when its Spark workers are running low on disk space. This feature requires specific AWS - permissions to function correctly - refer to the User Guide for more details. + space when its Spark workers are running low on disk space. """ enable_local_disk_encryption: VariableOrOptional[bool] = None @@ -353,8 +352,7 @@ class ClusterSpecDict(TypedDict, total=False): enable_elastic_disk: VariableOrOptional[bool] """ Autoscaling Local Storage: when enabled, this cluster will dynamically acquire additional disk - space when its Spark workers are running low on disk space. This feature requires specific AWS - permissions to function correctly - refer to the User Guide for more details. + space when its Spark workers are running low on disk space. """ enable_local_disk_encryption: VariableOrOptional[bool] From f493d92af1eb394cb71c669c3461a772e149724e Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Mon, 8 Dec 2025 13:09:42 +0100 Subject: [PATCH 2/6] Mention upgrade in changelog --- NEXT_CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 7a4ec8a134..0323d0311d 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -10,6 +10,7 @@ ### Dependency updates +* Upgrade Go SDK to 0.93.0 ([#4112](https://github.com/databricks/cli/pull/4112)) * Bump Go toolchain to 1.25.5. ### API Changes From b131db2858308d903c7e7ca3aea665af3547039a Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Mon, 8 Dec 2025 13:13:58 +0100 Subject: [PATCH 3/6] Back out override --- bundle/internal/schema/annotations_openapi_overrides.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bundle/internal/schema/annotations_openapi_overrides.yml b/bundle/internal/schema/annotations_openapi_overrides.yml index 85435c5ce3..427c184570 100644 --- a/bundle/internal/schema/annotations_openapi_overrides.yml +++ b/bundle/internal/schema/annotations_openapi_overrides.yml @@ -645,10 +645,6 @@ github.com/databricks/cli/bundle/config/resources.SqlWarehousePermissionLevel: CAN_MONITOR - |- CAN_VIEW -github.com/databricks/cli/bundle/config/resources.SyncedDatabaseTable: - "lifecycle": - "description": |- - PLACEHOLDER github.com/databricks/cli/bundle/config/resources.Volume: "_": "markdown_description": |- From 49663645423739b8e67060b77e839c695682b21e Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Mon, 8 Dec 2025 14:01:27 +0100 Subject: [PATCH 4/6] Fix lint --- bundle/direct/dresources/dashboard.go | 22 ++++++++++++++++++- .../dresources/synced_database_table.go | 4 +++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/bundle/direct/dresources/dashboard.go b/bundle/direct/dresources/dashboard.go index 2780d5948f..fb171876ec 100644 --- a/bundle/direct/dresources/dashboard.go +++ b/bundle/direct/dresources/dashboard.go @@ -214,6 +214,12 @@ func (r *ResourceDashboard) DoCreate(ctx context.Context, config *resources.Dash createResp, err := r.client.Lakeview.Create(ctx, dashboards.CreateDashboardRequest{ Dashboard: dashboard, + + // Note: these remain unset until there is a TF release with support for these fields. + DatasetCatalog: "", + DatasetSchema: "", + + ForceSendFields: nil, }) // The API returns 404 if the parent directory doesn't exist. @@ -223,7 +229,15 @@ func (r *ResourceDashboard) DoCreate(ctx context.Context, config *resources.Dash if err != nil { return "", nil, fmt.Errorf("failed to create parent directory: %w", err) } - createResp, err = r.client.Lakeview.Create(ctx, dashboards.CreateDashboardRequest{Dashboard: dashboard}) + createResp, err = r.client.Lakeview.Create(ctx, dashboards.CreateDashboardRequest{ + Dashboard: dashboard, + + // Note: these remain unset until there is a TF release with support for these fields. + DatasetCatalog: "", + DatasetSchema: "", + + ForceSendFields: nil, + }) } if err != nil { return "", nil, err @@ -256,6 +270,12 @@ func (r *ResourceDashboard) DoUpdate(ctx context.Context, id string, config *res updateResp, err := r.client.Lakeview.Update(ctx, dashboards.UpdateDashboardRequest{ DashboardId: id, Dashboard: dashboard, + + // Note: these remain unset until there is a TF release with support for these fields. + DatasetCatalog: "", + DatasetSchema: "", + + ForceSendFields: nil, }) if err != nil { return nil, err diff --git a/bundle/direct/dresources/synced_database_table.go b/bundle/direct/dresources/synced_database_table.go index 5e97e5a5c3..3a88bab3af 100644 --- a/bundle/direct/dresources/synced_database_table.go +++ b/bundle/direct/dresources/synced_database_table.go @@ -47,6 +47,8 @@ func (r *ResourceSyncedDatabaseTable) DoUpdate(ctx context.Context, id string, c func (r *ResourceSyncedDatabaseTable) DoDelete(ctx context.Context, id string) error { return r.client.Database.DeleteSyncedDatabaseTable(ctx, database.DeleteSyncedDatabaseTableRequest{ - Name: id, + Name: id, + PurgeData: false, + ForceSendFields: nil, }) } From ce3cc3864d6d779430032ab242e211f7eab1e02d Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Mon, 8 Dec 2025 14:07:42 +0100 Subject: [PATCH 5/6] Update output --- acceptance/help/output.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/acceptance/help/output.txt b/acceptance/help/output.txt index ceb50dec6c..85f5bd83c0 100644 --- a/acceptance/help/output.txt +++ b/acceptance/help/output.txt @@ -147,6 +147,7 @@ Database Instances Tags tag-policies The Tag Policy API allows you to manage policies for governed tags in Databricks. + workspace-entity-tag-assignments Manage tag assignments on workspace-scoped objects. Developer Tools bundle Databricks Asset Bundles let you express data/AI/analytics projects as code. From 357f036c6a96f57505324d4955f2166b66457c68 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Mon, 8 Dec 2025 13:34:25 +0100 Subject: [PATCH 6/6] Bump Terraform provider to v1.99.0 ## Changes See https://github.com/databricks/terraform-provider-databricks/releases/tag/v1.99.0 ## Why Nominal upgrade to match the SDK version. --- .../migrate/runas/out.create_requests.json | 4 ++-- .../bundle/state/state_present/output.txt | 4 ++-- acceptance/bundle/user_agent/output.txt | 10 +++++----- .../simple/out.requests.deploy.terraform.json | 4 ++-- .../simple/out.requests.destroy.terraform.json | 4 ++-- .../simple/out.requests.plan2.terraform.json | 2 +- bundle/internal/tf/codegen/schema/version.go | 2 +- ...ta_source_workspace_entity_tag_assignment.go | 10 ++++++++++ ...a_source_workspace_entity_tag_assignments.go | 17 +++++++++++++++++ bundle/internal/tf/schema/data_sources.go | 4 ++++ .../resource_workspace_entity_tag_assignment.go | 10 ++++++++++ bundle/internal/tf/schema/resources.go | 2 ++ bundle/internal/tf/schema/root.go | 2 +- 13 files changed, 59 insertions(+), 16 deletions(-) create mode 100644 bundle/internal/tf/schema/data_source_workspace_entity_tag_assignment.go create mode 100644 bundle/internal/tf/schema/data_source_workspace_entity_tag_assignments.go create mode 100644 bundle/internal/tf/schema/resource_workspace_entity_tag_assignment.go diff --git a/acceptance/bundle/migrate/runas/out.create_requests.json b/acceptance/bundle/migrate/runas/out.create_requests.json index d527ee4025..e41c0d316f 100644 --- a/acceptance/bundle/migrate/runas/out.create_requests.json +++ b/acceptance/bundle/migrate/runas/out.create_requests.json @@ -1,7 +1,7 @@ { "headers": { "User-Agent": [ - "databricks-tf-provider/1.98.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/pipeline auth/pat" + "databricks-tf-provider/1.99.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/pipeline auth/pat" ] }, "method": "POST", @@ -32,7 +32,7 @@ { "headers": { "User-Agent": [ - "databricks-tf-provider/1.98.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/permissions auth/pat" + "databricks-tf-provider/1.99.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/permissions auth/pat" ] }, "method": "PUT", diff --git a/acceptance/bundle/state/state_present/output.txt b/acceptance/bundle/state/state_present/output.txt index ab36cef52c..7d7c424a4b 100644 --- a/acceptance/bundle/state/state_present/output.txt +++ b/acceptance/bundle/state/state_present/output.txt @@ -15,7 +15,7 @@ Updating deployment state... Deployment complete! >>> print_requests.py //api/2.1/unity-catalog/schemas -"databricks-tf-provider/1.98.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat" +"databricks-tf-provider/1.99.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat" >>> DATABRICKS_BUNDLE_ENGINE= [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... @@ -24,7 +24,7 @@ Updating deployment state... Deployment complete! >>> print_requests.py --get //api/2.1/unity-catalog/schemas -"databricks-tf-provider/1.98.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat" +"databricks-tf-provider/1.99.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat" === Adding resources.json with lower serial does not change anything >>> DATABRICKS_BUNDLE_ENGINE=direct musterr [CLI] bundle plan diff --git a/acceptance/bundle/user_agent/output.txt b/acceptance/bundle/user_agent/output.txt index 6a0dbde0af..4024585f54 100644 --- a/acceptance/bundle/user_agent/output.txt +++ b/acceptance/bundle/user_agent/output.txt @@ -35,8 +35,8 @@ OK deploy.terraform /api/2.0/workspace-files/import-file/Workspace/Users/[USER OK deploy.terraform /api/2.0/workspace/delete engine/terraform OK deploy.terraform /api/2.0/workspace/delete engine/terraform OK deploy.terraform /api/2.0/workspace/mkdirs engine/terraform -MISS deploy.terraform /api/2.1/unity-catalog/schemas/mycatalog.myschema 'databricks-tf-provider/1.98.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat' -MISS deploy.terraform /api/2.1/unity-catalog/schemas 'databricks-tf-provider/1.98.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat' +MISS deploy.terraform /api/2.1/unity-catalog/schemas/mycatalog.myschema 'databricks-tf-provider/1.99.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat' +MISS deploy.terraform /api/2.1/unity-catalog/schemas 'databricks-tf-provider/1.99.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat' MISS destroy.direct /api/2.0/preview/scim/v2/Me 'cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_destroy cmd-exec-id/[UUID] auth/pat' MISS destroy.direct /api/2.0/workspace-files/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/resources.json 'cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_destroy cmd-exec-id/[UUID] auth/pat' MISS destroy.direct /api/2.0/workspace/get-status 'cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_destroy cmd-exec-id/[UUID] auth/pat' @@ -59,8 +59,8 @@ OK destroy.terraform /api/2.0/workspace/get-status engine/terraform OK destroy.terraform /api/2.0/workspace/get-status engine/terraform OK destroy.terraform /api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deploy.lock engine/terraform OK destroy.terraform /api/2.0/workspace/delete engine/terraform -MISS destroy.terraform /api/2.1/unity-catalog/schemas/mycatalog.myschema 'databricks-tf-provider/1.98.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat' -MISS destroy.terraform /api/2.1/unity-catalog/schemas/mycatalog.myschema 'databricks-tf-provider/1.98.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat' +MISS destroy.terraform /api/2.1/unity-catalog/schemas/mycatalog.myschema 'databricks-tf-provider/1.99.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat' +MISS destroy.terraform /api/2.1/unity-catalog/schemas/mycatalog.myschema 'databricks-tf-provider/1.99.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat' MISS plan.direct /api/2.0/preview/scim/v2/Me 'cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_plan cmd-exec-id/[UUID] auth/pat' MISS plan.direct /api/2.0/workspace/get-status 'cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_plan cmd-exec-id/[UUID] auth/pat' MISS plan.direct /api/2.0/workspace/get-status 'cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_plan cmd-exec-id/[UUID] auth/pat' @@ -82,7 +82,7 @@ MISS plan2.terraform /api/2.0/workspace/get-status 'cli/[DEV_VERSION] databricks MISS plan2.terraform /api/2.0/workspace/get-status 'cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_plan cmd-exec-id/[UUID] auth/pat' OK plan2.terraform /api/2.0/workspace-files/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deployment.json engine/terraform OK plan2.terraform /api/2.0/workspace/get-status engine/terraform -MISS plan2.terraform /api/2.1/unity-catalog/schemas/mycatalog.myschema 'databricks-tf-provider/1.98.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat' +MISS plan2.terraform /api/2.1/unity-catalog/schemas/mycatalog.myschema 'databricks-tf-provider/1.99.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat' MISS run.direct /api/2.0/preview/scim/v2/Me 'cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_run cmd-exec-id/[UUID] auth/pat' MISS run.direct /api/2.0/workspace-files/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/resources.json 'cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_run cmd-exec-id/[UUID] auth/pat' MISS run.direct /api/2.0/workspace/get-status 'cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_run cmd-exec-id/[UUID] auth/pat' diff --git a/acceptance/bundle/user_agent/simple/out.requests.deploy.terraform.json b/acceptance/bundle/user_agent/simple/out.requests.deploy.terraform.json index 09a847cff5..2e1056836b 100644 --- a/acceptance/bundle/user_agent/simple/out.requests.deploy.terraform.json +++ b/acceptance/bundle/user_agent/simple/out.requests.deploy.terraform.json @@ -296,7 +296,7 @@ { "headers": { "User-Agent": [ - "databricks-tf-provider/1.98.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat" + "databricks-tf-provider/1.99.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat" ] }, "method": "GET", @@ -305,7 +305,7 @@ { "headers": { "User-Agent": [ - "databricks-tf-provider/1.98.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat" + "databricks-tf-provider/1.99.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat" ] }, "method": "POST", diff --git a/acceptance/bundle/user_agent/simple/out.requests.destroy.terraform.json b/acceptance/bundle/user_agent/simple/out.requests.destroy.terraform.json index 8d750bf807..360bf4d499 100644 --- a/acceptance/bundle/user_agent/simple/out.requests.destroy.terraform.json +++ b/acceptance/bundle/user_agent/simple/out.requests.destroy.terraform.json @@ -127,7 +127,7 @@ { "headers": { "User-Agent": [ - "databricks-tf-provider/1.98.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat" + "databricks-tf-provider/1.99.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat" ] }, "method": "DELETE", @@ -139,7 +139,7 @@ { "headers": { "User-Agent": [ - "databricks-tf-provider/1.98.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat" + "databricks-tf-provider/1.99.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat" ] }, "method": "GET", diff --git a/acceptance/bundle/user_agent/simple/out.requests.plan2.terraform.json b/acceptance/bundle/user_agent/simple/out.requests.plan2.terraform.json index e5a2773810..4ff3af86f1 100644 --- a/acceptance/bundle/user_agent/simple/out.requests.plan2.terraform.json +++ b/acceptance/bundle/user_agent/simple/out.requests.plan2.terraform.json @@ -67,7 +67,7 @@ { "headers": { "User-Agent": [ - "databricks-tf-provider/1.98.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat" + "databricks-tf-provider/1.99.0 databricks-sdk-go/[SDK_VERSION] go/1.24.0 os/[OS] cli/[DEV_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat" ] }, "method": "GET", diff --git a/bundle/internal/tf/codegen/schema/version.go b/bundle/internal/tf/codegen/schema/version.go index 6ec742aa5f..ae8c914836 100644 --- a/bundle/internal/tf/codegen/schema/version.go +++ b/bundle/internal/tf/codegen/schema/version.go @@ -1,3 +1,3 @@ package schema -const ProviderVersion = "1.98.0" +const ProviderVersion = "1.99.0" diff --git a/bundle/internal/tf/schema/data_source_workspace_entity_tag_assignment.go b/bundle/internal/tf/schema/data_source_workspace_entity_tag_assignment.go new file mode 100644 index 0000000000..6205f21739 --- /dev/null +++ b/bundle/internal/tf/schema/data_source_workspace_entity_tag_assignment.go @@ -0,0 +1,10 @@ +// Generated from Databricks Terraform provider schema. DO NOT EDIT. + +package schema + +type DataSourceWorkspaceEntityTagAssignment struct { + EntityId string `json:"entity_id"` + EntityType string `json:"entity_type"` + TagKey string `json:"tag_key"` + TagValue string `json:"tag_value,omitempty"` +} diff --git a/bundle/internal/tf/schema/data_source_workspace_entity_tag_assignments.go b/bundle/internal/tf/schema/data_source_workspace_entity_tag_assignments.go new file mode 100644 index 0000000000..e55e281049 --- /dev/null +++ b/bundle/internal/tf/schema/data_source_workspace_entity_tag_assignments.go @@ -0,0 +1,17 @@ +// Generated from Databricks Terraform provider schema. DO NOT EDIT. + +package schema + +type DataSourceWorkspaceEntityTagAssignmentsTagAssignments struct { + EntityId string `json:"entity_id"` + EntityType string `json:"entity_type"` + TagKey string `json:"tag_key"` + TagValue string `json:"tag_value,omitempty"` +} + +type DataSourceWorkspaceEntityTagAssignments struct { + EntityId string `json:"entity_id"` + EntityType string `json:"entity_type"` + PageSize int `json:"page_size,omitempty"` + TagAssignments []DataSourceWorkspaceEntityTagAssignmentsTagAssignments `json:"tag_assignments,omitempty"` +} diff --git a/bundle/internal/tf/schema/data_sources.go b/bundle/internal/tf/schema/data_sources.go index c1d70447c9..f31bb54492 100644 --- a/bundle/internal/tf/schema/data_sources.go +++ b/bundle/internal/tf/schema/data_sources.go @@ -109,6 +109,8 @@ type DataSources struct { Views map[string]any `json:"databricks_views,omitempty"` Volume map[string]any `json:"databricks_volume,omitempty"` Volumes map[string]any `json:"databricks_volumes,omitempty"` + WorkspaceEntityTagAssignment map[string]any `json:"databricks_workspace_entity_tag_assignment,omitempty"` + WorkspaceEntityTagAssignments map[string]any `json:"databricks_workspace_entity_tag_assignments,omitempty"` WorkspaceNetworkOption map[string]any `json:"databricks_workspace_network_option,omitempty"` WorkspaceSettingV2 map[string]any `json:"databricks_workspace_setting_v2,omitempty"` Zones map[string]any `json:"databricks_zones,omitempty"` @@ -222,6 +224,8 @@ func NewDataSources() *DataSources { Views: make(map[string]any), Volume: make(map[string]any), Volumes: make(map[string]any), + WorkspaceEntityTagAssignment: make(map[string]any), + WorkspaceEntityTagAssignments: make(map[string]any), WorkspaceNetworkOption: make(map[string]any), WorkspaceSettingV2: make(map[string]any), Zones: make(map[string]any), diff --git a/bundle/internal/tf/schema/resource_workspace_entity_tag_assignment.go b/bundle/internal/tf/schema/resource_workspace_entity_tag_assignment.go new file mode 100644 index 0000000000..f909ba8ace --- /dev/null +++ b/bundle/internal/tf/schema/resource_workspace_entity_tag_assignment.go @@ -0,0 +1,10 @@ +// Generated from Databricks Terraform provider schema. DO NOT EDIT. + +package schema + +type ResourceWorkspaceEntityTagAssignment struct { + EntityId string `json:"entity_id"` + EntityType string `json:"entity_type"` + TagKey string `json:"tag_key"` + TagValue string `json:"tag_value,omitempty"` +} diff --git a/bundle/internal/tf/schema/resources.go b/bundle/internal/tf/schema/resources.go index a80d094451..c564428274 100644 --- a/bundle/internal/tf/schema/resources.go +++ b/bundle/internal/tf/schema/resources.go @@ -135,6 +135,7 @@ type Resources struct { Volume map[string]any `json:"databricks_volume,omitempty"` WorkspaceBinding map[string]any `json:"databricks_workspace_binding,omitempty"` WorkspaceConf map[string]any `json:"databricks_workspace_conf,omitempty"` + WorkspaceEntityTagAssignment map[string]any `json:"databricks_workspace_entity_tag_assignment,omitempty"` WorkspaceFile map[string]any `json:"databricks_workspace_file,omitempty"` WorkspaceNetworkOption map[string]any `json:"databricks_workspace_network_option,omitempty"` WorkspaceSettingV2 map[string]any `json:"databricks_workspace_setting_v2,omitempty"` @@ -274,6 +275,7 @@ func NewResources() *Resources { Volume: make(map[string]any), WorkspaceBinding: make(map[string]any), WorkspaceConf: make(map[string]any), + WorkspaceEntityTagAssignment: make(map[string]any), WorkspaceFile: make(map[string]any), WorkspaceNetworkOption: make(map[string]any), WorkspaceSettingV2: make(map[string]any), diff --git a/bundle/internal/tf/schema/root.go b/bundle/internal/tf/schema/root.go index 73bb6e06db..d3009bbfb2 100644 --- a/bundle/internal/tf/schema/root.go +++ b/bundle/internal/tf/schema/root.go @@ -21,7 +21,7 @@ type Root struct { const ProviderHost = "registry.terraform.io" const ProviderSource = "databricks/databricks" -const ProviderVersion = "1.98.0" +const ProviderVersion = "1.99.0" func NewRoot() *Root { return &Root{