databricks logo
Databricks v1.14.0, May 23 23

databricks.Metastore

Explore with Pulumi AI

Notes Unity Catalog APIs are accessible via workspace-level APIs. This design may change in the future.

A metastore is the top-level container of objects in Unity Catalog. It stores data assets (tables and views) and the permissions that govern access to them. Databricks account admins can create metastores and assign them to Databricks workspaces in order to control which workloads use each metastore.

Unity Catalog offers a new metastore with built in security and auditing. This is distinct to the metastore used in previous versions of Databricks (based on the Hive Metastore).

Create Metastore Resource

new Metastore(name: string, args: MetastoreArgs, opts?: CustomResourceOptions);
@overload
def Metastore(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              cloud: Optional[str] = None,
              created_at: Optional[int] = None,
              created_by: Optional[str] = None,
              default_data_access_config_id: Optional[str] = None,
              delta_sharing_organization_name: Optional[str] = None,
              delta_sharing_recipient_token_lifetime_in_seconds: Optional[int] = None,
              delta_sharing_scope: Optional[str] = None,
              force_destroy: Optional[bool] = None,
              global_metastore_id: Optional[str] = None,
              name: Optional[str] = None,
              owner: Optional[str] = None,
              region: Optional[str] = None,
              storage_root: Optional[str] = None,
              updated_at: Optional[int] = None,
              updated_by: Optional[str] = None)
@overload
def Metastore(resource_name: str,
              args: MetastoreArgs,
              opts: Optional[ResourceOptions] = None)
func NewMetastore(ctx *Context, name string, args MetastoreArgs, opts ...ResourceOption) (*Metastore, error)
public Metastore(string name, MetastoreArgs args, CustomResourceOptions? opts = null)
public Metastore(String name, MetastoreArgs args)
public Metastore(String name, MetastoreArgs args, CustomResourceOptions options)
type: databricks:Metastore
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args MetastoreArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args MetastoreArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args MetastoreArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args MetastoreArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args MetastoreArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Metastore Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Metastore resource accepts the following input properties:

StorageRoot string

Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.

Cloud string
CreatedAt int
CreatedBy string
DefaultDataAccessConfigId string
DeltaSharingOrganizationName string

The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing. Once this is set it cannot be removed and can only be modified to another valid value. To delete this value please taint and recreate the resource.

DeltaSharingRecipientTokenLifetimeInSeconds int

Required along with delta_sharing_scope. Used to set expiration duration in seconds on recipient data access tokens. Set to 0 for unlimited duration.

DeltaSharingScope string

Required along with delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL.

ForceDestroy bool

Destroy metastore regardless of its contents.

GlobalMetastoreId string
Name string

Name of metastore.

Owner string

Username/groupname/sp application_id of the metastore owner.

Region string
UpdatedAt int
UpdatedBy string
StorageRoot string

Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.

Cloud string
CreatedAt int
CreatedBy string
DefaultDataAccessConfigId string
DeltaSharingOrganizationName string

The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing. Once this is set it cannot be removed and can only be modified to another valid value. To delete this value please taint and recreate the resource.

DeltaSharingRecipientTokenLifetimeInSeconds int

Required along with delta_sharing_scope. Used to set expiration duration in seconds on recipient data access tokens. Set to 0 for unlimited duration.

DeltaSharingScope string

Required along with delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL.

ForceDestroy bool

Destroy metastore regardless of its contents.

GlobalMetastoreId string
Name string

Name of metastore.

Owner string

Username/groupname/sp application_id of the metastore owner.

Region string
UpdatedAt int
UpdatedBy string
storageRoot String

Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.

cloud String
createdAt Integer
createdBy String
defaultDataAccessConfigId String
deltaSharingOrganizationName String

The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing. Once this is set it cannot be removed and can only be modified to another valid value. To delete this value please taint and recreate the resource.

deltaSharingRecipientTokenLifetimeInSeconds Integer

Required along with delta_sharing_scope. Used to set expiration duration in seconds on recipient data access tokens. Set to 0 for unlimited duration.

deltaSharingScope String

Required along with delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL.

forceDestroy Boolean

Destroy metastore regardless of its contents.

globalMetastoreId String
name String

Name of metastore.

owner String

Username/groupname/sp application_id of the metastore owner.

region String
updatedAt Integer
updatedBy String
storageRoot string

Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.

cloud string
createdAt number
createdBy string
defaultDataAccessConfigId string
deltaSharingOrganizationName string

The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing. Once this is set it cannot be removed and can only be modified to another valid value. To delete this value please taint and recreate the resource.

deltaSharingRecipientTokenLifetimeInSeconds number

Required along with delta_sharing_scope. Used to set expiration duration in seconds on recipient data access tokens. Set to 0 for unlimited duration.

deltaSharingScope string

Required along with delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL.

forceDestroy boolean

Destroy metastore regardless of its contents.

globalMetastoreId string
name string

Name of metastore.

owner string

Username/groupname/sp application_id of the metastore owner.

region string
updatedAt number
updatedBy string
storage_root str

Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.

cloud str
created_at int
created_by str
default_data_access_config_id str
delta_sharing_organization_name str

The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing. Once this is set it cannot be removed and can only be modified to another valid value. To delete this value please taint and recreate the resource.

delta_sharing_recipient_token_lifetime_in_seconds int

Required along with delta_sharing_scope. Used to set expiration duration in seconds on recipient data access tokens. Set to 0 for unlimited duration.

delta_sharing_scope str

Required along with delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL.

force_destroy bool

Destroy metastore regardless of its contents.

global_metastore_id str
name str

Name of metastore.

owner str

Username/groupname/sp application_id of the metastore owner.

region str
updated_at int
updated_by str
storageRoot String

Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.

cloud String
createdAt Number
createdBy String
defaultDataAccessConfigId String
deltaSharingOrganizationName String

The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing. Once this is set it cannot be removed and can only be modified to another valid value. To delete this value please taint and recreate the resource.

deltaSharingRecipientTokenLifetimeInSeconds Number

Required along with delta_sharing_scope. Used to set expiration duration in seconds on recipient data access tokens. Set to 0 for unlimited duration.

deltaSharingScope String

Required along with delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL.

forceDestroy Boolean

Destroy metastore regardless of its contents.

globalMetastoreId String
name String

Name of metastore.

owner String

Username/groupname/sp application_id of the metastore owner.

region String
updatedAt Number
updatedBy String

Outputs

All input properties are implicitly available as output properties. Additionally, the Metastore resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing Metastore Resource

Get an existing Metastore resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: MetastoreState, opts?: CustomResourceOptions): Metastore
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cloud: Optional[str] = None,
        created_at: Optional[int] = None,
        created_by: Optional[str] = None,
        default_data_access_config_id: Optional[str] = None,
        delta_sharing_organization_name: Optional[str] = None,
        delta_sharing_recipient_token_lifetime_in_seconds: Optional[int] = None,
        delta_sharing_scope: Optional[str] = None,
        force_destroy: Optional[bool] = None,
        global_metastore_id: Optional[str] = None,
        name: Optional[str] = None,
        owner: Optional[str] = None,
        region: Optional[str] = None,
        storage_root: Optional[str] = None,
        updated_at: Optional[int] = None,
        updated_by: Optional[str] = None) -> Metastore
func GetMetastore(ctx *Context, name string, id IDInput, state *MetastoreState, opts ...ResourceOption) (*Metastore, error)
public static Metastore Get(string name, Input<string> id, MetastoreState? state, CustomResourceOptions? opts = null)
public static Metastore get(String name, Output<String> id, MetastoreState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Cloud string
CreatedAt int
CreatedBy string
DefaultDataAccessConfigId string
DeltaSharingOrganizationName string

The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing. Once this is set it cannot be removed and can only be modified to another valid value. To delete this value please taint and recreate the resource.

DeltaSharingRecipientTokenLifetimeInSeconds int

Required along with delta_sharing_scope. Used to set expiration duration in seconds on recipient data access tokens. Set to 0 for unlimited duration.

DeltaSharingScope string

Required along with delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL.

ForceDestroy bool

Destroy metastore regardless of its contents.

GlobalMetastoreId string
Name string

Name of metastore.

Owner string

Username/groupname/sp application_id of the metastore owner.

Region string
StorageRoot string

Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.

UpdatedAt int
UpdatedBy string
Cloud string
CreatedAt int
CreatedBy string
DefaultDataAccessConfigId string
DeltaSharingOrganizationName string

The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing. Once this is set it cannot be removed and can only be modified to another valid value. To delete this value please taint and recreate the resource.

DeltaSharingRecipientTokenLifetimeInSeconds int

Required along with delta_sharing_scope. Used to set expiration duration in seconds on recipient data access tokens. Set to 0 for unlimited duration.

DeltaSharingScope string

Required along with delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL.

ForceDestroy bool

Destroy metastore regardless of its contents.

GlobalMetastoreId string
Name string

Name of metastore.

Owner string

Username/groupname/sp application_id of the metastore owner.

Region string
StorageRoot string

Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.

UpdatedAt int
UpdatedBy string
cloud String
createdAt Integer
createdBy String
defaultDataAccessConfigId String
deltaSharingOrganizationName String

The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing. Once this is set it cannot be removed and can only be modified to another valid value. To delete this value please taint and recreate the resource.

deltaSharingRecipientTokenLifetimeInSeconds Integer

Required along with delta_sharing_scope. Used to set expiration duration in seconds on recipient data access tokens. Set to 0 for unlimited duration.

deltaSharingScope String

Required along with delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL.

forceDestroy Boolean

Destroy metastore regardless of its contents.

globalMetastoreId String
name String

Name of metastore.

owner String

Username/groupname/sp application_id of the metastore owner.

region String
storageRoot String

Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.

updatedAt Integer
updatedBy String
cloud string
createdAt number
createdBy string
defaultDataAccessConfigId string
deltaSharingOrganizationName string

The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing. Once this is set it cannot be removed and can only be modified to another valid value. To delete this value please taint and recreate the resource.

deltaSharingRecipientTokenLifetimeInSeconds number

Required along with delta_sharing_scope. Used to set expiration duration in seconds on recipient data access tokens. Set to 0 for unlimited duration.

deltaSharingScope string

Required along with delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL.

forceDestroy boolean

Destroy metastore regardless of its contents.

globalMetastoreId string
name string

Name of metastore.

owner string

Username/groupname/sp application_id of the metastore owner.

region string
storageRoot string

Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.

updatedAt number
updatedBy string
cloud str
created_at int
created_by str
default_data_access_config_id str
delta_sharing_organization_name str

The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing. Once this is set it cannot be removed and can only be modified to another valid value. To delete this value please taint and recreate the resource.

delta_sharing_recipient_token_lifetime_in_seconds int

Required along with delta_sharing_scope. Used to set expiration duration in seconds on recipient data access tokens. Set to 0 for unlimited duration.

delta_sharing_scope str

Required along with delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL.

force_destroy bool

Destroy metastore regardless of its contents.

global_metastore_id str
name str

Name of metastore.

owner str

Username/groupname/sp application_id of the metastore owner.

region str
storage_root str

Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.

updated_at int
updated_by str
cloud String
createdAt Number
createdBy String
defaultDataAccessConfigId String
deltaSharingOrganizationName String

The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing. Once this is set it cannot be removed and can only be modified to another valid value. To delete this value please taint and recreate the resource.

deltaSharingRecipientTokenLifetimeInSeconds Number

Required along with delta_sharing_scope. Used to set expiration duration in seconds on recipient data access tokens. Set to 0 for unlimited duration.

deltaSharingScope String

Required along with delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL.

forceDestroy Boolean

Destroy metastore regardless of its contents.

globalMetastoreId String
name String

Name of metastore.

owner String

Username/groupname/sp application_id of the metastore owner.

region String
storageRoot String

Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.

updatedAt Number
updatedBy String

Import

This resource can be imported by IDbash

 $ pulumi import databricks:index/metastore:Metastore this <id>

Package Details

Repository
databricks pulumi/pulumi-databricks
License
Apache-2.0
Notes

This Pulumi package is based on the databricks Terraform Provider.