This resource can be used with an account or workspace-level provider.
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).
A Unity Catalog metastore can be created without a root location & credential to maintain strict separation of storage across catalogs or environments.
Example Usage
For AWS
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const _this = new databricks.Metastore("this", {
name: "primary",
storageRoot: `s3://${metastore.id}/metastore`,
owner: "uc admins",
region: "us-east-1",
forceDestroy: true,
});
const thisMetastoreAssignment = new databricks.MetastoreAssignment("this", {
metastoreId: _this.id,
workspaceId: workspaceId,
});
import pulumi
import pulumi_databricks as databricks
this = databricks.Metastore("this",
name="primary",
storage_root=f"s3://{metastore['id']}/metastore",
owner="uc admins",
region="us-east-1",
force_destroy=True)
this_metastore_assignment = databricks.MetastoreAssignment("this",
metastore_id=this.id,
workspace_id=workspace_id)
package main
import (
"fmt"
"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
this, err := databricks.NewMetastore(ctx, "this", &databricks.MetastoreArgs{
Name: pulumi.String("primary"),
StorageRoot: pulumi.Sprintf("s3://%v/metastore", metastore.Id),
Owner: pulumi.String("uc admins"),
Region: pulumi.String("us-east-1"),
ForceDestroy: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = databricks.NewMetastoreAssignment(ctx, "this", &databricks.MetastoreAssignmentArgs{
MetastoreId: this.ID(),
WorkspaceId: pulumi.Any(workspaceId),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var @this = new Databricks.Metastore("this", new()
{
Name = "primary",
StorageRoot = $"s3://{metastore.Id}/metastore",
Owner = "uc admins",
Region = "us-east-1",
ForceDestroy = true,
});
var thisMetastoreAssignment = new Databricks.MetastoreAssignment("this", new()
{
MetastoreId = @this.Id,
WorkspaceId = workspaceId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.Metastore;
import com.pulumi.databricks.MetastoreArgs;
import com.pulumi.databricks.MetastoreAssignment;
import com.pulumi.databricks.MetastoreAssignmentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var this_ = new Metastore("this", MetastoreArgs.builder()
.name("primary")
.storageRoot(String.format("s3://%s/metastore", metastore.id()))
.owner("uc admins")
.region("us-east-1")
.forceDestroy(true)
.build());
var thisMetastoreAssignment = new MetastoreAssignment("thisMetastoreAssignment", MetastoreAssignmentArgs.builder()
.metastoreId(this_.id())
.workspaceId(workspaceId)
.build());
}
}
resources:
this:
type: databricks:Metastore
properties:
name: primary
storageRoot: s3://${metastore.id}/metastore
owner: uc admins
region: us-east-1
forceDestroy: true
thisMetastoreAssignment:
type: databricks:MetastoreAssignment
name: this
properties:
metastoreId: ${this.id}
workspaceId: ${workspaceId}
For Azure
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
import * as std from "@pulumi/std";
const _this = new databricks.Metastore("this", {
name: "primary",
storageRoot: std.format({
input: "abfss://%s@%s.dfs.core.windows.net/",
args: [
unityCatalog.name,
unityCatalogAzurermStorageAccount.name,
],
}).then(invoke => invoke.result),
owner: "uc admins",
region: "eastus",
forceDestroy: true,
});
const thisMetastoreAssignment = new databricks.MetastoreAssignment("this", {
metastoreId: _this.id,
workspaceId: workspaceId,
});
import pulumi
import pulumi_databricks as databricks
import pulumi_std as std
this = databricks.Metastore("this",
name="primary",
storage_root=std.format(input="abfss://%s@%s.dfs.core.windows.net/",
args=[
unity_catalog["name"],
unity_catalog_azurerm_storage_account["name"],
]).result,
owner="uc admins",
region="eastus",
force_destroy=True)
this_metastore_assignment = databricks.MetastoreAssignment("this",
metastore_id=this.id,
workspace_id=workspace_id)
package main
import (
"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
"github.com/pulumi/pulumi-std/sdk/go/std"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
invokeFormat, err := std.Format(ctx, &std.FormatArgs{
Input: "abfss://%s@%s.dfs.core.windows.net/",
Args: []interface{}{
unityCatalog.Name,
unityCatalogAzurermStorageAccount.Name,
},
}, nil)
if err != nil {
return err
}
this, err := databricks.NewMetastore(ctx, "this", &databricks.MetastoreArgs{
Name: pulumi.String("primary"),
StorageRoot: pulumi.String(invokeFormat.Result),
Owner: pulumi.String("uc admins"),
Region: pulumi.String("eastus"),
ForceDestroy: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = databricks.NewMetastoreAssignment(ctx, "this", &databricks.MetastoreAssignmentArgs{
MetastoreId: this.ID(),
WorkspaceId: pulumi.Any(workspaceId),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var @this = new Databricks.Metastore("this", new()
{
Name = "primary",
StorageRoot = Std.Format.Invoke(new()
{
Input = "abfss://%s@%s.dfs.core.windows.net/",
Args = new[]
{
unityCatalog.Name,
unityCatalogAzurermStorageAccount.Name,
},
}).Apply(invoke => invoke.Result),
Owner = "uc admins",
Region = "eastus",
ForceDestroy = true,
});
var thisMetastoreAssignment = new Databricks.MetastoreAssignment("this", new()
{
MetastoreId = @this.Id,
WorkspaceId = workspaceId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.Metastore;
import com.pulumi.databricks.MetastoreArgs;
import com.pulumi.std.StdFunctions;
import com.pulumi.std.inputs.FormatArgs;
import com.pulumi.databricks.MetastoreAssignment;
import com.pulumi.databricks.MetastoreAssignmentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var this_ = new Metastore("this", MetastoreArgs.builder()
.name("primary")
.storageRoot(StdFunctions.format(FormatArgs.builder()
.input("abfss://%s@%s.dfs.core.windows.net/")
.args(
unityCatalog.name(),
unityCatalogAzurermStorageAccount.name())
.build()).result())
.owner("uc admins")
.region("eastus")
.forceDestroy(true)
.build());
var thisMetastoreAssignment = new MetastoreAssignment("thisMetastoreAssignment", MetastoreAssignmentArgs.builder()
.metastoreId(this_.id())
.workspaceId(workspaceId)
.build());
}
}
resources:
this:
type: databricks:Metastore
properties:
name: primary
storageRoot:
fn::invoke:
function: std:format
arguments:
input: abfss://%s@%s.dfs.core.windows.net/
args:
- ${unityCatalog.name}
- ${unityCatalogAzurermStorageAccount.name}
return: result
owner: uc admins
region: eastus
forceDestroy: true
thisMetastoreAssignment:
type: databricks:MetastoreAssignment
name: this
properties:
metastoreId: ${this.id}
workspaceId: ${workspaceId}
For GCP
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const _this = new databricks.Metastore("this", {
name: "primary",
storageRoot: `gs://${unityMetastore.name}`,
owner: "uc admins",
region: us_east1,
forceDestroy: true,
});
const thisMetastoreAssignment = new databricks.MetastoreAssignment("this", {
metastoreId: _this.id,
workspaceId: workspaceId,
});
import pulumi
import pulumi_databricks as databricks
this = databricks.Metastore("this",
name="primary",
storage_root=f"gs://{unity_metastore['name']}",
owner="uc admins",
region=us_east1,
force_destroy=True)
this_metastore_assignment = databricks.MetastoreAssignment("this",
metastore_id=this.id,
workspace_id=workspace_id)
package main
import (
"fmt"
"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
this, err := databricks.NewMetastore(ctx, "this", &databricks.MetastoreArgs{
Name: pulumi.String("primary"),
StorageRoot: pulumi.Sprintf("gs://%v", unityMetastore.Name),
Owner: pulumi.String("uc admins"),
Region: pulumi.Any(us_east1),
ForceDestroy: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = databricks.NewMetastoreAssignment(ctx, "this", &databricks.MetastoreAssignmentArgs{
MetastoreId: this.ID(),
WorkspaceId: pulumi.Any(workspaceId),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var @this = new Databricks.Metastore("this", new()
{
Name = "primary",
StorageRoot = $"gs://{unityMetastore.Name}",
Owner = "uc admins",
Region = us_east1,
ForceDestroy = true,
});
var thisMetastoreAssignment = new Databricks.MetastoreAssignment("this", new()
{
MetastoreId = @this.Id,
WorkspaceId = workspaceId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.Metastore;
import com.pulumi.databricks.MetastoreArgs;
import com.pulumi.databricks.MetastoreAssignment;
import com.pulumi.databricks.MetastoreAssignmentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var this_ = new Metastore("this", MetastoreArgs.builder()
.name("primary")
.storageRoot(String.format("gs://%s", unityMetastore.name()))
.owner("uc admins")
.region(us_east1)
.forceDestroy(true)
.build());
var thisMetastoreAssignment = new MetastoreAssignment("thisMetastoreAssignment", MetastoreAssignmentArgs.builder()
.metastoreId(this_.id())
.workspaceId(workspaceId)
.build());
}
}
resources:
this:
type: databricks:Metastore
properties:
name: primary
storageRoot: gs://${unityMetastore.name}
owner: uc admins
region: ${["us-east1"]}
forceDestroy: true
thisMetastoreAssignment:
type: databricks:MetastoreAssignment
name: this
properties:
metastoreId: ${this.id}
workspaceId: ${workspaceId}
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: Optional[MetastoreArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Metastore(resource_name: str,
opts: Optional[ResourceOptions] = 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,
external_access_enabled: Optional[bool] = None,
force_destroy: Optional[bool] = None,
name: Optional[str] = None,
owner: Optional[str] = None,
privilege_model_version: Optional[str] = None,
region: Optional[str] = None,
storage_root: Optional[str] = None,
storage_root_credential_id: Optional[str] = None,
storage_root_credential_name: Optional[str] = None)func NewMetastore(ctx *Context, name string, args *MetastoreArgs, opts ...ResourceOption) (*Metastore, error)public Metastore(string name, MetastoreArgs? args = null, 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()
{
DefaultDataAccessConfigId = "string",
DeltaSharingOrganizationName = "string",
DeltaSharingRecipientTokenLifetimeInSeconds = 0,
DeltaSharingScope = "string",
ExternalAccessEnabled = false,
ForceDestroy = false,
Name = "string",
Owner = "string",
PrivilegeModelVersion = "string",
Region = "string",
StorageRoot = "string",
StorageRootCredentialId = "string",
StorageRootCredentialName = "string",
});
example, err := databricks.NewMetastore(ctx, "metastoreResource", &databricks.MetastoreArgs{
DefaultDataAccessConfigId: pulumi.String("string"),
DeltaSharingOrganizationName: pulumi.String("string"),
DeltaSharingRecipientTokenLifetimeInSeconds: pulumi.Int(0),
DeltaSharingScope: pulumi.String("string"),
ExternalAccessEnabled: pulumi.Bool(false),
ForceDestroy: pulumi.Bool(false),
Name: pulumi.String("string"),
Owner: pulumi.String("string"),
PrivilegeModelVersion: pulumi.String("string"),
Region: pulumi.String("string"),
StorageRoot: pulumi.String("string"),
StorageRootCredentialId: pulumi.String("string"),
StorageRootCredentialName: pulumi.String("string"),
})
var metastoreResource = new Metastore("metastoreResource", MetastoreArgs.builder()
.defaultDataAccessConfigId("string")
.deltaSharingOrganizationName("string")
.deltaSharingRecipientTokenLifetimeInSeconds(0)
.deltaSharingScope("string")
.externalAccessEnabled(false)
.forceDestroy(false)
.name("string")
.owner("string")
.privilegeModelVersion("string")
.region("string")
.storageRoot("string")
.storageRootCredentialId("string")
.storageRootCredentialName("string")
.build());
metastore_resource = databricks.Metastore("metastoreResource",
default_data_access_config_id="string",
delta_sharing_organization_name="string",
delta_sharing_recipient_token_lifetime_in_seconds=0,
delta_sharing_scope="string",
external_access_enabled=False,
force_destroy=False,
name="string",
owner="string",
privilege_model_version="string",
region="string",
storage_root="string",
storage_root_credential_id="string",
storage_root_credential_name="string")
const metastoreResource = new databricks.Metastore("metastoreResource", {
defaultDataAccessConfigId: "string",
deltaSharingOrganizationName: "string",
deltaSharingRecipientTokenLifetimeInSeconds: 0,
deltaSharingScope: "string",
externalAccessEnabled: false,
forceDestroy: false,
name: "string",
owner: "string",
privilegeModelVersion: "string",
region: "string",
storageRoot: "string",
storageRootCredentialId: "string",
storageRootCredentialName: "string",
});
type: databricks:Metastore
properties:
defaultDataAccessConfigId: string
deltaSharingOrganizationName: string
deltaSharingRecipientTokenLifetimeInSeconds: 0
deltaSharingScope: string
externalAccessEnabled: false
forceDestroy: false
name: string
owner: string
privilegeModelVersion: string
region: string
storageRoot: string
storageRootCredentialId: string
storageRootCredentialName: 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:
- Default
Data stringAccess Config Id - (Optional) Unique identifier of the metastore's default data access configuration.
- Delta
Sharing stringOrganization Name - 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 intRecipient Token Lifetime In Seconds - 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 stringScope - Required along with
delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values:INTERNAL,INTERNAL_AND_EXTERNAL.INTERNALonly allows sharing within the same account, andINTERNAL_AND_EXTERNALallows cross account sharing and token based sharing. - External
Access boolEnabled - Whether to allow non-DBR clients to directly access entities under the metastore.
- Force
Destroy bool - Destroy metastore regardless of its contents.
- Name string
- Name of metastore.
- Owner string
- Username/groupname/sp application_id of the metastore owner.
- Privilege
Model stringVersion - Privilege model version of the metastore, of the form
major.minor(e.g.,1.0). - Region string
- The region of the metastore
- Storage
Root string - Path on cloud storage account, where managed
databricks.Tableare stored. If the URL contains special characters, such as space,&, etc., they should be percent-encoded (space >%20, etc.). Change forces creation of a new resource. If nostorage_rootis defined for the metastore, each catalog must have astorage_rootdefined. **It's recommended to definestorage_rooton the catalog level. - Storage
Root stringCredential Id - (Optional) UUID of storage credential to access the metastore storage_root.
- Storage
Root stringCredential Name - Name of the storage credential to access the metastore storage_root.
- Default
Data stringAccess Config Id - (Optional) Unique identifier of the metastore's default data access configuration.
- Delta
Sharing stringOrganization Name - 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 intRecipient Token Lifetime In Seconds - 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 stringScope - Required along with
delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values:INTERNAL,INTERNAL_AND_EXTERNAL.INTERNALonly allows sharing within the same account, andINTERNAL_AND_EXTERNALallows cross account sharing and token based sharing. - External
Access boolEnabled - Whether to allow non-DBR clients to directly access entities under the metastore.
- Force
Destroy bool - Destroy metastore regardless of its contents.
- Name string
- Name of metastore.
- Owner string
- Username/groupname/sp application_id of the metastore owner.
- Privilege
Model stringVersion - Privilege model version of the metastore, of the form
major.minor(e.g.,1.0). - Region string
- The region of the metastore
- Storage
Root string - Path on cloud storage account, where managed
databricks.Tableare stored. If the URL contains special characters, such as space,&, etc., they should be percent-encoded (space >%20, etc.). Change forces creation of a new resource. If nostorage_rootis defined for the metastore, each catalog must have astorage_rootdefined. **It's recommended to definestorage_rooton the catalog level. - Storage
Root stringCredential Id - (Optional) UUID of storage credential to access the metastore storage_root.
- Storage
Root stringCredential Name - Name of the storage credential to access the metastore storage_root.
- default
Data StringAccess Config Id - (Optional) Unique identifier of the metastore's default data access configuration.
- delta
Sharing StringOrganization Name - 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 IntegerRecipient Token Lifetime In Seconds - 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 StringScope - Required along with
delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values:INTERNAL,INTERNAL_AND_EXTERNAL.INTERNALonly allows sharing within the same account, andINTERNAL_AND_EXTERNALallows cross account sharing and token based sharing. - external
Access BooleanEnabled - Whether to allow non-DBR clients to directly access entities under the metastore.
- force
Destroy Boolean - Destroy metastore regardless of its contents.
- name String
- Name of metastore.
- owner String
- Username/groupname/sp application_id of the metastore owner.
- privilege
Model StringVersion - Privilege model version of the metastore, of the form
major.minor(e.g.,1.0). - region String
- The region of the metastore
- storage
Root String - Path on cloud storage account, where managed
databricks.Tableare stored. If the URL contains special characters, such as space,&, etc., they should be percent-encoded (space >%20, etc.). Change forces creation of a new resource. If nostorage_rootis defined for the metastore, each catalog must have astorage_rootdefined. **It's recommended to definestorage_rooton the catalog level. - storage
Root StringCredential Id - (Optional) UUID of storage credential to access the metastore storage_root.
- storage
Root StringCredential Name - Name of the storage credential to access the metastore storage_root.
- default
Data stringAccess Config Id - (Optional) Unique identifier of the metastore's default data access configuration.
- delta
Sharing stringOrganization Name - 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 numberRecipient Token Lifetime In Seconds - 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 stringScope - Required along with
delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values:INTERNAL,INTERNAL_AND_EXTERNAL.INTERNALonly allows sharing within the same account, andINTERNAL_AND_EXTERNALallows cross account sharing and token based sharing. - external
Access booleanEnabled - Whether to allow non-DBR clients to directly access entities under the metastore.
- force
Destroy boolean - Destroy metastore regardless of its contents.
- name string
- Name of metastore.
- owner string
- Username/groupname/sp application_id of the metastore owner.
- privilege
Model stringVersion - Privilege model version of the metastore, of the form
major.minor(e.g.,1.0). - region string
- The region of the metastore
- storage
Root string - Path on cloud storage account, where managed
databricks.Tableare stored. If the URL contains special characters, such as space,&, etc., they should be percent-encoded (space >%20, etc.). Change forces creation of a new resource. If nostorage_rootis defined for the metastore, each catalog must have astorage_rootdefined. **It's recommended to definestorage_rooton the catalog level. - storage
Root stringCredential Id - (Optional) UUID of storage credential to access the metastore storage_root.
- storage
Root stringCredential Name - Name of the storage credential to access the metastore storage_root.
- default_
data_ straccess_ config_ id - (Optional) Unique identifier of the metastore's default data access configuration.
- delta_
sharing_ strorganization_ name - 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_ intrecipient_ token_ lifetime_ in_ seconds - 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_ strscope - Required along with
delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values:INTERNAL,INTERNAL_AND_EXTERNAL.INTERNALonly allows sharing within the same account, andINTERNAL_AND_EXTERNALallows cross account sharing and token based sharing. - external_
access_ boolenabled - Whether to allow non-DBR clients to directly access entities under the metastore.
- force_
destroy bool - Destroy metastore regardless of its contents.
- name str
- Name of metastore.
- owner str
- Username/groupname/sp application_id of the metastore owner.
- privilege_
model_ strversion - Privilege model version of the metastore, of the form
major.minor(e.g.,1.0). - region str
- The region of the metastore
- storage_
root str - Path on cloud storage account, where managed
databricks.Tableare stored. If the URL contains special characters, such as space,&, etc., they should be percent-encoded (space >%20, etc.). Change forces creation of a new resource. If nostorage_rootis defined for the metastore, each catalog must have astorage_rootdefined. **It's recommended to definestorage_rooton the catalog level. - storage_
root_ strcredential_ id - (Optional) UUID of storage credential to access the metastore storage_root.
- storage_
root_ strcredential_ name - Name of the storage credential to access the metastore storage_root.
- default
Data StringAccess Config Id - (Optional) Unique identifier of the metastore's default data access configuration.
- delta
Sharing StringOrganization Name - 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 NumberRecipient Token Lifetime In Seconds - 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 StringScope - Required along with
delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values:INTERNAL,INTERNAL_AND_EXTERNAL.INTERNALonly allows sharing within the same account, andINTERNAL_AND_EXTERNALallows cross account sharing and token based sharing. - external
Access BooleanEnabled - Whether to allow non-DBR clients to directly access entities under the metastore.
- force
Destroy Boolean - Destroy metastore regardless of its contents.
- name String
- Name of metastore.
- owner String
- Username/groupname/sp application_id of the metastore owner.
- privilege
Model StringVersion - Privilege model version of the metastore, of the form
major.minor(e.g.,1.0). - region String
- The region of the metastore
- storage
Root String - Path on cloud storage account, where managed
databricks.Tableare stored. If the URL contains special characters, such as space,&, etc., they should be percent-encoded (space >%20, etc.). Change forces creation of a new resource. If nostorage_rootis defined for the metastore, each catalog must have astorage_rootdefined. **It's recommended to definestorage_rooton the catalog level. - storage
Root StringCredential Id - (Optional) UUID of storage credential to access the metastore storage_root.
- storage
Root StringCredential Name - Name of the storage credential to access the metastore storage_root.
Outputs
All input properties are implicitly available as output properties. Additionally, the Metastore resource produces the following output properties:
- Cloud string
- Cloud vendor of the metastore home shard (e.g.,
aws,azure,gcp). - Created
At int - Time at which the metastore was created, in epoch milliseconds.
- Created
By string - Username of metastore creator.
- Global
Metastore stringId - Globally unique metastore ID across clouds and regions, of the form
cloud:region:metastore_id. - Id string
- The provider-assigned unique ID for this managed resource.
- Metastore
Id string - Unique identifier of the metastore.
- Updated
At int - Time at which the metastore was last modified, in epoch milliseconds.
- Updated
By string - Username of user who last modified the metastore.
- Cloud string
- Cloud vendor of the metastore home shard (e.g.,
aws,azure,gcp). - Created
At int - Time at which the metastore was created, in epoch milliseconds.
- Created
By string - Username of metastore creator.
- Global
Metastore stringId - Globally unique metastore ID across clouds and regions, of the form
cloud:region:metastore_id. - Id string
- The provider-assigned unique ID for this managed resource.
- Metastore
Id string - Unique identifier of the metastore.
- Updated
At int - Time at which the metastore was last modified, in epoch milliseconds.
- Updated
By string - Username of user who last modified the metastore.
- cloud String
- Cloud vendor of the metastore home shard (e.g.,
aws,azure,gcp). - created
At Integer - Time at which the metastore was created, in epoch milliseconds.
- created
By String - Username of metastore creator.
- global
Metastore StringId - Globally unique metastore ID across clouds and regions, of the form
cloud:region:metastore_id. - id String
- The provider-assigned unique ID for this managed resource.
- metastore
Id String - Unique identifier of the metastore.
- updated
At Integer - Time at which the metastore was last modified, in epoch milliseconds.
- updated
By String - Username of user who last modified the metastore.
- cloud string
- Cloud vendor of the metastore home shard (e.g.,
aws,azure,gcp). - created
At number - Time at which the metastore was created, in epoch milliseconds.
- created
By string - Username of metastore creator.
- global
Metastore stringId - Globally unique metastore ID across clouds and regions, of the form
cloud:region:metastore_id. - id string
- The provider-assigned unique ID for this managed resource.
- metastore
Id string - Unique identifier of the metastore.
- updated
At number - Time at which the metastore was last modified, in epoch milliseconds.
- updated
By string - Username of user who last modified the metastore.
- cloud str
- Cloud vendor of the metastore home shard (e.g.,
aws,azure,gcp). - created_
at int - Time at which the metastore was created, in epoch milliseconds.
- created_
by str - Username of metastore creator.
- global_
metastore_ strid - Globally unique metastore ID across clouds and regions, of the form
cloud:region:metastore_id. - id str
- The provider-assigned unique ID for this managed resource.
- metastore_
id str - Unique identifier of the metastore.
- updated_
at int - Time at which the metastore was last modified, in epoch milliseconds.
- updated_
by str - Username of user who last modified the metastore.
- cloud String
- Cloud vendor of the metastore home shard (e.g.,
aws,azure,gcp). - created
At Number - Time at which the metastore was created, in epoch milliseconds.
- created
By String - Username of metastore creator.
- global
Metastore StringId - Globally unique metastore ID across clouds and regions, of the form
cloud:region:metastore_id. - id String
- The provider-assigned unique ID for this managed resource.
- metastore
Id String - Unique identifier of the metastore.
- updated
At Number - Time at which the metastore was last modified, in epoch milliseconds.
- updated
By String - Username of user who last modified the metastore.
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,
external_access_enabled: Optional[bool] = None,
force_destroy: Optional[bool] = None,
global_metastore_id: Optional[str] = None,
metastore_id: Optional[str] = None,
name: Optional[str] = None,
owner: Optional[str] = None,
privilege_model_version: Optional[str] = None,
region: Optional[str] = None,
storage_root: Optional[str] = None,
storage_root_credential_id: Optional[str] = None,
storage_root_credential_name: Optional[str] = None,
updated_at: Optional[int] = None,
updated_by: Optional[str] = None) -> Metastorefunc 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.
- Cloud string
- Cloud vendor of the metastore home shard (e.g.,
aws,azure,gcp). - Created
At int - Time at which the metastore was created, in epoch milliseconds.
- Created
By string - Username of metastore creator.
- Default
Data stringAccess Config Id - (Optional) Unique identifier of the metastore's default data access configuration.
- Delta
Sharing stringOrganization Name - 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 intRecipient Token Lifetime In Seconds - 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 stringScope - Required along with
delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values:INTERNAL,INTERNAL_AND_EXTERNAL.INTERNALonly allows sharing within the same account, andINTERNAL_AND_EXTERNALallows cross account sharing and token based sharing. - External
Access boolEnabled - Whether to allow non-DBR clients to directly access entities under the metastore.
- Force
Destroy bool - Destroy metastore regardless of its contents.
- Global
Metastore stringId - Globally unique metastore ID across clouds and regions, of the form
cloud:region:metastore_id. - Metastore
Id string - Unique identifier of the metastore.
- Name string
- Name of metastore.
- Owner string
- Username/groupname/sp application_id of the metastore owner.
- Privilege
Model stringVersion - Privilege model version of the metastore, of the form
major.minor(e.g.,1.0). - Region string
- The region of the metastore
- Storage
Root string - Path on cloud storage account, where managed
databricks.Tableare stored. If the URL contains special characters, such as space,&, etc., they should be percent-encoded (space >%20, etc.). Change forces creation of a new resource. If nostorage_rootis defined for the metastore, each catalog must have astorage_rootdefined. **It's recommended to definestorage_rooton the catalog level. - Storage
Root stringCredential Id - (Optional) UUID of storage credential to access the metastore storage_root.
- Storage
Root stringCredential Name - Name of the storage credential to access the metastore storage_root.
- Updated
At int - Time at which the metastore was last modified, in epoch milliseconds.
- Updated
By string - Username of user who last modified the metastore.
- Cloud string
- Cloud vendor of the metastore home shard (e.g.,
aws,azure,gcp). - Created
At int - Time at which the metastore was created, in epoch milliseconds.
- Created
By string - Username of metastore creator.
- Default
Data stringAccess Config Id - (Optional) Unique identifier of the metastore's default data access configuration.
- Delta
Sharing stringOrganization Name - 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 intRecipient Token Lifetime In Seconds - 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 stringScope - Required along with
delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values:INTERNAL,INTERNAL_AND_EXTERNAL.INTERNALonly allows sharing within the same account, andINTERNAL_AND_EXTERNALallows cross account sharing and token based sharing. - External
Access boolEnabled - Whether to allow non-DBR clients to directly access entities under the metastore.
- Force
Destroy bool - Destroy metastore regardless of its contents.
- Global
Metastore stringId - Globally unique metastore ID across clouds and regions, of the form
cloud:region:metastore_id. - Metastore
Id string - Unique identifier of the metastore.
- Name string
- Name of metastore.
- Owner string
- Username/groupname/sp application_id of the metastore owner.
- Privilege
Model stringVersion - Privilege model version of the metastore, of the form
major.minor(e.g.,1.0). - Region string
- The region of the metastore
- Storage
Root string - Path on cloud storage account, where managed
databricks.Tableare stored. If the URL contains special characters, such as space,&, etc., they should be percent-encoded (space >%20, etc.). Change forces creation of a new resource. If nostorage_rootis defined for the metastore, each catalog must have astorage_rootdefined. **It's recommended to definestorage_rooton the catalog level. - Storage
Root stringCredential Id - (Optional) UUID of storage credential to access the metastore storage_root.
- Storage
Root stringCredential Name - Name of the storage credential to access the metastore storage_root.
- Updated
At int - Time at which the metastore was last modified, in epoch milliseconds.
- Updated
By string - Username of user who last modified the metastore.
- cloud String
- Cloud vendor of the metastore home shard (e.g.,
aws,azure,gcp). - created
At Integer - Time at which the metastore was created, in epoch milliseconds.
- created
By String - Username of metastore creator.
- default
Data StringAccess Config Id - (Optional) Unique identifier of the metastore's default data access configuration.
- delta
Sharing StringOrganization Name - 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 IntegerRecipient Token Lifetime In Seconds - 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 StringScope - Required along with
delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values:INTERNAL,INTERNAL_AND_EXTERNAL.INTERNALonly allows sharing within the same account, andINTERNAL_AND_EXTERNALallows cross account sharing and token based sharing. - external
Access BooleanEnabled - Whether to allow non-DBR clients to directly access entities under the metastore.
- force
Destroy Boolean - Destroy metastore regardless of its contents.
- global
Metastore StringId - Globally unique metastore ID across clouds and regions, of the form
cloud:region:metastore_id. - metastore
Id String - Unique identifier of the metastore.
- name String
- Name of metastore.
- owner String
- Username/groupname/sp application_id of the metastore owner.
- privilege
Model StringVersion - Privilege model version of the metastore, of the form
major.minor(e.g.,1.0). - region String
- The region of the metastore
- storage
Root String - Path on cloud storage account, where managed
databricks.Tableare stored. If the URL contains special characters, such as space,&, etc., they should be percent-encoded (space >%20, etc.). Change forces creation of a new resource. If nostorage_rootis defined for the metastore, each catalog must have astorage_rootdefined. **It's recommended to definestorage_rooton the catalog level. - storage
Root StringCredential Id - (Optional) UUID of storage credential to access the metastore storage_root.
- storage
Root StringCredential Name - Name of the storage credential to access the metastore storage_root.
- updated
At Integer - Time at which the metastore was last modified, in epoch milliseconds.
- updated
By String - Username of user who last modified the metastore.
- cloud string
- Cloud vendor of the metastore home shard (e.g.,
aws,azure,gcp). - created
At number - Time at which the metastore was created, in epoch milliseconds.
- created
By string - Username of metastore creator.
- default
Data stringAccess Config Id - (Optional) Unique identifier of the metastore's default data access configuration.
- delta
Sharing stringOrganization Name - 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 numberRecipient Token Lifetime In Seconds - 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 stringScope - Required along with
delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values:INTERNAL,INTERNAL_AND_EXTERNAL.INTERNALonly allows sharing within the same account, andINTERNAL_AND_EXTERNALallows cross account sharing and token based sharing. - external
Access booleanEnabled - Whether to allow non-DBR clients to directly access entities under the metastore.
- force
Destroy boolean - Destroy metastore regardless of its contents.
- global
Metastore stringId - Globally unique metastore ID across clouds and regions, of the form
cloud:region:metastore_id. - metastore
Id string - Unique identifier of the metastore.
- name string
- Name of metastore.
- owner string
- Username/groupname/sp application_id of the metastore owner.
- privilege
Model stringVersion - Privilege model version of the metastore, of the form
major.minor(e.g.,1.0). - region string
- The region of the metastore
- storage
Root string - Path on cloud storage account, where managed
databricks.Tableare stored. If the URL contains special characters, such as space,&, etc., they should be percent-encoded (space >%20, etc.). Change forces creation of a new resource. If nostorage_rootis defined for the metastore, each catalog must have astorage_rootdefined. **It's recommended to definestorage_rooton the catalog level. - storage
Root stringCredential Id - (Optional) UUID of storage credential to access the metastore storage_root.
- storage
Root stringCredential Name - Name of the storage credential to access the metastore storage_root.
- updated
At number - Time at which the metastore was last modified, in epoch milliseconds.
- updated
By string - Username of user who last modified the metastore.
- cloud str
- Cloud vendor of the metastore home shard (e.g.,
aws,azure,gcp). - created_
at int - Time at which the metastore was created, in epoch milliseconds.
- created_
by str - Username of metastore creator.
- default_
data_ straccess_ config_ id - (Optional) Unique identifier of the metastore's default data access configuration.
- delta_
sharing_ strorganization_ name - 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_ intrecipient_ token_ lifetime_ in_ seconds - 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_ strscope - Required along with
delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values:INTERNAL,INTERNAL_AND_EXTERNAL.INTERNALonly allows sharing within the same account, andINTERNAL_AND_EXTERNALallows cross account sharing and token based sharing. - external_
access_ boolenabled - Whether to allow non-DBR clients to directly access entities under the metastore.
- force_
destroy bool - Destroy metastore regardless of its contents.
- global_
metastore_ strid - Globally unique metastore ID across clouds and regions, of the form
cloud:region:metastore_id. - metastore_
id str - Unique identifier of the metastore.
- name str
- Name of metastore.
- owner str
- Username/groupname/sp application_id of the metastore owner.
- privilege_
model_ strversion - Privilege model version of the metastore, of the form
major.minor(e.g.,1.0). - region str
- The region of the metastore
- storage_
root str - Path on cloud storage account, where managed
databricks.Tableare stored. If the URL contains special characters, such as space,&, etc., they should be percent-encoded (space >%20, etc.). Change forces creation of a new resource. If nostorage_rootis defined for the metastore, each catalog must have astorage_rootdefined. **It's recommended to definestorage_rooton the catalog level. - storage_
root_ strcredential_ id - (Optional) UUID of storage credential to access the metastore storage_root.
- storage_
root_ strcredential_ name - Name of the storage credential to access the metastore storage_root.
- updated_
at int - Time at which the metastore was last modified, in epoch milliseconds.
- updated_
by str - Username of user who last modified the metastore.
- cloud String
- Cloud vendor of the metastore home shard (e.g.,
aws,azure,gcp). - created
At Number - Time at which the metastore was created, in epoch milliseconds.
- created
By String - Username of metastore creator.
- default
Data StringAccess Config Id - (Optional) Unique identifier of the metastore's default data access configuration.
- delta
Sharing StringOrganization Name - 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 NumberRecipient Token Lifetime In Seconds - 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 StringScope - Required along with
delta_sharing_recipient_token_lifetime_in_seconds. Used to enable delta sharing on the metastore. Valid values:INTERNAL,INTERNAL_AND_EXTERNAL.INTERNALonly allows sharing within the same account, andINTERNAL_AND_EXTERNALallows cross account sharing and token based sharing. - external
Access BooleanEnabled - Whether to allow non-DBR clients to directly access entities under the metastore.
- force
Destroy Boolean - Destroy metastore regardless of its contents.
- global
Metastore StringId - Globally unique metastore ID across clouds and regions, of the form
cloud:region:metastore_id. - metastore
Id String - Unique identifier of the metastore.
- name String
- Name of metastore.
- owner String
- Username/groupname/sp application_id of the metastore owner.
- privilege
Model StringVersion - Privilege model version of the metastore, of the form
major.minor(e.g.,1.0). - region String
- The region of the metastore
- storage
Root String - Path on cloud storage account, where managed
databricks.Tableare stored. If the URL contains special characters, such as space,&, etc., they should be percent-encoded (space >%20, etc.). Change forces creation of a new resource. If nostorage_rootis defined for the metastore, each catalog must have astorage_rootdefined. **It's recommended to definestorage_rooton the catalog level. - storage
Root StringCredential Id - (Optional) UUID of storage credential to access the metastore storage_root.
- storage
Root StringCredential Name - Name of the storage credential to access the metastore storage_root.
- updated
At Number - Time at which the metastore was last modified, in epoch milliseconds.
- updated
By String - Username of user who last modified the metastore.
Import
This resource can be imported by ID:
hcl
import {
to = databricks_metastore.this
id = “
}
Alternatively, when using terraform version 1.4 or earlier, import using the pulumi import command:
bash
$ 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
databricksTerraform Provider.
