From d67484203ddda5c38814b4f14bcc139e254530d8 Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Thu, 2 May 2024 14:26:30 +0200 Subject: [PATCH] wip --- bundle/config/resources.go | 1 + bundle/config/resources/schema.go | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 bundle/config/resources/schema.go diff --git a/bundle/config/resources.go b/bundle/config/resources.go index 457360a0..f79a9714 100644 --- a/bundle/config/resources.go +++ b/bundle/config/resources.go @@ -17,6 +17,7 @@ type Resources struct { Experiments map[string]*resources.MlflowExperiment `json:"experiments,omitempty"` ModelServingEndpoints map[string]*resources.ModelServingEndpoint `json:"model_serving_endpoints,omitempty"` RegisteredModels map[string]*resources.RegisteredModel `json:"registered_models,omitempty"` + Schemas map[string]*resources.Schema `json:"schemas,omitempty"` } type UniqueResourceIdTracker struct { diff --git a/bundle/config/resources/schema.go b/bundle/config/resources/schema.go new file mode 100644 index 00000000..d8f50a59 --- /dev/null +++ b/bundle/config/resources/schema.go @@ -0,0 +1,25 @@ +package resources + +import ( + "github.com/databricks/cli/bundle/config/paths" + "github.com/databricks/databricks-sdk-go/service/catalog" +) + +type Schema struct { + // List of grants to apply on this schema. + Grants []Grant `json:"grants,omitempty"` + + // This represents the id which is the full name of the schema + // (catalog_name.schema_name) that can be used + // as a reference in other resources. This value is returned by terraform. + // TODO: verify the accuracy of this comment + ID string `json:"id,omitempty" bundle:"readonly"` + + // Path to config file where the resource is defined. All bundle resources + // include this for interpolation purposes. + paths.Paths + + *catalog.CreateSchema + + ModifiedStatus ModifiedStatus `json:"modified_status,omitempty" bundle:"internal"` +}