1. Packages
  2. Packages
  3. Databricks Provider
  4. API Docs
  5. Metastore
Viewing docs for Databricks v0.4.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
databricks logo
Viewing docs for Databricks v0.4.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Private Preview This feature is in Private Preview. Contact your Databricks representative to request access.

    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

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Metastore(name: string, args: MetastoreArgs, opts?: CustomResourceOptions);
    @overload
    def Metastore(resource_name: str,
                  args: MetastoreArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def Metastore(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  storage_root: Optional[str] = None,
                  default_data_access_config_id: Optional[str] = None,
                  force_destroy: Optional[bool] = None,
                  name: Optional[str] = None,
                  owner: Optional[str] = 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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var metastoreResource = new Databricks.Metastore("metastoreResource", new()
    {
        StorageRoot = "string",
        DefaultDataAccessConfigId = "string",
        ForceDestroy = false,
        Name = "string",
        Owner = "string",
    });
    
    example, err := databricks.NewMetastore(ctx, "metastoreResource", &databricks.MetastoreArgs{
    	StorageRoot:               pulumi.String("string"),
    	DefaultDataAccessConfigId: pulumi.String("string"),
    	ForceDestroy:              pulumi.Bool(false),
    	Name:                      pulumi.String("string"),
    	Owner:                     pulumi.String("string"),
    })
    
    var metastoreResource = new Metastore("metastoreResource", MetastoreArgs.builder()
        .storageRoot("string")
        .defaultDataAccessConfigId("string")
        .forceDestroy(false)
        .name("string")
        .owner("string")
        .build());
    
    metastore_resource = databricks.Metastore("metastoreResource",
        storage_root="string",
        default_data_access_config_id="string",
        force_destroy=False,
        name="string",
        owner="string")
    
    const metastoreResource = new databricks.Metastore("metastoreResource", {
        storageRoot: "string",
        defaultDataAccessConfigId: "string",
        forceDestroy: false,
        name: "string",
        owner: "string",
    });
    
    type: databricks:Metastore
    properties:
        defaultDataAccessConfigId: string
        forceDestroy: false
        name: string
        owner: string
        storageRoot: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    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.
    DefaultDataAccessConfigId string
    ForceDestroy bool
    Destroy metastore regardless of its contents.
    Name string
    Name of metastore.
    Owner string
    Username/groupname of Metastore owner.
    StorageRoot string
    Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.
    DefaultDataAccessConfigId string
    ForceDestroy bool
    Destroy metastore regardless of its contents.
    Name string
    Name of metastore.
    Owner string
    Username/groupname of Metastore owner.
    storageRoot String
    Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.
    defaultDataAccessConfigId String
    forceDestroy Boolean
    Destroy metastore regardless of its contents.
    name String
    Name of metastore.
    owner String
    Username/groupname of Metastore owner.
    storageRoot string
    Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.
    defaultDataAccessConfigId string
    forceDestroy boolean
    Destroy metastore regardless of its contents.
    name string
    Name of metastore.
    owner string
    Username/groupname of Metastore owner.
    storage_root str
    Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.
    default_data_access_config_id str
    force_destroy bool
    Destroy metastore regardless of its contents.
    name str
    Name of metastore.
    owner str
    Username/groupname of Metastore owner.
    storageRoot String
    Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.
    defaultDataAccessConfigId String
    forceDestroy Boolean
    Destroy metastore regardless of its contents.
    name String
    Name of metastore.
    owner String
    Username/groupname of Metastore owner.

    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,
            default_data_access_config_id: Optional[str] = None,
            force_destroy: Optional[bool] = None,
            name: Optional[str] = None,
            owner: Optional[str] = None,
            storage_root: 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)
    resources:  _:    type: databricks:Metastore    get:      id: ${id}
    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:
    DefaultDataAccessConfigId string
    ForceDestroy bool
    Destroy metastore regardless of its contents.
    Name string
    Name of metastore.
    Owner string
    Username/groupname of Metastore owner.
    StorageRoot string
    Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.
    DefaultDataAccessConfigId string
    ForceDestroy bool
    Destroy metastore regardless of its contents.
    Name string
    Name of metastore.
    Owner string
    Username/groupname of Metastore owner.
    StorageRoot string
    Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.
    defaultDataAccessConfigId String
    forceDestroy Boolean
    Destroy metastore regardless of its contents.
    name String
    Name of metastore.
    owner String
    Username/groupname of Metastore owner.
    storageRoot String
    Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.
    defaultDataAccessConfigId string
    forceDestroy boolean
    Destroy metastore regardless of its contents.
    name string
    Name of metastore.
    owner string
    Username/groupname of Metastore owner.
    storageRoot string
    Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.
    default_data_access_config_id str
    force_destroy bool
    Destroy metastore regardless of its contents.
    name str
    Name of metastore.
    owner str
    Username/groupname of Metastore owner.
    storage_root str
    Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.
    defaultDataAccessConfigId String
    forceDestroy Boolean
    Destroy metastore regardless of its contents.
    name String
    Name of metastore.
    owner String
    Username/groupname of Metastore owner.
    storageRoot String
    Path on cloud storage account, where managed databricks.Table are stored. Change forces creation of a new resource.

    Import

    This resource can be imported by IDbash

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

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo
    Viewing docs for Databricks v0.4.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.