terraform-provider-databricks icon indicating copy to clipboard operation
terraform-provider-databricks copied to clipboard

[FEATURE] Allow create Share and add schema to share as a separate resources

Open venkad-intc opened this issue 6 months ago • 0 comments
trafficstars

Use-cases

In the existing scenario, we need to add the schemas to the shares at the same time that the shares are created. This leads to a centralized share resource. I may have share created once and create/add schemas from multiple modules from the same or different terraform runs.

It also needs to have an ordered schema in the share as documented here.

In Terraform configuration, it is recommended to define objects in alphabetical order of their name arguments, so that you get consistent and readable diff. Whenever objects are added or removed, or name is renamed, you'll observe a change in the majority of tasks. It's related to the fact that the current version of the provider treats object blocks as an ordered list. Alternatively, object block could have been an unordered set, though end-users would see the entire block replaced upon a change in single property of the task.

Proposal

Similar to SQL queries have two different statements for creating the share and adding the schema to the share, terraform should also allow us manage it with different resources.

References

https://learn.microsoft.com/en-us/azure/databricks/sql/language-manual/sql-ref-sharing

venkad-intc avatar May 02 '25 07:05 venkad-intc