1. Packages
  2. Databricks Provider
  3. API Docs
  4. DatabaseDatabaseCatalog
Databricks v1.74.0 published on Thursday, Aug 14, 2025 by Pulumi

databricks.DatabaseDatabaseCatalog

Explore with Pulumi AI

databricks logo
Databricks v1.74.0 published on Thursday, Aug 14, 2025 by Pulumi

    Database Catalogs are databases inside a Lakebase Database Instance which are synced into a Postgres Catalog inside Unity Catalog.

    Example Usage

    Example

    This example creates a Database Catalog based on an existing database in the Database Instance

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const _this = new databricks.DatabaseDatabaseCatalog("this", {
        name: "my_registered_catalog",
        databaseInstanceName: "my-database-instance",
        databaseName: "databricks_postgres",
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    this = databricks.DatabaseDatabaseCatalog("this",
        name="my_registered_catalog",
        database_instance_name="my-database-instance",
        database_name="databricks_postgres")
    
    package main
    
    import (
    	"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 {
    		_, err := databricks.NewDatabaseDatabaseCatalog(ctx, "this", &databricks.DatabaseDatabaseCatalogArgs{
    			Name:                 pulumi.String("my_registered_catalog"),
    			DatabaseInstanceName: pulumi.String("my-database-instance"),
    			DatabaseName:         pulumi.String("databricks_postgres"),
    		})
    		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.DatabaseDatabaseCatalog("this", new()
        {
            Name = "my_registered_catalog",
            DatabaseInstanceName = "my-database-instance",
            DatabaseName = "databricks_postgres",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.DatabaseDatabaseCatalog;
    import com.pulumi.databricks.DatabaseDatabaseCatalogArgs;
    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 DatabaseDatabaseCatalog("this", DatabaseDatabaseCatalogArgs.builder()
                .name("my_registered_catalog")
                .databaseInstanceName("my-database-instance")
                .databaseName("databricks_postgres")
                .build());
    
        }
    }
    
    resources:
      this:
        type: databricks:DatabaseDatabaseCatalog
        properties:
          name: my_registered_catalog
          databaseInstanceName: my-database-instance
          databaseName: databricks_postgres
    

    This example creates a Database Catalog along with a new database inside an existing Database Instance

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const _this = new databricks.DatabaseDatabaseCatalog("this", {
        name: "my_registered_catalog",
        databaseInstanceName: "my-database-instance",
        databaseName: "new_registered_catalog_database",
        createDatabaseIfNotExists: true,
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    this = databricks.DatabaseDatabaseCatalog("this",
        name="my_registered_catalog",
        database_instance_name="my-database-instance",
        database_name="new_registered_catalog_database",
        create_database_if_not_exists=True)
    
    package main
    
    import (
    	"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 {
    		_, err := databricks.NewDatabaseDatabaseCatalog(ctx, "this", &databricks.DatabaseDatabaseCatalogArgs{
    			Name:                      pulumi.String("my_registered_catalog"),
    			DatabaseInstanceName:      pulumi.String("my-database-instance"),
    			DatabaseName:              pulumi.String("new_registered_catalog_database"),
    			CreateDatabaseIfNotExists: pulumi.Bool(true),
    		})
    		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.DatabaseDatabaseCatalog("this", new()
        {
            Name = "my_registered_catalog",
            DatabaseInstanceName = "my-database-instance",
            DatabaseName = "new_registered_catalog_database",
            CreateDatabaseIfNotExists = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.DatabaseDatabaseCatalog;
    import com.pulumi.databricks.DatabaseDatabaseCatalogArgs;
    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 DatabaseDatabaseCatalog("this", DatabaseDatabaseCatalogArgs.builder()
                .name("my_registered_catalog")
                .databaseInstanceName("my-database-instance")
                .databaseName("new_registered_catalog_database")
                .createDatabaseIfNotExists(true)
                .build());
    
        }
    }
    
    resources:
      this:
        type: databricks:DatabaseDatabaseCatalog
        properties:
          name: my_registered_catalog
          databaseInstanceName: my-database-instance
          databaseName: new_registered_catalog_database
          createDatabaseIfNotExists: true
    

    This example creates a DatabaseInstance and then a Database Catalog inside it

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const instance = new databricks.DatabaseInstance("instance", {
        name: "my-database-instance",
        capacity: "CU_1",
    });
    const catalog = new databricks.DatabaseDatabaseCatalog("catalog", {
        name: "my_registered_catalog",
        databaseInstanceName: instance.name,
        databaseName: "new_registered_catalog_database",
        createDatabaseIfNotExists: true,
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    instance = databricks.DatabaseInstance("instance",
        name="my-database-instance",
        capacity="CU_1")
    catalog = databricks.DatabaseDatabaseCatalog("catalog",
        name="my_registered_catalog",
        database_instance_name=instance.name,
        database_name="new_registered_catalog_database",
        create_database_if_not_exists=True)
    
    package main
    
    import (
    	"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 {
    		instance, err := databricks.NewDatabaseInstance(ctx, "instance", &databricks.DatabaseInstanceArgs{
    			Name:     pulumi.String("my-database-instance"),
    			Capacity: pulumi.String("CU_1"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = databricks.NewDatabaseDatabaseCatalog(ctx, "catalog", &databricks.DatabaseDatabaseCatalogArgs{
    			Name:                      pulumi.String("my_registered_catalog"),
    			DatabaseInstanceName:      instance.Name,
    			DatabaseName:              pulumi.String("new_registered_catalog_database"),
    			CreateDatabaseIfNotExists: pulumi.Bool(true),
    		})
    		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 instance = new Databricks.DatabaseInstance("instance", new()
        {
            Name = "my-database-instance",
            Capacity = "CU_1",
        });
    
        var catalog = new Databricks.DatabaseDatabaseCatalog("catalog", new()
        {
            Name = "my_registered_catalog",
            DatabaseInstanceName = instance.Name,
            DatabaseName = "new_registered_catalog_database",
            CreateDatabaseIfNotExists = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.DatabaseInstance;
    import com.pulumi.databricks.DatabaseInstanceArgs;
    import com.pulumi.databricks.DatabaseDatabaseCatalog;
    import com.pulumi.databricks.DatabaseDatabaseCatalogArgs;
    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 instance = new DatabaseInstance("instance", DatabaseInstanceArgs.builder()
                .name("my-database-instance")
                .capacity("CU_1")
                .build());
    
            var catalog = new DatabaseDatabaseCatalog("catalog", DatabaseDatabaseCatalogArgs.builder()
                .name("my_registered_catalog")
                .databaseInstanceName(instance.name())
                .databaseName("new_registered_catalog_database")
                .createDatabaseIfNotExists(true)
                .build());
    
        }
    }
    
    resources:
      instance:
        type: databricks:DatabaseInstance
        properties:
          name: my-database-instance
          capacity: CU_1
      catalog:
        type: databricks:DatabaseDatabaseCatalog
        properties:
          name: my_registered_catalog
          databaseInstanceName: ${instance.name}
          databaseName: new_registered_catalog_database
          createDatabaseIfNotExists: true
    

    Create DatabaseDatabaseCatalog Resource

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

    Constructor syntax

    new DatabaseDatabaseCatalog(name: string, args: DatabaseDatabaseCatalogArgs, opts?: CustomResourceOptions);
    @overload
    def DatabaseDatabaseCatalog(resource_name: str,
                                args: DatabaseDatabaseCatalogArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def DatabaseDatabaseCatalog(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                database_instance_name: Optional[str] = None,
                                database_name: Optional[str] = None,
                                create_database_if_not_exists: Optional[bool] = None,
                                name: Optional[str] = None)
    func NewDatabaseDatabaseCatalog(ctx *Context, name string, args DatabaseDatabaseCatalogArgs, opts ...ResourceOption) (*DatabaseDatabaseCatalog, error)
    public DatabaseDatabaseCatalog(string name, DatabaseDatabaseCatalogArgs args, CustomResourceOptions? opts = null)
    public DatabaseDatabaseCatalog(String name, DatabaseDatabaseCatalogArgs args)
    public DatabaseDatabaseCatalog(String name, DatabaseDatabaseCatalogArgs args, CustomResourceOptions options)
    
    type: databricks:DatabaseDatabaseCatalog
    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 DatabaseDatabaseCatalogArgs
    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 DatabaseDatabaseCatalogArgs
    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 DatabaseDatabaseCatalogArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DatabaseDatabaseCatalogArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DatabaseDatabaseCatalogArgs
    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 databaseDatabaseCatalogResource = new Databricks.DatabaseDatabaseCatalog("databaseDatabaseCatalogResource", new()
    {
        DatabaseInstanceName = "string",
        DatabaseName = "string",
        CreateDatabaseIfNotExists = false,
        Name = "string",
    });
    
    example, err := databricks.NewDatabaseDatabaseCatalog(ctx, "databaseDatabaseCatalogResource", &databricks.DatabaseDatabaseCatalogArgs{
    	DatabaseInstanceName:      pulumi.String("string"),
    	DatabaseName:              pulumi.String("string"),
    	CreateDatabaseIfNotExists: pulumi.Bool(false),
    	Name:                      pulumi.String("string"),
    })
    
    var databaseDatabaseCatalogResource = new DatabaseDatabaseCatalog("databaseDatabaseCatalogResource", DatabaseDatabaseCatalogArgs.builder()
        .databaseInstanceName("string")
        .databaseName("string")
        .createDatabaseIfNotExists(false)
        .name("string")
        .build());
    
    database_database_catalog_resource = databricks.DatabaseDatabaseCatalog("databaseDatabaseCatalogResource",
        database_instance_name="string",
        database_name="string",
        create_database_if_not_exists=False,
        name="string")
    
    const databaseDatabaseCatalogResource = new databricks.DatabaseDatabaseCatalog("databaseDatabaseCatalogResource", {
        databaseInstanceName: "string",
        databaseName: "string",
        createDatabaseIfNotExists: false,
        name: "string",
    });
    
    type: databricks:DatabaseDatabaseCatalog
    properties:
        createDatabaseIfNotExists: false
        databaseInstanceName: string
        databaseName: string
        name: string
    

    DatabaseDatabaseCatalog 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 DatabaseDatabaseCatalog resource accepts the following input properties:

    DatabaseInstanceName string
    The name of the DatabaseInstance housing the database
    DatabaseName string
    The name of the database (in a instance) associated with the catalog
    CreateDatabaseIfNotExists bool
    Name string
    The name of the catalog in UC
    DatabaseInstanceName string
    The name of the DatabaseInstance housing the database
    DatabaseName string
    The name of the database (in a instance) associated with the catalog
    CreateDatabaseIfNotExists bool
    Name string
    The name of the catalog in UC
    databaseInstanceName String
    The name of the DatabaseInstance housing the database
    databaseName String
    The name of the database (in a instance) associated with the catalog
    createDatabaseIfNotExists Boolean
    name String
    The name of the catalog in UC
    databaseInstanceName string
    The name of the DatabaseInstance housing the database
    databaseName string
    The name of the database (in a instance) associated with the catalog
    createDatabaseIfNotExists boolean
    name string
    The name of the catalog in UC
    database_instance_name str
    The name of the DatabaseInstance housing the database
    database_name str
    The name of the database (in a instance) associated with the catalog
    create_database_if_not_exists bool
    name str
    The name of the catalog in UC
    databaseInstanceName String
    The name of the DatabaseInstance housing the database
    databaseName String
    The name of the database (in a instance) associated with the catalog
    createDatabaseIfNotExists Boolean
    name String
    The name of the catalog in UC

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Uid string
    (string)
    Id string
    The provider-assigned unique ID for this managed resource.
    Uid string
    (string)
    id String
    The provider-assigned unique ID for this managed resource.
    uid String
    (string)
    id string
    The provider-assigned unique ID for this managed resource.
    uid string
    (string)
    id str
    The provider-assigned unique ID for this managed resource.
    uid str
    (string)
    id String
    The provider-assigned unique ID for this managed resource.
    uid String
    (string)

    Look up Existing DatabaseDatabaseCatalog Resource

    Get an existing DatabaseDatabaseCatalog 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?: DatabaseDatabaseCatalogState, opts?: CustomResourceOptions): DatabaseDatabaseCatalog
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_database_if_not_exists: Optional[bool] = None,
            database_instance_name: Optional[str] = None,
            database_name: Optional[str] = None,
            name: Optional[str] = None,
            uid: Optional[str] = None) -> DatabaseDatabaseCatalog
    func GetDatabaseDatabaseCatalog(ctx *Context, name string, id IDInput, state *DatabaseDatabaseCatalogState, opts ...ResourceOption) (*DatabaseDatabaseCatalog, error)
    public static DatabaseDatabaseCatalog Get(string name, Input<string> id, DatabaseDatabaseCatalogState? state, CustomResourceOptions? opts = null)
    public static DatabaseDatabaseCatalog get(String name, Output<String> id, DatabaseDatabaseCatalogState state, CustomResourceOptions options)
    resources:  _:    type: databricks:DatabaseDatabaseCatalog    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:
    CreateDatabaseIfNotExists bool
    DatabaseInstanceName string
    The name of the DatabaseInstance housing the database
    DatabaseName string
    The name of the database (in a instance) associated with the catalog
    Name string
    The name of the catalog in UC
    Uid string
    (string)
    CreateDatabaseIfNotExists bool
    DatabaseInstanceName string
    The name of the DatabaseInstance housing the database
    DatabaseName string
    The name of the database (in a instance) associated with the catalog
    Name string
    The name of the catalog in UC
    Uid string
    (string)
    createDatabaseIfNotExists Boolean
    databaseInstanceName String
    The name of the DatabaseInstance housing the database
    databaseName String
    The name of the database (in a instance) associated with the catalog
    name String
    The name of the catalog in UC
    uid String
    (string)
    createDatabaseIfNotExists boolean
    databaseInstanceName string
    The name of the DatabaseInstance housing the database
    databaseName string
    The name of the database (in a instance) associated with the catalog
    name string
    The name of the catalog in UC
    uid string
    (string)
    create_database_if_not_exists bool
    database_instance_name str
    The name of the DatabaseInstance housing the database
    database_name str
    The name of the database (in a instance) associated with the catalog
    name str
    The name of the catalog in UC
    uid str
    (string)
    createDatabaseIfNotExists Boolean
    databaseInstanceName String
    The name of the DatabaseInstance housing the database
    databaseName String
    The name of the database (in a instance) associated with the catalog
    name String
    The name of the catalog in UC
    uid String
    (string)

    Import

    As of Pulumi v1.5, resources can be imported through configuration.

    hcl

    import {

    id = name

    to = databricks_database_database_catalog.this

    }

    If you are using an older version of Pulumi, import the resource using the pulumi import command as follows:

    $ pulumi import databricks:index/databaseDatabaseCatalog:DatabaseDatabaseCatalog databricks_database_database_catalog name
    

    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
    Databricks v1.74.0 published on Thursday, Aug 14, 2025 by Pulumi